Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
ICMP ping works great now, but I'm getting the following errors in the system log:
04/06/2010 03:25:05 PM - SPINE: Poller[0] Host[25] ERROR: Empty result [192.168.2.200]: 'perl /usr/share/cacti/scripts/linux_memory.pl MemFree:'
04/06/2010 03:25:05 PM - SPINE: Poller[0] Host[25] ERROR: Empty result [192.168.2.200]: 'perl /usr/share/cacti/scripts/linux_memory.pl SwapFree:'
04/06/2010 03:25:05 PM - SPINE: Poller[0] Host[25] ERROR: Empty result [192.168.2.200]: 'perl /usr/share/cacti/scripts/loadavg_multi.pl'
04/06/2010 03:25:05 PM - SPINE: Poller[0] Host[25] ERROR: Empty result [192.168.2.200]: 'perl /usr/share/cacti/scripts/unix_users.pl '
04/06/2010 03:25:05 PM - SPINE: Poller[0] Host[25] ERROR: Empty result [192.168.2.200]: 'perl /usr/share/cacti/scripts/unix_processes.pl'
04/06/2010 03:25:05 PM - SPINE: Poller[0] Host[25] ERROR: Empty result [192.168.2.200]: 'perl /usr/share/cacti/scripts/query_unix_partitions.pl get used /dev/sda1'
04/06/2010 03:25:05 PM - SPINE: Poller[0] Host[25] ERROR: Empty result [192.168.2.200]: 'perl /usr/share/cacti/scripts/query_unix_partitions.pl get available /dev/sda1'
04/06/2010 03:25:05 PM - SPINE: Poller[0] Host[23] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/scripts/query_unix_partitions.pl get used /dev/sda1'
04/06/2010 03:25:05 PM - SPINE: Poller[0] Host[23] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/scripts/query_unix_partitions.pl get available /dev/sda1'
04/06/2010 03:25:05 PM - SPINE: Poller[0] Host[23] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/scripts/unix_processes.pl'
04/06/2010 03:25:05 PM - SPINE: Poller[0] Host[23] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/scripts/unix_users.pl '
04/06/2010 03:25:05 PM - SPINE: Poller[0] Host[23] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/scripts/loadavg_multi.pl'
04/06/2010 03:25:05 PM - SPINE: Poller[0] Host[23] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/scripts/linux_memory.pl SwapFree:'
04/06/2010 03:25:05 PM - SPINE: Poller[0] Host[23] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/scripts/linux_memory.pl MemFree:'
These two hosts are the only devices I currently monitor with these perl scripts. If I set cactid back to run without root privileges the problem goes away and these graphs start getting data as normal. I've searched the forums up and down but the only thing I could find hint of that might be the problem is that cactid needs the full path to perl input somewhere, but I couldn't figure out where to do this. Besides, why would cactid poll fine as a non root if that was the issue? Any help is appreciated.
-Bell
phalek, I was sure that your idea was going to fix it, but I used apt to install perl-suid and the problem still persists.
A new piece of information, I went into Data Input Methods and changed the Input string for Unix - Get Load Average to be: /usr/bin/perl <path_cacti>/scripts/loadavg_multi.pl
Doing this caused this error to appear in the system log:
04/07/2010 01:41:42 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1064', SQL:"select xml_path from snmp_query where id="
Then when the poller tries to run I get basically the same error as before, but with the full path:
I just tried running cactid manually from the command line with debug logging on and everything worked fine.... I don't get it. If it was a PATH or permissions problem then I would get the same error from the command line.
Here is the output to the log:
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: MYSQL Free & Close Completed
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: Allocated Variable Memory Freed
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: PHP Script Server Pipes Closed
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: Thread Cleanup Complete
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The Value of Active Threads is 0
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] DS[299] SCRIPT: perl /usr/share/cacti/scripts/query_unix_partitions.pl get used /dev/sda1, output: 1726344
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] DEBUG: The NIFTY POPEN returned the following File Descriptor 6
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] DS[299] SCRIPT: perl /usr/share/cacti/scripts/query_unix_partitions.pl get available /dev/sda1, output: 17162264
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] DEBUG: The NIFTY POPEN returned the following File Descriptor 6
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] DS[298] SCRIPT: perl /usr/share/cacti/scripts/unix_processes.pl, output: 77
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] DEBUG: The NIFTY POPEN returned the following File Descriptor 6
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] DS[297] SCRIPT: perl /usr/share/cacti/scripts/unix_users.pl , output: 1
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] DEBUG: The NIFTY POPEN returned the following File Descriptor 6
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] DS[296] SCRIPT: perl /usr/share/cacti/scripts/loadavg_multi.pl, output: 1min:0.02 5min:0.02 10min:0.00
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] DEBUG: The NIFTY POPEN returned the following File Descriptor 6
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] DS[295] SCRIPT: perl /usr/share/cacti/scripts/linux_memory.pl SwapFree:, output: 915664
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] DEBUG: The NIFTY POPEN returned the following File Descriptor 6
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] DS[294] SCRIPT: perl /usr/share/cacti/scripts/linux_memory.pl MemFree:, output: 783420
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] DEBUG: The NIFTY POPEN returned the following File Descriptor 6
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] NOTE: There are '7' Polling Items for this Host
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] RECACHE: Processing 1 items in the auto reindex cache for '127.0.0.1'
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] SNMP Result: Host responded to SNMP
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] PING Result: ICMP: Host is Alive
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[23] DEBUG: ICMP Host Alive, Try Count:1, Time:0.1010 ms
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The Value of Active Threads is 1
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: Valid Thread to be Created
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: In Poller, About to Start Polling of Host
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The Value of Active Threads is 0
04/07/2010 03:21:26 PM - SPINE: Poller[0] Host[0] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The Value of Active Threads is 1
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: Valid Thread to be Created
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: In Poller, About to Start Polling of Host
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: Initial Value of Active Threads is 0
04/07/2010 03:21:26 PM - SPINE: Poller[0] SPINE: Initializing PHP Script Server(s)
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: SNMP Library Version is 5.4.1
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: SNMP Header Version is 5.4.1
04/07/2010 03:21:26 PM - SPINE: Poller[0] SPINE: Initializing Net-SNMP API
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: MySQL is Thread Safe!
04/07/2010 03:21:26 PM - SPINE: Poller[0] Version 0.8.7e starting
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The Maximum SNMP OID Get Size is 1
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The PHP Script Server is Not Required
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: StartHost='23', EndHost='23', TotalPHPScripts='0'
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The number of php script servers to run is 1
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The script timeout is 25
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The number of concurrent processes is 1
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The polling interval is 300 seconds
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The threads variable is 1
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The log_pstats variable is 0
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The boost_redirect variable is 0
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The log_pwarn variable is 0
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The log_perror variable is 1
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The snmp_retries variable is 3
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The ping_timeout variable is 400
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The ping_retries variable is 1
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The ping_method variable is 1
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The ping_failure_count variable is 3
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The ping_recovery_count variable is 3
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The availability_method variable is 1
04/07/2010 03:21:26 PM - SPINE: Poller[0] DEBUG: The path_php variable is /usr/bin/php
I found a solution, but I'm not sure how happy I am with it. If I run poller.php with the root user instead of the www-data user everything works fine. It must be a permissions issue somewhere, but heck if I can find it.
I'm pretty sure that the user you use doesn't matter as long as that user has write permissions to the rra and log directories. I never even made a linux cacti user, only a mysql cacti user. Maybe I am mistaken?