Discussion:
RRD has NAN values
Yasha Zislin
2012-02-27 22:22:36 UTC
Permalink
Yasha Zislin [http://community.zenoss.org/people/yzislin] created the discussion

"RRD has NAN values"

To view the discussion, visit: http://community.zenoss.org/message/64816#64816

--------------------------------------------------------------
I have a custom command as my datasource.
Here it is
/usr/bin/snmpwalk -OqvU -${device/zSnmpVer} -c${device/zSnmpCommunity} ${device/manageIp} .1.3.6.1.2.1.25.3.3.1.1 | wc -l | sed 's/^/Anything | numOfCPUs=/'

That OID basically gives a list of CPU ids. I am simply adding it together and get this result.
Anything | numOfCPUs=4

numOfCPUs is a datapoint. So zencommand supposed to run the custom command and store output in this datapoint.

I have enabled debuging for zencommand and I see the following (I have removed snmp community strings and IPs):

Command: "/bin/sh -c exec /usr/bin/snmpwalk -OqvU -vX -cX xxx.xxx.xxx.xxx .1.3.6.1.2.1.25.3.3.1.1 | wc -l | sed 's/^/Anything | numOfCPUs=/'"
2012-02-27 16:42:25,788 DEBUG zen.zencommand: Output: 'Anything | numOfCPUs=4\n'
2012-02-27 16:42:25,789 DEBUG zen.zencommand: Process snmpwalk -OqvU -vX -cX xxx.xxx.xxx.xxx .1.3.6.1.2.1.25.3.3.1.1 | wc -l | sed 's/^/Anything | numOfCPUs=/'  stopped (0), 0.54 seconds elapsed
2012-02-27 16:42:25,790 DEBUG zen.zencommand: Dropping useless clear event {'manager': 'zenoss', 'eventKey': 'numberOfCPUs', 'device': 'xxx.xxx.xxx.xxx', 'eventClass': '/Cmd/Ok', 'summary': "Cmd: /usr/bin/snmpwalk -OqvU -vX -cX xxx.xxx.xxx.xxx .1.3.6.1.2.1.25.3.3.1.1 | wc -l | sed 's/^/Anything | numOfCPUs=/' - Code: 0 - Msg: Success", 'component': '', 'monitor': 'localhost', 'agent': 'zencommand', 'severity': 0}
2012-02-27 16:42:25,791 DEBUG zen.zencommand: The result of "/usr/bin/snmpwalk -OqvU -vX -cX xxx.xxx.xxx.xxx .1.3.6.1.2.1.25.3.3.1.1 | wc -l | sed 's/^/Anything | numOfCPUs=/'" was "'Anything | numOfCPUs=4\n'"
2012-02-27 16:42:25,794 DEBUG zen.zencommand: Dropping useless clear event {'severity': 0, 'performanceData': [' numOfCPUs=4'], 'component': '', 'agent': 'zencommand', 'summary': 'Anything ', 'manager': 'zenoss', 'eventKey': 'numberOfCPUs', 'device': 'xxx.xxx.xxx.xxx', 'message': 'Anything | numOfCPUs=4\n', 'eventClass': '/Cmd/Ok', 'monitor': 'localhost'}
2012-02-27 16:42:25,794 DEBUG zen.zencommand: Storing numOfCPUs = 4.0 into Devices/xxx.xxx.xxx.xxx/numberOfCPUs_numOfCPUs
2012-02-27 16:42:25,795 DEBUG zen.RRDUtil: /opt/zenoss/perf/Devices/xxx.xxx.xxx.xxx/numberOfCPUs_numOfCPUs.rrd: 4.0
2012-02-27 16:42:25,795 DEBUG zen.zencommand: RRD save result: 4.0

So judging by last few lines, everything seems to be ok.
I try to graph that. Even though that value doesnt change it should just say 4 all the time. BTW, it's GAUGE datasource.
But it says NaN.

So I went into console for zenoss and found that rrd file.
I ran:
rrdtool dump filename.rrd
It gave me a huge list of entries but values there are NaN.

I am going nuts here. It says it is storing but it is not in the rrd.

Help please.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64816#64816]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dpetzel
2012-02-27 23:35:42 UTC
Permalink
dpetzel [http://community.zenoss.org/people/dpetzel] created the discussion

"Re: RRD has NAN values"

To view the discussion, visit: http://community.zenoss.org/message/64817#64817

--------------------------------------------------------------
rather than doing a dump try rrdtool lastupdate filename.rrd. This will give you the most recent data point, I find this to be easier than trolling the entire dump xml file.

Can you attach a screen shot of your your graph point defintion (while highlighting the graph, select manage graph points, double click the datapoint in question).

Based on your output above and pending the lastupdate info, my first guess is a mismatch between datapoint and graph point.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64817#64817]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Yasha Zislin
2012-02-28 15:30:43 UTC
Permalink
Yasha Zislin [http://community.zenoss.org/people/yzislin] created the discussion

"Re: RRD has NAN values"

To view the discussion, visit: http://community.zenoss.org/message/64809#64809

--------------------------------------------------------------
That's weird when I do rrdtool lastupdate I get my 4.0 value. But when I do dump it shows a bunch of NaN.
Btw, weird that the value is 4.0 not 4. Not sure if that's causing an issue or not.
Loading Image... Loading Image...
This is a basic graph with one datapoint. Default values everywhere. I just picked it from the list when I was adding it.

My final goal to use that value in another datapoint for different graph. I was just testing the value by creating this basic graph.

Here is the screen shot where I want to use my datapoint ultimately.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64809#64809]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Yasha Zislin
2012-02-28 15:45:12 UTC
Permalink
Yasha Zislin [http://community.zenoss.org/people/yzislin] created the discussion

"Re: RRD has NAN values"

To view the discussion, visit: http://community.zenoss.org/message/64810#64810

--------------------------------------------------------------
I forgot to add the second screenshot.
Loading Image... Loading Image...
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64810#64810]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
bigegor
2012-02-28 19:11:18 UTC
Permalink
bigegor [http://community.zenoss.org/people/bigegor] created the discussion

"Re: RRD has NAN values"

To view the discussion, visit: http://community.zenoss.org/message/64822#64822

--------------------------------------------------------------
your RPN is wrong.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64822#64822]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Yasha Zislin
2012-02-28 20:01:14 UTC
Permalink
Yasha Zislin [http://community.zenoss.org/people/yzislin] created the discussion

"Re: RRD has NAN values"

To view the discussion, visit: http://community.zenoss.org/message/64826#64826

--------------------------------------------------------------
I assume you are talking about the variable section.
That's the part I was not sure how to do.
I've used a static number there before and my formula works. I just need to use the datasource now.

Do you know how it is supposed to be?

Thanks.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64826#64826]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
bigegor
2012-02-28 21:18:12 UTC
Permalink
bigegor [http://community.zenoss.org/people/bigegor] created the discussion

"Re: RRD has NAN values"

To view the discussion, visit: http://community.zenoss.org/message/64825#64825

--------------------------------------------------------------
can you provide your formula in Infix notation (common arithmetic and logical formula notation)?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64825#64825]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Yasha Zislin
2012-02-28 21:43:14 UTC
Permalink
Yasha Zislin [http://community.zenoss.org/people/yzislin] created the discussion

"Re: RRD has NAN values"

To view the discussion, visit: http://community.zenoss.org/message/64828#64828

--------------------------------------------------------------
( current value / ( number of CPUs * 100 ) ) * 100

The formula in RPN is correct. I am simply using a different data source which calculated number of CPUs and then stores in its data point.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64828#64828]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
bigegor
2012-02-28 21:50:56 UTC
Permalink
bigegor [http://community.zenoss.org/people/bigegor] created the discussion

"Re: RRD has NAN values"

To view the discussion, visit: http://community.zenoss.org/message/64841#64841

--------------------------------------------------------------
how old are you?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64841#64841]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Yasha Zislin
2012-02-28 22:44:31 UTC
Permalink
Yasha Zislin [http://community.zenoss.org/people/yzislin] created the discussion

"Re: RRD has NAN values"

To view the discussion, visit: http://community.zenoss.org/message/64830#64830

--------------------------------------------------------------
What's the difference?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64830#64830]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
bigegor
2012-02-28 23:03:18 UTC
Permalink
bigegor [http://community.zenoss.org/people/bigegor] created the discussion

"Re: RRD has NAN values"

To view the discussion, visit: http://community.zenoss.org/message/64843#64843

--------------------------------------------------------------
1. you must know that ( current value / ( number of CPUs * 100 ) ) * 100 = current value / number of CPUs
2. you can not use ${here/datapoint_name} form to access datapoint value. This only works for device or components attributes.

so your RPN: numOfCPUs,/

note that numOfCPUs Graph Point must be first in list.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64843#64843]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Yasha Zislin
2012-02-29 15:46:34 UTC
Permalink
Yasha Zislin [http://community.zenoss.org/people/yzislin] created the discussion

"Re: RRD has NAN values"

To view the discussion, visit: http://community.zenoss.org/message/64838#64838

--------------------------------------------------------------
It doesnt matter if the formula gets simplified. It still doesnt solve my problem.

I need to use numOfCPUs reading in this RPN for a different data point.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64838#64838]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
chitambira
2013-04-30 12:12:57 UTC
Permalink
chitambira [http://community.zenoss.org/people/chitambira] created the discussion

"Re: RRD has NAN values"

To view the discussion, visit: http://community.zenoss.org/message/73008#73008

--------------------------------------------------------------
did you manage to solve this issue?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73008#73008]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Yasha Zislin
2013-04-30 12:44:29 UTC
Permalink
Yasha Zislin [http://community.zenoss.org/people/yzislin] created the discussion

"Re: RRD has NAN values"

To view the discussion, visit: http://community.zenoss.org/message/73027#73027

--------------------------------------------------------------
I've ended up using this value for RPN:
${here/hw/cpus/countObjects},/

This provided proper reading of OID depending on number of CPUs on the device.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73027#73027]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...