Graphite and FreeNAS¶
If you want to export your FreeNAS2 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 InfluxDB1 to collect graphite stats, so I’ll use that.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
root@monitoring:~ # influx Connected to http://localhost:8086 version 1.8.0 InfluxDB shell version: 1.8.0 > show databases name: databases name ---- graphite _internal > use graphite Using database graphite > show series key --- servers.freenas1_cmhome.aggregation-cpu-average.percent-idle servers.freenas1_cmhome.aggregation-cpu-average.percent-interrupt servers.freenas1_cmhome.aggregation-cpu-average.percent-nice servers.freenas1_cmhome.aggregation-cpu-average.percent-system servers.freenas1_cmhome.aggregation-cpu-average.percent-user servers.freenas1_cmhome.aggregation-cpu-sum.percent-idle servers.freenas1_cmhome.aggregation-cpu-sum.percent-interrupt servers.freenas1_cmhome.aggregation-cpu-sum.percent-nice servers.freenas1_cmhome.aggregation-cpu-sum.percent-system servers.freenas1_cmhome.aggregation-cpu-sum.percent-user ... > select * from "servers.freenas1_cmhome.aggregation-cpu-average.percent-idle" limit 2 name: servers.freenas1_cmhome.aggregation-cpu-average.percent-idle time value ---- ----- 1595976499000000000 96.5330779740442 1595976519000000000 96.6526591091007 >
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.
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¶
So what do you think? Leave your comments below.