[collectd] Differential data for if_octets

Pawel Akonom pawel.akonom at vnomic.com
Tue Jan 19 23:13:24 CET 2016


I am trying to visualize some system metrics on grafana. Metrics are 
sent from CollectD to Logstash, then from Logstash to Elasticsearch and 
from Elasticsearch to Grafana. The problem is rx tx if_octets and 
if_packets metric is growing all the time. I would like to see 
differential metric on the graph - how many octets or packets was send 
and received in last 10 seconds.

I am using collectd 5.5 on CentOS 6.7 and I have compiled it from source 
code. In /usr/share/collectd/types.db if_packets and if_octets are set 
to DERIVE. As I understand from wiki page 
https://collectd.org/wiki/index.php/Data_source this data should be sent 
as a change from the last time:

[root at hdptest-mster2 collectd-5.5.0]# grep if_packets 
if_packets              rx:DERIVE:0:U, tx:DERIVE:0:U
[root at hdptest-mster2 collectd-5.5.0]# grep if_octets 
if_octets               rx:DERIVE:0:U, tx:DERIVE:0:U

Here is my configuration file:

[root at hdptest-mster2 collectd-5.5.0]# egrep -v ^#.* /etc/collectd.conf | 
sed '/^$/d'
Hostname    "ACI_184_vora2_Master_MT2"
TypesDB     "/usr/share/collectd/types.db"
LoadPlugin cpu
LoadPlugin df
LoadPlugin disk
LoadPlugin exec
LoadPlugin interface
LoadPlugin load
LoadPlugin memory
LoadPlugin network
<Plugin cpu>
   ReportByCpu true
   ReportByState true
   ValuesPercentage true
<Plugin df>
         Device "/dev/sda1"
         Device "/dev/sdb1"
         FSType "ext4"
         ValuesPercentage true
<Plugin disk>
         Disk "/^sd[a-b]?$/"
         IgnoreSelected false
<Plugin interface>
         Interface "eth0"
         IgnoreSelected false
<Plugin memory>
         ValuesAbsolute true
         ValuesPercentage false
<Plugin network>
         <Server "" "25826">
         <Server "" "25826">

This is a sample of raw data sent to logstash from this host:

[root at hdptest-elk logstash]# tail -f logstash-rawdata.log | grep MT2 | 
grep if_octets

It looks like data are sent as a GAUGE value instead of DERIVE. What I 
am doing wrong? How can I configure CollectD to send differential 
statistics for the interfaces?

Best Regards,

More information about the collectd mailing list