[RESOLVED] Data Input Method not working

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

Moderators: Developers, Moderators

Post Reply
pijssel
Posts: 3
Joined: Mon Nov 05, 2012 4:54 am

[RESOLVED] Data Input Method not working

Post by pijssel »

I've been working a lot with Bash shell scripts and Data Input Methods. Last weekend I added a new one, but I don't see any data coming.

The script I works similar to an existing script:
- working script output on CLI: AM00SBC05:0 AM00SBC06:1067
- NOT working script output on CLI: MAXCC:1157

I've created a Data Input Method in the exact same way I did previously. But still the counter in the Graph shows me 0.

I checked, rechecked all parameters (Data Input Methods, Data Sources and Graph Management), even deleted everything and rebuild it all. But nothing helps. Running Data Source debug and Graph Debug Mode shows everything OK. Also the Cacti log files are clean on this item.

Running rrdtool from CLI ("rrdtool fetch s3_3_max_cc_4546.rrd MAX") shows only 'nan'. So my guess is that the Data Input Method isn't working properly.

If more info is needed, please tell...
Last edited by pijssel on Tue Nov 06, 2012 3:51 am, edited 1 time in total.
pijssel
Posts: 3
Joined: Mon Nov 05, 2012 4:54 am

Re: Data Input Method not working

Post by pijssel »

Here's some additional info:
Script running on Cacti server (/var/www/cacti/scripts/):
sh-3.2$ cat S3_3_active_standy_cc_maxcc.sh
ssh root@X.X.X.X "/usr/local/scripts/active_standy_cc_maxcc.sh"

Script running on remote server:
AM00SBC05:/usr/local/scripts # cat active_standy_cc_maxcc.sh
MAX_CC=`awk 'match($1,":"){print substr($1,RSTART+1)}' /tmp/max_cc.txt`
ACTIVE_CALLS=`cli stats |grep 'Active Calls' |awk '{print $4}'`

if [ "$ACTIVE_CALLS" -gt "$MAX_CC" ]
then
echo "MAXCC:"$ACTIVE_CALLS >/tmp/max_cc.txt
echo `cat /tmp/max_cc.txt`
else
echo `cat /tmp/max_cc.txt`
fi
pijssel
Posts: 3
Joined: Mon Nov 05, 2012 4:54 am

Re: Data Input Method not working

Post by pijssel »

I've resolved the issue, don't know exactly what the issue was. But it's working! :D
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests