Graphite and FreeNAS

If you want to export your FreeNAS1 reporting information to some kind of monitor/collector, graphite is how its done.

FreeNAS has this ability baked in. It used to be under System -> Advanced, now its under System -> Reporting. The only thing you need to do is plug in the IP of your graphite endpoint (it uses the default port, not configurable).

Checking our work

Now you need to go to your endpoint where the data is being collected. Previously, I setup an InfluxDB2 to collect graphite stats, so I’ll use that.

 1root@monitoring:~ # influx
 2Connected to http://localhost:8086 version 1.8.0
 3InfluxDB shell version: 1.8.0
 4> show databases
 5name: databases
 6name
 7----
 8graphite
 9_internal
10> use graphite
11Using database graphite
12> show series
13key
14---
15servers.freenas1_cmhome.aggregation-cpu-average.percent-idle
16servers.freenas1_cmhome.aggregation-cpu-average.percent-interrupt
17servers.freenas1_cmhome.aggregation-cpu-average.percent-nice
18servers.freenas1_cmhome.aggregation-cpu-average.percent-system
19servers.freenas1_cmhome.aggregation-cpu-average.percent-user
20servers.freenas1_cmhome.aggregation-cpu-sum.percent-idle
21servers.freenas1_cmhome.aggregation-cpu-sum.percent-interrupt
22servers.freenas1_cmhome.aggregation-cpu-sum.percent-nice
23servers.freenas1_cmhome.aggregation-cpu-sum.percent-system
24servers.freenas1_cmhome.aggregation-cpu-sum.percent-user
25...
26> select * from "servers.freenas1_cmhome.aggregation-cpu-average.percent-idle" limit 2
27name: servers.freenas1_cmhome.aggregation-cpu-average.percent-idle
28time                value
29----                -----
301595976499000000000 96.5330779740442
311595976519000000000 96.6526591091007
32>

We can see that FreeNAS is exporting the data to InfluxDB and its being stored as series. We can then see that there is in fact data being stored in the series. I’ve limited the output to 2 for readability.

Conclusion

You now have data being exported from FreeNAS and being stored in InfluxDB. Next up, we need a way to visualize the data we’re collecting.

Footnotes and References


  1. FreeNAS Documentation  ↩︎

  2. InfluxDB Documentation  ↩︎

Copyright

Comments