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
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.
By design, collectl calls the export module as soon as the required data has been collected and collection is synchronized to the nearest milli-seconds across a cluster, this means all instances of collectl will send their data to graphite at almost exactly the same time. This high burst of data can overwhelm graphite and so to reduce the load when that is found to be a problem, OR if you just want to smooth out the load you can use r=seconds which literally means delay sending your data to ganglia by a random number of micro-seconds <= seconds.
There is an additional caveat and that is that this stall must have completed by the end of the current data collection periods and so you're restricted to a maximum delay of the interval less 1 second. This means if you run collectl with -i1, you can't use -r. However, since most users run collectl with intervals of 5 or 10 seconds, values of 4 or 9 should be more than sufficient. And if you choose a collection interval of 30 seconds you may still want to use a value of r closer to 5 or 10 seconds so that the data will arrive at graphite reasonablly close together.
For help with what other valid switches are, you can actually get the graphite module itself to tell you like this:
collectl --export graphite,h
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|