Simplest Method of Going from Script to Graph (Walkthrough)

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

lorax
Posts: 15
Joined: Tue May 31, 2005 3:33 pm

Simplest Method of Going from Script to Graph (Walkthrough)

Post by lorax »

hm. i have followed the method described in the manual but it seems like the rrd file is not being created. i have these two messages:

RRDTool Says:
ERROR: opening 'C:\www\cacti/rra/random_number_1185.rrd': No such file or directory

Data Source Debug
c:/rrdtool/rrdtool.exe create \
C:\www\cacti/rra/random_number_1185.rrd \
--step 300 \
DS:random_number:GAUGE:600:0:U \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \

..any help would be appreciated. TIA.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

turn the polling level to debug for one cycle and post the output. Seems you're not collecting valid data.
lorax
Posts: 15
Joined: Tue May 31, 2005 3:33 pm

Post by lorax »

i had a ton of other devices but disabled them for a short debug output... really short. hope this helps.

Content-type: text/html
X-Powered-By: PHP/4.3.10

06/01/2005 10:18:33 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/cactid/cactid.exe, ARGS: 0 0]
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
06/01/2005 10:18:35 AM - SYSTEM STATS: Time: 2.0612 s, Method: cactid, Processes: 1, Threads: 5, Hosts: 1, Hosts/Process: 1

my motivation for attempting to graph output from a script is so i can monitor cpu usage, load average, and memory usage on an NT machine. do you think that this is the right route for me to go?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

All the data you listed, can be monitored via SNMP and would be faster than a script(s).

It doesn't seem you enabled debugging for the Poller Logging Level. There isn't any detail on what's going on.
lorax
Posts: 15
Joined: Tue May 31, 2005 3:33 pm

Post by lorax »

ive attached the output for a full run this time. i dont see anything in there referencing the random number script though. can you point me towards a walkthrough of setting up cpu etc graphs via snmp?... initially i set them up just like i did for the traffic graphs on all the other devices (on unix machines) but the three graphs show up with values -1.J# and so no data gets graphed. simple to fix/setup?
Attachments
pollerDebug.txt
poler output debug mode
(140.86 KiB) Downloaded 390 times
lorax
Posts: 15
Joined: Tue May 31, 2005 3:33 pm

Post by lorax »

...would that would be chapter 13 in the manual? when i do a snmpbulkwalk -Os -c public localhost system i can see an oid of enterprises.311.1.1.3.13 (or 1.3.6.1.4.1.311.1.1.3.1.3 right?)... is that of any use to me? how would i find out the oids that i need for the cpu usage, load average, and memory usage?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) When posting the debug log, you do not want the output from the cmd window. You want cacti\log\cacti.log. You do not appear to have any errors in the polling though.

2) For CPU load, I've found the default cpu load template in cacti doesn't quite work for me, so I manually poll the specific OID. Walk .1.3.6.1.2.1.25.3.3.1.2 and use the generic oid template

3) For memory usage, you need to use a Perl (which uses WMI) script to get the info. I'm using w32_query_OperatingSystem.pl which I got somewhere here on the cacti forum.
lorax
Posts: 15
Joined: Tue May 31, 2005 3:33 pm

Post by lorax »

oh. right. thanks (: i cant attach my whole log, its 777KB. any recomendations? i tried disabling all the devices but then the poller just exceeded its max run time waiting on 1/1 over and over again.

i went back through a little while ago and tried it (graphing the random number script) again still resulting in the same message... consistent at least.
RRDTool Says:
ERROR: opening 'C:\www\cacti/rra/random_number_1185.rrd': No such file or directory
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

so open up the log file in Wordpad / Notepad and copy one polling cycle.

The reason the rrd file does not exist, is because rrdtool has never collected any valid data. You can see what the problem is, by looking at the debug log from cacti.
lorax
Posts: 15
Joined: Tue May 31, 2005 3:33 pm

Post by lorax »

thanks again for your patience, really. what i mean is: i open the log, select all, delete it. now its empty. i run the poller. i have so many devices that one cycle is 777KB. if i disable them all for that cycle then the poller just waits on 1/1 until it times out. is there some other way to disable them 'further' so that poller completely ignores them and pays exclusive attention to the script.. aside from removing them?

uh oh. i just noticed that when i look at the device localhost, which is of course the one that i am trying to run this script on, there is a message that says "snmp is not in use". so i looked closer and realized i left out the snmp community.. filled that in, now its 'in use'. :roll: ..nonetheless, those random numbers are not getting written to the rrd. way better off than i was though..
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

oh, didn't realize you ment one cycle created that giant of a log.

Well then you'll need to search through the log for the warnings. Then cut/paste the pieces around it. You should see a script and/or snmp error, then you'll know why the rrd is not getting updated.
lorax
Posts: 15
Joined: Tue May 31, 2005 3:33 pm

Post by lorax »

i ran it in debug mode then searched the log for the string 'warning' and found about 5. i then disabled the AS400 device and repeated.. this time there were no occurances of the string 'warning' in the log at all... but now i realize that a couple of my AS400 graphs were not up to par ): ..good to know.
lorax
Posts: 15
Joined: Tue May 31, 2005 3:33 pm

Post by lorax »

...no warnings in the log. still cant figure this out. any ideas? TIA
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

You mind posting the log, compressed? Edit out the IPs, names, etc for security if you like.
lorax
Posts: 15
Joined: Tue May 31, 2005 3:33 pm

Post by lorax »

here is my cacti log with poller on debug mode. i have replaced all of the IPs with <replaced ip #> where # is unique to the host and the same thing with the names. does a script need to be associated with a particular host even though its not returning host data, i.e. random numbers?
Attachments
cacti.ace
compressed with win ace
(32.42 KiB) Downloaded 238 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests