Last updated 27th February, 2018
Grafana provides a powerful and elegant way to create, explore, and share dashboards and data with your team and the world. Since release 2.5, Grafana is able to communicate with Elasticsearch and so allow you to mix data from Logs Data Platforms and other data sources like IoT at the same place. This guide will show you how to achieve this.
This is what you need to know to get you started:
- you are already sending logs on a stream you own see the quick start tutorial
- You have ordered the Kibana pack Option or the Alias Option.
- Your have access to the port 9200 to your cluster (head to the About page in manager to know the address of your cluster).
After some training you will be able to create this kind of dashboard:
Select your Stream Alias
To access your logs from Grafana, you will need to setup an Elasticsearch Alias and link them to your Graylog streams, so here we go again :
- Go back to your manager.
- In the alias panel, click on the Add a new alias button
- Choose a name and define a description for your alias
- Save the entry by clicking the floppy disk button
- Once the alias has been created. Use the ... menu at the right and select Link the alias to a Stream option.
- Define there the graylog streams you want to associate to your alias
- That's it.
So here you go, now Logs Data Platform knows what is the stream you want to browse. Now let’s configure Grafana and see if it works!
Setup your own grafana
Get the latest Grafana release here: http://grafana.org/download/ (v4.6.2 2017-11-16 at the time of writing). Here are some direct links for your convenience.
- DEB (Ubuntu / Debian 64 bit)
- RPM (Fedora / RHEL 64 bit)
- Binary TAR (Linux 64 bit)
- Binary ZIP (Windows 64 bit)
Then follow the Grafana installation guide according your platform: http://docs.grafana.org/installation/
If everything is setup properly, launch your favorite browser, and point it to http://localhost:3000 Once logged in with your grafana credentials, reach data sources panel to setup your Logs Data Platforms datasource:
To make the magic happens, please ensure to:
https://<your_cluster>.logs.ovh.com:9200as Url value
- Set your Logs Data Platforms credentials for Basic auth values
- Set your Logs Data Platforms alias name as Grafana Index name value
- Change default Time field name to timestamp
- Set 5.x as Elasticsearch version
- Register your data source and test it.
Now let's add a simple counter of your logs to a new dashboard.
- On dashboard page, click on the green left button and select Add panel => Singlestat
- On the bottom right, select your datasource.
- That's it :)
If you want to know what you can do with Grafana and Elasticsearch, you can fly to the official documentation or to this very good resource: How to effectively use the Elasticsearch data source in Grafana and solutions to common pitfalls
- Join our community of users on https://community.ovh.com/en/
- Getting Started: Quick Start
- Documentation: Guides
- Community hub: https://community.ovh.com
- Mailing List: email@example.com
- Create an account: Try it free!