cmh
Explorer
- Joined
- Jan 7, 2013
- Messages
- 75
We're running several FreeNAS servers, and just picked up two TrueNAS units for our backups. Looking at the Reporting page I noticed it's just RRD stuff, so I investigated and discovered it's collectd. We've got a graphite server we use very heavily for gathering metrics, and since the metrics are already being gathered, couldn't help but think that it'd pretty much rock to get that RRD data into Graphite. A wee bit of searching uncovered the write_graphite plugin to collectd, but awww, it's not included in FreeNAS (/usr/local/lib/collectd) No problems, fire up a jail, install collectd, find the write_graphite plugin files, copy them over to the FreeNAS directory. Add the relevant lines to /etc/local/collectd.conf, reload collectd, life is good.
Ran into some issues, however:
Ran into some issues, however:
- Everyone logging to the graphite host as "localhost" won't do much good. Changed hostname in collectd.conf to the server hostname, but this broke the graphs on the reporting page. Simple fix - move the old "localhost" dir in /var/db/collectd/rrd to something else, and symlink the newly created "hostname" directory in there to "localhost". Everyone's happy.
- Bigger problem that skilled FreeNAS folks already guessed - editing /etc/local/collectd.conf gets steamrolled, and the graphite changes to the file get lost. So I look at /conf/base/etc/local/collectd.conf - but it's a completely different file, it's the same as the sample one that's shipped with collectd on the jail.
- Of course, an upgrade to FreeNAS would very likely hammer the write_graphite plugin files in /usr/local/lib/collectd. Could be restored from the jail again, but that's a bit hackish.