Graphite Data Frequency

paddy01

Dabbler
Joined
Sep 18, 2013
Messages
19
Hi,

I am running latest RC22.02 and all is well however I have a query around the sending of reporting data to Graphite. I have it enabled and working sending data to InfluxDB however when graphing in Grafana the data points appear quite far apart.

Does anyone know how frequently TrueNas sends the data points e.g. every 10 seconds etc? And can this be configured anywhere?

I might change to collecting via SNMP as it makes things like network graphs look a bit dodgy :)

Cheers
 
Joined
Sep 13, 2022
Messages
3
pretty old, but I saw no one answered this and i'm testing it myself.

i'm still pretty new to truenas, but from what I can tell it is using collectd for metrics gathering.
Code:
/etc/local/rc.d/collectd
/etc/local/collectd.conf
/usr/local/lib/python3.9/site-packages/middlewared/etc_files/local/collectd.conf

By default, collectd gathers metrics every 10 seconds.

you can adjust this within the collectd.conf file, but you'll have to delete all your RRD files. an easy way to do this is change the value of your graph points in the UI and save.

within collectd.conf you'll see the LoadPlugin lines with no options. from collectd version 4.9+, you can specify a LoadPlugin block with additional options. determine your version by executing
Code:
collectdctl -h

Code:
root@freenas[~]# /usr/local/bin/collectdctl -h | grep -e "^collectd"
collectd 5.11.0.git, http://collectd.org/


Before we can modify collectd.conf with a new collection interval, we need to understand how its setup in freenas. collectd loads
Code:
/etc/local/collectd.conf
, BUT that file is controlled by and modified by
Code:
/usr/local/lib/python3.9/site-packages/middlewared/etc_files/local/collectd.conf
, so that is the real file you need to change.
Code:
root@freenas[~]# vim /usr/local/lib/python3.9/site-packages/middlewared/etc_files/local/collectd.conf

Code:
<LoadPlugin interface>
  Interval 1
</LoadPlugin>


Now go change the graphpoints in the UI to clear the RRD files

and you can also restart the collectd service if you want
Code:
root@freenas[~]# service collectd onestatus
collectd is running as pid 97144.
root@freenas[~]# service collectd onerestart
Stopping collectd.
Starting collectd.
 
Top