Graphing performance with CollectD InfluxDB Grafana
WITH COLLECTD, INFLUXDB
COMPANION DECK TO ARTICLE AT
SOURCE CODE AT:
Let’s first check that InfluxDB and Grafana are running without any
issues, you should see screens like below:
InfluxDB at http://192.168.17.99:8083/
Grafana at http://192.168.17.99:3000
If you have not changed default settings and
Vagrant was able to assign these Ips on your
Let’s play around with InfluxDB a bit…
“show series” command will show you different kind
of series that are available in this DB.
We selected cpu_value series for last 3 hours and it
shows data and attributes for the criteria
There are lots of things we can do with a time series DB but we won’t go in those details in this
tutorial. Checkout folllwing links to explore schema and data in the DB:
Getting into Grafana..
Login to Grafana UI with admin/admin as
username/password, you will see a dark
theme, if you want to change to light
theme (Which I prefer) then follow
instructions below else move to next slide.
1) Click on Grafana Icon on left hand side
2) Click on use icon in menu that opens
(You won’t see name first time)
3) Then in profile update your name and
UI theme as per preference.
Getting to data source
Now let’s configure a data source for
Grafana to pull data from
1) Click on “Data Sources” and Add new
2) I choose DB name as CollectD –
because dashboards I am going to
import have same name configured –
hence will work seamlessly
3) InfluxDB is listening on 8086 for API
requests. Provide admin/password as
4) After saving data source – you can test
it with test connection – and if it shows
green, we are good to go to next step.
Importing some dashboards
1) Click on “HOME” tab on homepage of Grafana and
hit import. Import one of JSON files from templates
2) On left hand side you can see imported two
dashboards – Machine health charts and Load
3) But importing readymade charts is not much fun.
Creating from scratch would be more interesting.
So let’s do that next….
Creating some dashboards
1) Create “New” from home
button. In blank page you
see – click on row menu
icon (Three bars) on left
hand side and add a
2) In metrices tab, As soon as you select “CollectD” DB in
dropdown below – the query box will populate
3) Now box next to FROM and it will show all series that
are available. And we can add a filter using WHERE –
again you will see all possible filters available to this data.
Finally we leave select – meain() and group by as defaults.
You will notice the graph above populates as soon as you
change query. You can also see query by clicking on menu
on right hand side. There are plenty of things to explorec-
but this is a good start!