I'm a bit of a Cacti newb so apologies if I don't give all of the needed information. I'm trying to get my head around plotting the output of a script -- I believe I have things in Cacti set up properly but when I watch the Cacti log I see
Code: Select all
07/12/2011 09:40:02 AM - SPINE: Poller[0] Host[69] TH[1] DS[662] SCRIPT: /sbin/sh /usr/local/apache2/htdocs/scripts/bulletstats.sh <my hostname>, output: 0
signal:-65 noise:-95
I have confirmed that there are no leading or trailing spaces in the output.
The script follows
Code: Select all
#! /sbin/sh
STATS=`ssh admin@$1 mca-status|sed 's/.$//'`
OUTPUT=`echo "$STATS" | grep 'signal' | awk -F'=' '{printf "signal:%s", $2}'
echo "$STATS" | grep 'noise' | awk -F'=' '{printf " noise:%s", $2}'`
echo $OUTPUT
In the associated data input method I have two output fields, 'signal' and 'noise' -- not sure if this impacts what SPINE gets from the scripts.
Can anyone see anything obvious that I'm doing wrong?
thanks a lot!
plankton
EDIT: I should also note that ssh pubkeys are set up, so it shouldn't be hanging on an ssh password prompt.