Script failure after upgrade to Cacti 0.8.7b

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
sanos99
Posts: 3
Joined: Thu Oct 29, 2009 4:02 am

Script failure after upgrade to Cacti 0.8.7b

Post by sanos99 »

Hi,

I have an issue with my scripts afer upgrading to Cacti 0.8.7b: only the first value returned by the script is graphed correctly but the second one is graphed from time to time without any visible reason.

The script basically takes an argument (the client), reads a log coming from an imq interface with speed values and provides cacti two values: upload and download.

The script (bandw.sh) is the following:

#!/bin/sh
LALA=$1
a=$LALA"_UL"
b=$LALA"_DL"
cat /data/web/q/q_show.log | grep $b |awk '{printf "dl:" $2}'
cat /data/web/q/q_show.log | grep $a |awk '{printf " ul:" $2}'


the q_show.log log is the following:

EXTERN_UL 28451.36 1782 58000 62000
CLIENT1_UL 0.39 0 1024 10240
CLIENT2_UL 0.49 0 1024 10240
_DEFAULT_ 0.00 0 256 256
EXTERN_DL 27421.44 1655 58000 62000
CLIENT1_DL 2503.00 0 128 512
CLIENT2_DL 2809.00 0 128 512
_DEFAULT_ 0.00 0 256 256



when running bandwith.sh CLIENT1, the output is:

[root@cacti scripts]# ./extern.sh CLIENT1
dl:0.39 ul:2503.00[root@cacti scripts]#


However, the graphs are not ok, only the download value is graphed and the upload value from time to time like in the attached image.

I thought that maybe the values themselves are wrong, so I have modified the script to output first ul and then dl. The graph has changed and the first value was again graphed corerctly but not the second one.

The same script worked flawlessly with a previous version of cacti.

What on earth could be wrong?

[/img]
Attachments
graph preview
graph preview
1.jpg (34.78 KiB) Viewed 2349 times
sanos99
Posts: 3
Joined: Thu Oct 29, 2009 4:02 am

Post by sanos99 »

nobody experienced something like this, yet??
sanos99
Posts: 3
Joined: Thu Oct 29, 2009 4:02 am

New graph with results

Post by sanos99 »

Here is what a graph looks like after a longer period of time.
Can anybody help me at least by telling me how on earth to debug this issue? I don't know how to see which data is read by cacti while executing the script(s).
Attachments
Untitled.jpg
Untitled.jpg (64.31 KiB) Viewed 2005 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests