Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example Grafana dashboard #47

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,28 @@ docker run --name influxdb-1.8 -p 8086:8086 influxdb:1.8
docker run --name influxdb-2 -p 8086:8086 quay.io/influxdb/influxdb:v2.0.3

```

---

## Importing Example Grafana Dashboard

To help you get started with visualizing your data in Grafana, we have provided an example Grafana dashboard JSON file. You can find this file in the repository as `grafana-dashboard-example.json`.

### Steps to Import the Example Dashboard

1. Open your Grafana instance and log in.
2. Click on the "+" icon in the left sidebar and select "Import".
3. In the "Import via panel json" section, click on "Upload JSON file".
4. Select the `grafana-dashboard-example.json` file from the repository.
5. Click on "Load".
6. In the "Options" section, select the InfluxDB data source you have configured.
7. Click on "Import".

You should now see the example dashboard with panels for visualizing the data pushed to InfluxDB.

### Customizing the Dashboard

Feel free to customize the example dashboard to suit your needs. You can add more panels, change the queries, and adjust the visualizations as required.

For more information on how to use Grafana, refer to the [Grafana documentation](https://grafana.com/docs/).

139 changes: 139 additions & 0 deletions grafana-dashboard-example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"dashboard": {
"id": null,
"title": "Newman InfluxDB Dashboard",
"tags": [],
"timezone": "browser",
"schemaVersion": 16,
"version": 0,
"refresh": "5s",
"panels": [
{
"type": "graph",
"title": "Response Time",
"gridPos": {
"x": 0,
"y": 0,
"w": 24,
"h": 9
},
"targets": [
{
"refId": "A",
"measurement": "api_results",
"groupBy": [
{
"type": "time",
"params": [
"$__interval"
]
}
],
"select": [
[
{
"type": "field",
"params": [
"response_time"
]
},
{
"type": "mean",
"params": []
}
]
],
"resultFormat": "time_series",
"orderByTime": "ASC",
"alias": "Response Time"
}
],
"xaxis": {
"mode": "time",
"show": true
},
"yaxes": [
{
"format": "ms",
"show": true
},
{
"show": true
}
]
},
{
"type": "table",
"title": "Test Results",
"gridPos": {
"x": 0,
"y": 9,
"w": 24,
"h": 9
},
"targets": [
{
"refId": "A",
"measurement": "api_results",
"groupBy": [],
"select": [
[
{
"type": "field",
"params": [
"test_status"
]
}
],
[
{
"type": "field",
"params": [
"request_name"
]
}
],
[
{
"type": "field",
"params": [
"response_time"
]
}
],
[
{
"type": "field",
"params": [
"response_size"
]
}
]
],
"resultFormat": "table",
"orderByTime": "ASC",
"alias": "Test Results"
}
],
"columns": [
{
"text": "Request Name",
"value": "request_name"
},
{
"text": "Status",
"value": "test_status"
},
{
"text": "Response Time",
"value": "response_time"
},
{
"text": "Response Size",
"value": "response_size"
}
]
}
]
}
}