Skip to content

Commit

Permalink
Merge pull request #8 from dbrennand/configure-time-period
Browse files Browse the repository at this point in the history
refactor: make time range configurable using Grafana time picker
  • Loading branch information
dbrennand authored Aug 7, 2023
2 parents 19abb2c + bb0fa8b commit 4278587
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions grafana-config/dashboards/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"measurement": "internet_speed",
"orderByTime": "ASC",
"policy": "default",
"query": "from(bucket: \"internet_speed\")\n |> range(start: -1h)\n |> filter(fn: (r) => \n r._measurement == \"internet_speed\" and\n r._field == \"upload\"\n )\n |> drop(columns: [\"server_name\", \"server_url\"])",
"query": "from(bucket: \"internet_speed\")\n |> range(start: ${__from:date:iso})\n |> filter(fn: (r) => \n r._measurement == \"internet_speed\" and\n r._field == \"upload\"\n )\n |> drop(columns: [\"server_name\", \"server_url\"])",
"refId": "A",
"resultFormat": "time_series",
"select": [
Expand Down Expand Up @@ -198,7 +198,7 @@
"uid": "P5697886F9CA74929"
},
"hide": false,
"query": "from(bucket: \"internet_speed\")\n |> range(start: -1h)\n |> filter(fn: (r) => \n r._measurement == \"internet_speed\" and\n r._field == \"download\"\n )\n |> drop(columns: [\"server_name\", \"server_url\"])",
"query": "from(bucket: \"internet_speed\")\n |> range(start: ${__from:date:iso})\n |> filter(fn: (r) => \n r._measurement == \"internet_speed\" and\n r._field == \"download\"\n )\n |> drop(columns: [\"server_name\", \"server_url\"])",
"refId": "B"
}
],
Expand Down Expand Up @@ -333,7 +333,7 @@
"measurement": "internet_speed",
"orderByTime": "ASC",
"policy": "default",
"query": "from(bucket: \"internet_speed\")\n |> range(start: -1h)\n |> filter(fn: (r) => \n r._measurement == \"internet_speed\" and\n r._field == \"bytes_sent\"\n )\n |> drop(columns: [\"server_name\", \"server_url\"])",
"query": "from(bucket: \"internet_speed\")\n |> range(start: ${__from:date:iso})\n |> filter(fn: (r) => \n r._measurement == \"internet_speed\" and\n r._field == \"bytes_sent\"\n )\n |> drop(columns: [\"server_name\", \"server_url\"])",
"refId": "A",
"resultFormat": "time_series",
"select": [
Expand Down Expand Up @@ -382,7 +382,7 @@
"uid": "P5697886F9CA74929"
},
"hide": false,
"query": "from(bucket: \"internet_speed\")\n |> range(start: -1h)\n |> filter(fn: (r) => \n r._measurement == \"internet_speed\" and\n r._field == \"bytes_received\"\n )\n |> drop(columns: [\"server_name\", \"server_url\"])",
"query": "from(bucket: \"internet_speed\")\n |> range(start: ${__from:date:iso})\n |> filter(fn: (r) => \n r._measurement == \"internet_speed\" and\n r._field == \"bytes_received\"\n )\n |> drop(columns: [\"server_name\", \"server_url\"])",
"refId": "B"
}
],
Expand Down Expand Up @@ -516,7 +516,7 @@
"measurement": "internet_speed",
"orderByTime": "ASC",
"policy": "default",
"query": "from(bucket: \"internet_speed\")\n |> range(start: -1h)\n |> filter(fn: (r) => \n r._measurement == \"internet_speed\" and\n r._field == \"ping\"\n )\n |> drop(columns: [\"server_name\", \"server_url\"])",
"query": "from(bucket: \"internet_speed\")\n |> range(start: ${__from:date:iso})\n |> filter(fn: (r) => \n r._measurement == \"internet_speed\" and\n r._field == \"ping\"\n )\n |> drop(columns: [\"server_name\", \"server_url\"])",
"refId": "A",
"resultFormat": "time_series",
"select": [
Expand Down Expand Up @@ -565,7 +565,7 @@
"uid": "P5697886F9CA74929"
},
"hide": false,
"query": "from(bucket: \"internet_speed\")\n |> range(start: -1h)\n |> filter(fn: (r) => \n r._measurement == \"internet_speed\" and\n r._field == \"jitter\"\n )\n |> drop(columns: [\"server_name\", \"server_url\"])",
"query": "from(bucket: \"internet_speed\")\n |> range(start: ${__from:date:iso})\n |> filter(fn: (r) => \n r._measurement == \"internet_speed\" and\n r._field == \"jitter\"\n )\n |> drop(columns: [\"server_name\", \"server_url\"])",
"refId": "B"
}
],
Expand Down Expand Up @@ -769,7 +769,7 @@
],
"orderByTime": "ASC",
"policy": "default",
"query": "from(bucket: \"internet_speed\")\n |> range(start: -1h)\n |> filter(fn: (r) => r._measurement == \"internet_speed\")",
"query": "from(bucket: \"internet_speed\")\n |> range(start: ${__from:date:iso})\n |> filter(fn: (r) => r._measurement == \"internet_speed\")",
"rawQuery": true,
"refId": "A",
"resultFormat": "table",
Expand Down Expand Up @@ -847,7 +847,7 @@
"to": "now"
},
"timepicker": {
"hidden": true,
"hidden": false,
"refresh_intervals": [
"5s",
"10s",
Expand All @@ -864,6 +864,6 @@
"timezone": "",
"title": "Speedtest Results",
"uid": "ll6ARVfGk",
"version": 2,
"version": 3,
"weekStart": ""
}

0 comments on commit 4278587

Please sign in to comment.