I've ran through the Cacti manual's section on debugging but still can't figure it out: http://www.cacti.net/downloads/docs/html/debugging.html
From the log:
Code: Select all
08/09/2014 03:45:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/rra/localhost_ext_temp_48.rrd --template ext_temp 1407624302:U
08/09/2014 03:45:02 PM - CMDPHP: Poller[0] Host[1] DS[48] CMD: /usr/share/cacti/scripts/read_pi_temp.sh, output: U
08/09/2014 03:45:02 PM - CMDPHP: Poller[0] Host[1] DS[48] WARNING: Result from CMD not valid. Partial Result: U
Code: Select all
<path_cacti>/scripts/read_pi_temp.sh
Code: Select all
#!/bin/bash
/bin/cat /tmp/pi_temperature
Code: Select all
[root@cacti scripts]# su - cacti /var/lib/cacti/scripts/read_pi_temp.sh
26437
Code: Select all
[root@cacti scripts]# php -q /usr/share/cacti/cmd.php 1 1
08/09/2014 03:57:40 PM - CMDPHP: Poller[0] Host[1] DS[48] CMD: /usr/share/cacti/scripts/read_pi_temp.sh, output: 26562
I've also rebuilt poller cache but that hasn't fixed it either.
I have a similar Data Input Method that runs a script to return virtual memory size from PS and that works fine, but it's not using 'cat', just grepping on the output of /bin/ps. So is cat the problem? I'm somewhat new to linux, when poller runs as the cacti user, is there no stdout for the output of cat to go to? Is there a better way to read the contents of that file?
Thank you!