With the release of Collectl Version 3.6.1, you can now send collectl data directly to graphite . For existing collectl users this now provides you with yet another way to store/plot collectl data, whether on a single system or hundreds. For graphite users who are not yet collectl users, you now have access to literally hundreds of performance metrics:
You use this export like any other, the only required option being the address to send the data to as in the following example:
collectl --export graphite,192.168.1.113
collectl --export graphite,h usage: --export=graphite,host[:port][,options] where each option is separated by a comma, noting some take args themselves b=string preface each variable name with string co only reports changes since last reported value d=mask debugging options, see beginning of graphite.ph for details f use fqdn instead of simple hostname for statistics naming h print this help and exit i=seconds reporting interval, must be multiple of collect's -i p=text insert this text right after hostname, including '.' if you want one s=subsys only report subsystems, must be a subset of collectl's -s ttl=num if data hasn't changed for this many intervals, report it only used with 'co', def=5 min report minimal value since last report max report maximum value since last report avg report average of values since last report
ls /opt/graphite/storage/whisper/poker cpuload cputotals ctxint disktotals nettotals
collectl --export graphite,192.168.1.113,d=1,s=dn -rawtoo -f /var/log/collectl poker.disktotals.reads 0 1325609789 poker.disktotals.readkbs 0 1325609789 poker.disktotals.writes 0 1325609789 poker.disktotals.writekbs 0 1325609789 poker.nettotals.kbin 0 1325609789 poker.nettotals.pktin 1 1325609789 poker.nettotals.kbout 0 1325609789 poker.nettotals.pktout 0 1325609789
Once you're happy with the switch settings, be sure to update the DaemonCommands in /etc/collectl.conf and restart the collectl daemon to make them take effect.
Collectl will attempt to establish a TCP connection to the specified address/port, noting the default port is 2003. If that connection cannot be established, collectl will report an error but not exit! This is because graphite itself may be down and need to be restarted.
collectl --export graphite,192.168.1.113,d=1,s=dn Could not create socket to 192.168.1.113:2003. Reason: Connection refused
updated November 9, 2012 |