This plugin is a copy of the Elasticsearch datasource with custom headers.
At the time of release, custom headers for http datasources have not been merged to the Grafana project. This is a temporary solution until the custom headers are pulled into Grafana.
To complete this procedure, you'll need:
- Write access to your Grafana server
- Logz.io API access
-
Fork or clone the grafana-logzio-datasource repository from GitHub.
-
Copy
grafana-logzio-datasource/dist/
to the Grafana server atvar/lib/grafana/plugins/<folder_name>/
. It doesn't matter what you name<folder_name>
. -
Restart Grafana.
-
In Grafana, open your Configuration, and click Add data source.
-
Enter these settings:
Section | Field name | Value |
---|---|---|
Name | Custom data source name (This is the Data Source you'll use for your Grafana graphs.) | |
Type | Logz.io | |
HTTP | URL | https://api.logz.io/v1/elasticsearch |
Custom Headers | Key | X-API-TOKEN |
Value | Your Logz.io API token | |
Elasticsearch details | Index name | Custom name |
Time field name | @timestamp |
When you're done, click Save & Test. If the test passes, you can now use Logz.io as a data source.
To use Logz.io as a data source, select a Logz.io source from the Data Source list in any Grafana graph. (This is the Custom data source name that you set in step 5.)