Bash script (as data input) problem

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
cuicui
Posts: 12
Joined: Thu Apr 27, 2006 8:02 am
Contact:

Bash script (as data input) problem

Post by cuicui »

Hi,

I try to monitor the load average of an AIX server, the snmp version on this system doesn't implement LoadAverage OID but i can run a bash script (locally on my cacti server) to get it:

Code: Select all

# bash /opt/apache2/htdocs/cacti/scripts/load_batman.sh
1min:0.14 5min:0.46 15min:0.46
As recommended, i created a new Data Input Method with 3 fields: 1min, 5min and 15min.
http://exon.free.fr/cacti/cacti_01.jpg

Then i created a new data template with the 3 data sources:
http://exon.free.fr/cacti/cacti_02.jpg

After that i made a new data template:
http://exon.free.fr/cacti/cacti_03.jpg

An finally i created a new graph:
http://exon.free.fr/cacti/cacti_04.jpg
http://exon.free.fr/cacti/cacti_05.jpg

But the graph stays flat and i have an error when i launch the poller by hand:

Code: Select all

/opt/php/bin/php /opt/apache2/htdocs/cacti/poller.php
sh: bash/opt/apache-2.0.55/htdocs/cacti/scripts/load_batman.sh: Aucun fichier ou r?pertoire de ce type
OK u:0.00 s:0.00 r:0.03
OK u:0.00 s:0.00 r:0.03
ERROR: Not enough arguments
OK u:0.00 s:0.00 r:0.03
OK u:0.00 s:0.00 r:0.03
OK u:0.00 s:0.00 r:0.03
...
(it says "file not found")

"/opt/apache-2.0.55/htdocs/cacti/scripts/load_batman.sh" exists but it seems that cacti add "bash" just before the path to the script so it looks for "bash/opt/..." which, of course, doesn't exists.

Any help would be welcomed on this one :)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests