Skip to content

Commit

Permalink
Fiddle internal bucket names for monitoring Influx metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
athornton committed Mar 28, 2024
1 parent 7bbd2c4 commit 19cebda
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"name": "Storage shard size",
"queries": [
{
"query": "bkts=buckets()\n |> rename(columns: {\"id\": \"bucket\", \"name\": \"bucketname\"})\n |> keep(columns: [\"bucket\", \"bucketname\"])\n\nshards=from(bucket: \"monitoring_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_shard_disk_size\")\n |> drop(columns: [\"_measurement\", \"_field\", \"_start\", \"_stop\", \"cluster\", \"engine\", \"id\", \"prometheus_app\", \"url\", \"walPath\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n\njoin(tables: {t1: bkts, t2: shards}, on: [\"bucket\"])\n |> drop(columns: [\"bucket\"])\n |> rename(columns: {\"bucketname\": \"bucket\"})\n |> filter(fn: (r) => r[\"bucket\"] == v.databases)\n |> yield()",
"query": "bkts=buckets()\n |> rename(columns: {\"id\": \"bucket\", \"name\": \"bucketname\"})\n |> keep(columns: [\"bucket\", \"bucketname\"])\n\nshards=from(bucket: \"monitoring_internal_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_shard_disk_size\")\n |> drop(columns: [\"_measurement\", \"_field\", \"_start\", \"_stop\", \"cluster\", \"engine\", \"id\", \"prometheus_app\", \"url\", \"walPath\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n\njoin(tables: {t1: bkts, t2: shards}, on: [\"bucket\"])\n |> drop(columns: [\"bucket\"])\n |> rename(columns: {\"bucketname\": \"bucket\"})\n |> filter(fn: (r) => r[\"bucket\"] == v.databases)\n |> yield()",
"queryConfig": {
"database": "",
"measurement": "",
Expand All @@ -32,7 +32,7 @@
"tags": []
},
"areTagsAccepted": false,
"rawText": "bkts=buckets()\n |> rename(columns: {\"id\": \"bucket\", \"name\": \"bucketname\"})\n |> keep(columns: [\"bucket\", \"bucketname\"])\n\nshards=from(bucket: \"monitoring_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_shard_disk_size\")\n |> drop(columns: [\"_measurement\", \"_field\", \"_start\", \"_stop\", \"cluster\", \"engine\", \"id\", \"prometheus_app\", \"url\", \"walPath\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n\njoin(tables: {t1: bkts, t2: shards}, on: [\"bucket\"])\n |> drop(columns: [\"bucket\"])\n |> rename(columns: {\"bucketname\": \"bucket\"})\n |> filter(fn: (r) => r[\"bucket\"] == v.databases)\n |> yield()",
"rawText": "bkts=buckets()\n |> rename(columns: {\"id\": \"bucket\", \"name\": \"bucketname\"})\n |> keep(columns: [\"bucket\", \"bucketname\"])\n\nshards=from(bucket: \"monitoring_internal_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_shard_disk_size\")\n |> drop(columns: [\"_measurement\", \"_field\", \"_start\", \"_stop\", \"cluster\", \"engine\", \"id\", \"prometheus_app\", \"url\", \"walPath\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n\njoin(tables: {t1: bkts, t2: shards}, on: [\"bucket\"])\n |> drop(columns: [\"bucket\"])\n |> rename(columns: {\"bucketname\": \"bucket\"})\n |> filter(fn: (r) => r[\"bucket\"] == v.databases)\n |> yield()",
"range": null,
"shifts": null
},
Expand Down Expand Up @@ -137,7 +137,7 @@
"name": "Points dropped/errored",
"queries": [
{
"query": "from(bucket: \"monitoring_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_writer_dropped_points_sum\" or r[\"_field\"] == \"storage_writer_err_points_sum\")\n |> drop(columns:[\"_measurement\", \"_start\", \"_stop\", \"cluster\", \"path\", \"prometheus_app\", \"url\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")",
"query": "from(bucket: \"monitoring_internal_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_writer_dropped_points_sum\" or r[\"_field\"] == \"storage_writer_err_points_sum\")\n |> drop(columns:[\"_measurement\", \"_start\", \"_stop\", \"cluster\", \"path\", \"prometheus_app\", \"url\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")",
"queryConfig": {
"database": "",
"measurement": "",
Expand All @@ -149,7 +149,7 @@
"tags": []
},
"areTagsAccepted": false,
"rawText": "from(bucket: \"monitoring_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_writer_dropped_points_sum\" or r[\"_field\"] == \"storage_writer_err_points_sum\")\n |> drop(columns:[\"_measurement\", \"_start\", \"_stop\", \"cluster\", \"path\", \"prometheus_app\", \"url\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")",
"rawText": "from(bucket: \"monitoring_internal_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_writer_dropped_points_sum\" or r[\"_field\"] == \"storage_writer_err_points_sum\")\n |> drop(columns:[\"_measurement\", \"_start\", \"_stop\", \"cluster\", \"path\", \"prometheus_app\", \"url\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")",
"range": null,
"shifts": null
},
Expand Down Expand Up @@ -254,7 +254,7 @@
"name": "Points written",
"queries": [
{
"query": "from(bucket: \"monitoring_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_writer_ok_points_sum\")\n |> drop(columns:[\"_measurement\", \"_field\", \"_start\", \"_stop\", \"cluster\", \"path\", \"prometheus_app\", \"url\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")",
"query": "from(bucket: \"monitoring_internal_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_writer_ok_points_sum\")\n |> drop(columns:[\"_measurement\", \"_field\", \"_start\", \"_stop\", \"cluster\", \"path\", \"prometheus_app\", \"url\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")",
"queryConfig": {
"database": "",
"measurement": "",
Expand All @@ -266,7 +266,7 @@
"tags": []
},
"areTagsAccepted": false,
"rawText": "from(bucket: \"monitoring_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_writer_ok_points_sum\")\n |> drop(columns:[\"_measurement\", \"_field\", \"_start\", \"_stop\", \"cluster\", \"path\", \"prometheus_app\", \"url\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")",
"rawText": "from(bucket: \"monitoring_internal_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_writer_ok_points_sum\")\n |> drop(columns:[\"_measurement\", \"_field\", \"_start\", \"_stop\", \"cluster\", \"path\", \"prometheus_app\", \"url\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")",
"range": null,
"shifts": null
},
Expand Down Expand Up @@ -485,7 +485,7 @@
"tempVar": ":databases:",
"values": [
{
"value": "_monitoring",
"value": "monitoring_internal_",
"type": "database",
"selected": true
}
Expand Down Expand Up @@ -513,4 +513,4 @@
"templates": "/chronograf/v1/dashboards/4/templates"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"shape": "chronograf-v2",
"queries": [
{
"text": "from(bucket: \"monitoring_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_writer_ok_points_sum\")\n |> drop(columns:[\"_measurement\", \"_field\", \"_start\", \"_stop\", \"cluster\", \"path\", \"prometheus_app\", \"url\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")",
"text": "from(bucket: \"monitoring_internal_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_writer_ok_points_sum\")\n |> drop(columns:[\"_measurement\", \"_field\", \"_start\", \"_stop\", \"cluster\", \"path\", \"prometheus_app\", \"url\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")",
"editMode": "advanced",
"name": "",
"builderConfig": {
Expand Down Expand Up @@ -239,7 +239,7 @@
"shape": "chronograf-v2",
"queries": [
{
"text": "from(bucket: \"monitoring_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_writer_err_points_sum\" or r[\"_field\"] == \"storage_writer_dropped_points_sum\")\n |> drop(columns:[\"_measurement\", \"_start\", \"_stop\", \"cluster\", \"path\", \"prometheus_app\", \"url\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")",
"text": "from(bucket: \"monitoring_internal_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_writer_err_points_sum\" or r[\"_field\"] == \"storage_writer_dropped_points_sum\")\n |> drop(columns:[\"_measurement\", \"_start\", \"_stop\", \"cluster\", \"path\", \"prometheus_app\", \"url\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")",
"editMode": "advanced",
"name": "",
"builderConfig": {
Expand Down Expand Up @@ -461,7 +461,7 @@
"shape": "chronograf-v2",
"queries": [
{
"text": "bkts=buckets()\n |> rename(columns: {\"id\": \"bucket\", \"name\": \"bucketname\"})\n |> keep(columns: [\"bucket\", \"bucketname\"])\n\nshards=from(bucket: \"monitoring_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_shard_disk_size\")\n |> drop(columns: [\"_measurement\", \"_field\", \"_start\", \"_stop\", \"cluster\", \"engine\", \"id\", \"prometheus_app\", \"url\", \"walPath\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n\njoin(tables: {t1: bkts, t2: shards}, on: [\"bucket\"])\n |> drop(columns: [\"bucket\"])\n |> rename(columns: {\"bucketname\": \"bucket\"})\n |> filter(fn: (r) => r[\"bucket\"] == v.K8s_application)\n |> yield()",
"text": "bkts=buckets()\n |> rename(columns: {\"id\": \"bucket\", \"name\": \"bucketname\"})\n |> keep(columns: [\"bucket\", \"bucketname\"])\n\nshards=from(bucket: \"monitoring_internal_\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"prometheus_influxdb2\")\n |> filter(fn: (r) => r[\"_field\"] == \"storage_shard_disk_size\")\n |> drop(columns: [\"_measurement\", \"_field\", \"_start\", \"_stop\", \"cluster\", \"engine\", \"id\", \"prometheus_app\", \"url\", \"walPath\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n\njoin(tables: {t1: bkts, t2: shards}, on: [\"bucket\"])\n |> drop(columns: [\"bucket\"])\n |> rename(columns: {\"bucketname\": \"bucket\"})\n |> filter(fn: (r) => r[\"bucket\"] == v.K8s_application)\n |> yield()",
"editMode": "advanced",
"name": "",
"builderConfig": {
Expand Down Expand Up @@ -586,4 +586,4 @@
]
},
"labels": []
}
}

0 comments on commit 19cebda

Please sign in to comment.