Graphing PacketShaper CPU in Cacti …. success
September 28, 2006 – 6:25 amAfter stuck in the problem the script can’t provide the cpu utilization for about two weeks. now it’s just the past story
Ok, now i’m going to describe what the problem exatcly, from the very begining :
Because of using PacketShaper. that doesn’t have OID for CPU Utilization (or it has, but i don’t know anyway), so my friend of mine asked me a favor to make some script to grab it’s CPU utilzation.
With a reference script from the vendor (it’s for mrtg actually), and result from searching everywhere, i start to make some perl script for grabing the cpu utilization.
The idea is simple, just telnet to machine, doing a command, grab the value from it, quit from machine. With help of expect make it possible ![]()
Technorati Tags: cacti, scripting
Ok, so, i’ve finished typing script, test it and the result satisfied me ![]()
Moving script from development folder, to operational one
set some permission, and done.
Create input method, data source, and graphic in cacti. After that, i checked the rrd file in rra directory, still see nan (not a number) in rrd file from fetch of rrdtools.
Try to solve the problem with search article in Google, modified script, test it, fetch rrd file. It’s result nothing, still nan in rrd file, but it’s ok when i test from shell. Hmm weird …
i’m doing same thing for last two weeks, with no result at all … :dooh: try to throw it to mailing-list … result nothing too …
2 weeks later …..
Just remember to check the cacti.log out … and voila … it’s lot of line that says my script has no result.
Try to double-check again the script, the data-source as well. It looks ok, test result ok. Set everything to full path in data input method, for perl and script as well. Waiting, checking … and … nothing … :dooooohhh:
Checking log once more, try to copy the full path perl and script, and paste …. return … ahaaa … there you are the problem. It says can not find expect script, that in the same folder with the script.
Edit the script once more, set everything full path in the script, :wq, and then check the rrd file again.
voila … it’s shows up a value … hurrayy … :fiiuuhh: and the i can see the graphic in cacti too …. ![]()

3 Responses to “Graphing PacketShaper CPU in Cacti …. success”
mantap m…
tp sy dulu punya masalah performance klo pake telnet ke mesin, jauh lebih baik klo kita pake SNMP. tinggal main2 sama Man In Black (MIB) nya aja..
rgds,
detar
By detar on Oct 2, 2006
Wohoho … itu dia seandainya dianya punya OID buat resource yang aku mau … ya lebih baik ane pake ManInBlack
jadi ya ane pake deh cara ‘tradisional’ ..
)
Berhubung dianya gak punya OIDnya CPU Utilization, ato dia punya tapi aku gak tau
By MHd on Oct 2, 2006
Certainly. So happens. We can communicate on this theme.
I congratulate, you were visited with simply magnificent idea
In my opinion you are mistaken. I suggest it to discuss. Write to me in PM.
What does it plan?
Rather valuable piece
By turfirmspb on Apr 25, 2010