I have made the following script :
Code: Select all
root@check-back5:~# /usr/lib/nagios/plugins_local/my_check.pl -H 1.2.3.4 -C my_comm -m 'Pattern1|Pattern2|Pattern3' -w 100 -c 50 -f
OK : (>100) - Pattern1: 167 left. Pattern2: 168 left. Pattern3: 131 left. | 'Pattern1'=167 'Pattern2'=168 'Pattern3'=131
root@check-back5:~# /usr/lib/nagios/plugins_local/my_check.pl -H 1.2.3.4 -C my_comm -m 'Pattern1|Pattern2|Pattern3' -w 100 -c 50
OK : (>100) - Pattern1: 167 left. Pattern2: 168 left. Pattern3: 131 left.
I then followed this howto : http://docs.cacti.net/manual:087:3a_adv ... ut_methods, especially the end with "Script with more Output Parameters". I use the script without the "-f" option.
Problem is my graph is totally empty. I'm not sure if it takes my output correctly : does it deal the ":" fine ? what about the "left" in the output ?
How can I check that ?
Thanks in advance for your help
EDIT : I found this in cacti.log :
Code: Select all
03/09/2012 03:50:02 PM - SPINE: Poller[0] Host[2] ERROR: Empty result [1.2.3.4]: '/usr/lib/nagios/plugins_local/my_check.pl -H 1.2.3.4 -C my_comm -m Pattern1|Pattern2|Pattern3 -w 85 -c 90'
03/09/2012 03:50:02 PM - SPINE: Poller[0] Host[2] TH[4] DS[121] SCRIPT: /usr/lib/nagios/plugins_local/my_check.pl -H 1.2.3.4 -C my_comm -m Pattern1|Pattern2|Pattern3 -w 85 -c 90, output: U