layout | title | categories | author | lang |
---|---|---|---|---|
post |
Using Grafana with PaaS Logs |
Logs |
Pierre De Paepe |
en |
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 PaaS Logs and other data sources like IoT at the same place.
This is what you need to know to get you started :
- you already sending logs on a stream you own see the quick start tutorial
- your web server can reach https://laas.runabove.com:9200.
After some training you will be able to do this kind of Dashboard :
#1 Setup 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 :
- Sign in on https://www.runabove.com, PaaS Logs lab section (skip this step if you are already in ;-)
- On alias zone, click on blue + button
- Choose a name, define a description
- Save the entry
- Once status marked as OK (refresh page if necessary) click on Associate link
- Define there the graylog streams you want to associate to your alias
- That's it.
So here you have, now PaaS Logs knows what is the streams you wnat to browse. Now let's configure Grafana and see if it works !
#2 Setup your own grafana
Get last Grafana release here: http://grafana.org/download/ (v3.0.0-beta2 - 2016-04-04 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/
#3 Launch it !
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 PaaS Logs datasource:
To make magic happens, please ensure to:
- Set https://laas.runabove.com:9200 as Url value
- Set your PaaS Logs credentials for Basic auth values
- Set your PaaS Logs alias name as Grafana Index name value
- Change default Time field name to timestamp
- Set 1.x as Elasticsearch version
Register your data source and test it.
#4 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
#Getting Help
- Getting Started : Quick Start
- Documentation : Guides
- Mailing List : [email protected]
- Visit our community: community.runabove.com
- Create an account: PaaS Logs Beta