[SOLVED] Script returns value in debug but not in cron

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
spdrmonkey
Posts: 9
Joined: Tue Aug 30, 2005 9:44 am

[SOLVED] Script returns value in debug but not in cron

Post by spdrmonkey »

I have a fully updated system running cacti 0.8.7b-r2 (from gentoo ebuild) and spine 0.8.7a (also from gentoo ebuild). This system works properly except for my newest custom temperature monitor. When using either cmp.php or spine when run from cron the log shows:

(with spine)
09/09/2008 09:50:02 AM - SPINE: Poller[0] Host[1] DS[121] WARNING: Result from SCRIPT not valid. Partial Result: ...
09/09/2008 09:50:02 AM - SPINE: Poller[0] Host[1] DS[121] SCRIPT: /usr/bin/perl /var/www/localhost/htdocs/cacti/scripts/query_temperature.pl Localhost get temp 1, output: U
09/09/2008 09:50:02 AM - SPINE: Poller[0] Host[1] DS[122] WARNING: Result from SCRIPT not valid. Partial Result: ...
09/09/2008 09:50:02 AM - SPINE: Poller[0] Host[1] DS[122] SCRIPT: /usr/bin/perl /var/www/localhost/htdocs/cacti/scripts/query_temperature.pl Localhost get temp 2, output: U

(with cmd.php)
09/09/2008 10:20:02 AM - CMDPHP: Poller[0] Host[1] DS[121] WARNING: Result from CMD not valid. Partial Result:
09/09/2008 10:20:02 AM - CMDPHP: Poller[0] Host[1] DS[121] CMD: /usr/bin/perl /var/www/localhost/htdocs/cacti/scripts/query_temperature.pl Localhost get temp 1, output: U
09/09/2008 10:20:02 AM - CMDPHP: Poller[0] Host[1] DS[122] WARNING: Result from CMD not valid. Partial Result:
09/09/2008 10:20:02 AM - CMDPHP: Poller[0] Host[1] DS[122] CMD: /usr/bin/perl /var/www/localhost/htdocs/cacti/scripts/query_temperature.pl Localhost get temp 2, output: U


However, if I run spine from the command line as so:
cacti4 / # spine --verbosity=5 1 1
SPINE: Using spine config file [/etc/spine.conf]
<snip>
09/09/2008 10:24:02 AM - SPINE: Poller[0] Host[1] DEBUG: The POPEN returned the following File Descriptor 7
09/09/2008 10:24:03 AM - SPINE: Poller[0] Host[1] DS[121] SCRIPT: /usr/bin/perl /var/www/localhost/htdocs/cacti/scripts/query_temperature.pl Localhost get temp 1, output: 72.725
09/09/2008 10:24:03 AM - SPINE: Poller[0] Host[1] DEBUG: The POPEN returned the following File Descriptor 7
09/09/2008 10:24:04 AM - SPINE: Poller[0] Host[1] DS[122] SCRIPT: /usr/bin/perl /var/www/localhost/htdocs/cacti/scripts/query_temperature.pl Localhost get temp 2, output: 78.0125
<snip>

Everything appears to work. I am at a loss, I have tried to change the way my script responds and there is no change. This host monitors 7 other hosts and uses other custom templates with no problems.

Any help is greatly appreciated, if you need further information I will happily provide it.

-Zac
Last edited by spdrmonkey on Tue Sep 09, 2008 12:49 pm, edited 1 time in total.
spdrmonkey
Posts: 9
Joined: Tue Aug 30, 2005 9:44 am

[SOLVED] Script returns value in debug but not in cron

Post by spdrmonkey »

Chalk this up to bad user permissions, this script was accessing a fuse file system, which even though has permissions of 755 across the board, you must pass extra options at mount time to allow other users to access. Sorry to bother the board.

-Zac
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest