rrdtool via CACTI2RRD not updating, snnp fine

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

Moderators: Developers, Moderators

Post Reply
VertigoOne
Posts: 5
Joined: Mon Oct 15, 2007 5:02 am

rrdtool via CACTI2RRD not updating, snnp fine

Post by VertigoOne »

Greetings!

I've read everything i could find here and elsewhere with regards to my particular problem, and even started researching how rrd actually works, and have installed on linux and windows to try and resolve for the past 7 days.

Current platform and build info

WinXP SP2 (Virtual PC at the moment, have tried direct too, and FC6)

C:\cacti>php -v
PHP 5.2.4 (cli) (built: Aug 30 2007 07:06:31)

C:\cacti>rrdtool -v
RRDtool 1.2.15 Copyright 1997-2006 by Tobias Oetiker <tobi@oetiker.ch>

Cacti 0.8.6j

C:\net-snmp\bin>snmpget.exe -V
NET-SNMP version: 5.3.1

C:\net-snmp\bin>mysqladmin -V
mysqladmin Ver 8.41 Distrib 5.0.45, for Win32 on ia32

Objective
Monitor CPU utilisation on HP switches, with futher expansion into LAN and WAN monitoring. Currently only one device and one OID configured.

Problem Description
Typical hard to figure out NaN issue, i duplicated the cisco profile and created an HP profile with the new OID (as in the forums) for CPU load, i get the integer back perfectly, single digit. But the graph is NaN.

Manual SNMP Get
C:\net-snmp\bin>snmpget -v 1 -c public 192.168.0.4 1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0

SNMPv2-SMI::enterprises.11.2.14.11.5.1.9.6.1.0 = INTEGER: 7

rrdtool info of the above OID gather, basicly a mirror of the cisco one.

filename = "c:\htdocs\cacti\rra\hp_switch_5min_cpu_8.rrd"
rrd_version = "0003"
step = 300
last_update = 1192441108
ds[5min_cpu].type = "GAUGE"
ds[5min_cpu].minimal_heartbeat = 600
ds[5min_cpu].min = 0.0000000000e+00
ds[5min_cpu].max = 1.0000000000e+02
ds[5min_cpu].last_ds ="UNKN"
ds[5min_cpu].value = 0.0000000000e+00
ds[5min_cpu].unknown_sec = 208
rra[0].cf = "AVERAGE"
rra[0].rows = 600
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0

manual poller debug mode important parts
10/15/2007 01:36:47 PM - POLLER: Poller[0] CACTI2RRD: c:\cacti\rrdtool.exe update C:\htdocs\cacti\rra\hp_switch_5min_cpu_8.rrd --template 5min_cpu 1192441006:8
10/15/2007 01:52:56 PM - SYSTEM STATS: Time:1.1255 Method:cactid Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:1 RRDsProcessed:1

no other errors are reported (completely clean as far as i can tell)

The current CPU value of 8% is listed with no problem but when i do a rrdtool info again....

rrd_version = "0003"
step = 300
last_update = 1192441108
ds[5min_cpu].type = "GAUGE"
ds[5min_cpu].minimal_heartbeat = 600
ds[5min_cpu].min = 0.0000000000e+00
ds[5min_cpu].max = 1.0000000000e+02
ds[5min_cpu].last_ds = "UNKN"

last update hasn't changed at all.. when i perform a manual rrdtool command (the above one, but with a random time i guess, or i've tried even proper increments) plus a cpu load of 70%.. i get the below

filename = "hp_switch_5min_cpu_8.rrd
rrd_version = "0003"
step = 300
last_update = 2000000000
ds[5min_cpu].type = "GAUGE"
ds[5min_cpu].minimal_heartbeat = 600
ds[5min_cpu].min = 0.0000000000e+00
ds[5min_cpu].max = 1.0000000000e+02
ds[5min_cpu].last_ds = "UNKN"
ds[5min_cpu].value = NaN
ds[5min_cpu].unknown_sec = 200

if i remove the template part, again increment the time with 1 second and do another 70% cpu load.. (WITHOUT TEMPLATE)

rrd_version = "0003"
step = 300
last_update = 2000000001
ds[5min_cpu].type = "GAUGE"
ds[5min_cpu].minimal_heartbeat = 600
ds[5min_cpu].min = 0.0000000000e+00
ds[5min_cpu].max = 1.0000000000e+02
ds[5min_cpu].last_ds = "UNKN"
ds[5min_cpu].value = 7.0000000000e+01
ds[5min_cpu].unknown_sec = 200

it works and after a few manual entries.. i actually start getting an average somewhat

last_update = 2000000007
ds[5min_cpu].type = "GAUGE"
ds[5min_cpu].minimal_heartbeat = 600
ds[5min_cpu].min = 0.0000000000e+00
ds[5min_cpu].max = 1.0000000000e+02
ds[5min_cpu].last_ds = "UNKN"
ds[5min_cpu].value = 2.7000000000e+02

I've tried many many things to get this working, i have no idea what else can be wrong. Paths are fine, i can't see anything else to debug.. the rest is just sql.. which as far as i can tell is okay. I've gone through the nan troubleshooting guide and managed to fix the font issues i had and the rrd file issues.. but this issue remains.

I've also tried hacking with the templates, but i am using the one for CPU, and as far as the forums go.. it should be perfect. Also the debug doesn't say anything is wrong with the template.

Any suggestions? I'm at the end of my rope :(

I've also dumped the SQL database a few times, redid everything a few times aswell. I can now say i can get cacti installed on windows in about 2 mins with all the retries :)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Is it possible to upgrade rrdtool? 1.2.15 is known to be buggy. But don't ask me about those bugs, it's too long ago
Reinhard
VertigoOne
Posts: 5
Joined: Mon Oct 15, 2007 5:02 am

Post by VertigoOne »

I'll give it a shot.. i found a later Win32 version here

http://www.gknw.net/mirror/rrdtool/

they go up to 1.2.23

Thank you very much. I didn't know there were versions, i used the ones on the cacti website.
VertigoOne
Posts: 5
Joined: Mon Oct 15, 2007 5:02 am

Post by VertigoOne »

I think i found the problem :D

10/16/2007 11:10:07 AM - POLLER: Poller[0] CACTI2RRD: c:\cacti\rrdtool.exe update C:\htdocs\cacti\rra\core_switch_5min_cpu_8.rrd --template 5min_cpu N:3

The first time it updates it uses N:3

what i noticed is that the debug TIME is wrong.. it is an hour ahead according to the debug logs, while the system time is exactly 10:10:07 at the above time.

There is no problem with the template or with rrdtool per se.. I don't know how to fix it however.

here is what i see step by step

First run poller.php ->

last_update = 1192522207


second run poller.php

1192518871:3

maybe it will help if i say i am in south africa?

Were GMT+2.. why would it be an hour out.. time zone settings are correct... maybe something to do with the daylight savings changes in the US?
VertigoOne
Posts: 5
Joined: Mon Oct 15, 2007 5:02 am

Post by VertigoOne »

Fixed the time zone using Africa/Johannesburg in php.ini under timezone setting.

Perhaps update the installation docs with a note with regards to this..

It seems fairly common and a good cause for NaN graphs.. as the first time is rrdtool N:x and the second run is system time:x

Not everybody is PHP experts, or perhaps it shouldn't do that :)

ps.. it didn't immediately work, took a few mins to get some data.. looks good now.

Awesome!
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests