graph exim mail count on cacti

this was a tough thing as i failed to configure exim to publish via SNMP

i have setup a cronjob to run below command

*/1 * * * * echo “exim_queue:$(/usr/sbin/exim -bpc)” > /tmp/exim_stat

Then i got cacti to graph the exim stat  as data input method – script

ssh -q -x user@host.com  “cat /tmp/exim_stat”