Trouble with Graphing snmp data
Moderators: Developers, Moderators
Trouble with Graphing snmp data
Hi all,
Im having a slight problem with collecting snmp data and graphing it with rrdtool under cacti. I am collecting data via a script and using MIB krTotUsedSwapSpace.0 which gives me swap usage on a box. in the cron printout i can see that it is using 6836208 kb of swap and have setup the graph to display this, alas this is not showing up and all i get is a blank graph even though the data is updating in the cron printout.
Any ideas? (yes i have selected a color
thanks guys !
Im having a slight problem with collecting snmp data and graphing it with rrdtool under cacti. I am collecting data via a script and using MIB krTotUsedSwapSpace.0 which gives me swap usage on a box. in the cron printout i can see that it is using 6836208 kb of swap and have setup the graph to display this, alas this is not showing up and all i get is a blank graph even though the data is updating in the cron printout.
Any ideas? (yes i have selected a color
thanks guys !
this is something everyone here should understand, cacti needs to be operating system configured. It wont just work out of the box, I have had to modify the scripts and cacti setup specifically for solaris for things to work. Using the internal scripts (which reside in the php code) will look at the local machine, you need to create your custom scripts or edit the ones in ~cacti/scripts directory and modify them for the OS cacti is sitting on and call it from the cacti web page.
In answer to your question though, yes some of the graphs do display.
In answer to your question though, yes some of the graphs do display.
rrdtool
So can anyone help me with rrdtool not displaying properly? I am really confused as it doesnt really make sense why this particular graph isnt displaying properly(and how the others are retrieving the Y axis value).
Here is the cron printout which is showing the correct output for my swap space usage.
perl /var/apache/htdocs/orca/cacti/scripts/snmp_swap_space.pl ldnroemcr1.uk.ml.com:7777 public krTotUsedSwapSpace.0 9658488
Here is a link to the graphs which are currently being displayed. Please ignore the cpu wait time and and traffic analysis for the moment.
What really gets me is how in gods name can u set the Y axis value? where is rrdtool getting this "m" value and the amount being displayed? how are figures like 9658488 relating to 334.5m ?
Really confused here and could do with some help...
I hope you guys can help!
thanks
Z
Here is the cron printout which is showing the correct output for my swap space usage.
perl /var/apache/htdocs/orca/cacti/scripts/snmp_swap_space.pl ldnroemcr1.uk.ml.com:7777 public krTotUsedSwapSpace.0 9658488
Here is a link to the graphs which are currently being displayed. Please ignore the cpu wait time and and traffic analysis for the moment.
What really gets me is how in gods name can u set the Y axis value? where is rrdtool getting this "m" value and the amount being displayed? how are figures like 9658488 relating to 334.5m ?
Really confused here and could do with some help...
I hope you guys can help!
thanks
Z
I think the only way to get the snmp output to a bit of an human readable format is to create a CDEF: CDEF:cdefa=a,1024,* \
About the not displaying part, if you create a gprint for that DS, does it return a NAN value? If so I'm having the same problem with some diskspace SNMP data:
http://www.raxnet.net/board/viewtopic.php?t=1150
About the not displaying part, if you create a gprint for that DS, does it return a NAN value? If so I'm having the same problem with some diskspace SNMP data:
http://www.raxnet.net/board/viewtopic.php?t=1150
rrdtool and NAN values
Guys,
Yep I am having NAN values in the rrd database. Thus I imagine rrdtool cannot graph but why is this? The actual cron printout shows 85578 (+/-).Do i have to do some other jiggery pokery for it to work? Do I need a special CDEF to work this out? Does a CDEF work over the result in the database before the graph is generated? (me thinks about reading from start again).
<!-- Round Robin Database Dump -->
<rrd>
<version> 0001 </version>
<step> 300 </step> <!-- Seconds -->
<lastupdate> 1041646505 </lastupdate> <!-- 2003-01-04 02:15:05 GMT -->
<ds>
<name> ldnroemcr1_swapused </name>
<type> GAUGE </type>
<minimal_heartbeat> 600 </minimal_heartbeat>
<min> 0.0000000000e+00 </min>
<max> 1.0000000000e+00 </max>
<!-- PDP Status -->
<last_ds> UNKN </last_ds>
<value> 0.0000000000e+00 </value>
<unknown_sec> 5 </unknown_sec>
</ds>
<!-- Round Robin Archives -->
<rra>
<cf> AVERAGE </cf>
<pdp_per_row> 1 </pdp_per_row> <!-- 300 seconds -->
<xff> 5.0000000000e-01 </xff>
<cdp_prep>
<ds><value> NaN </value> <unknown_datapoints> 0 </unknown_datapoints></ds>
</cdp_prep>
<database>
<!-- 2003-01-02 00:20:00 GMT / 1041466800 --> <row><v> NaN </v></row>
<!-- 2003-01-02 00:25:00 GMT / 1041467100 --> <row><v> NaN </v></row>
Check this out though....
Here i have a database for the number of mutex spin locks i have on a system.
<!-- Round Robin Database Dump -->
<rrd>
<version> 0001 </version>
<step> 300 </step> <!-- Seconds -->
<lastupdate> 1041870903 </lastupdate> <!-- 2003-01-06 16:35:03 GMT -->
<ds>
<name> ldnroemcr1_mutex </name>
<type> ABSOLUTE </type>
<minimal_heartbeat> 600 </minimal_heartbeat>
<min> 0.0000000000e+00 </min>
<max> 1.0000000000e+00 </max>
<!-- PDP Status -->
<last_ds> UNKN </last_ds>
<value> 2.1601416486e-01 </value>
<unknown_sec> 0 </unknown_sec>
</ds>
<!-- Round Robin Archives -->
<rra>
<cf> AVERAGE </cf>
<pdp_per_row> 1 </pdp_per_row> <!-- 300 seconds -->
<xff> 5.0000000000e-01 </xff>
<cdp_prep>
<ds><value> NaN </value> <unknown_datapoints> 0 </unknown_datapoints></ds>
</cdp_prep>
<database>
<!-- 2003-01-04 14:40:00 GMT / 1041691200 --> <row><v> 2.2560784314e-02 </v></row>
so I am receiving results but they dont relate to the actual snmp get results which are like so "19.4117647058824" . What am i doing wrong.
RRD masters in da house?
Yep I am having NAN values in the rrd database. Thus I imagine rrdtool cannot graph but why is this? The actual cron printout shows 85578 (+/-).Do i have to do some other jiggery pokery for it to work? Do I need a special CDEF to work this out? Does a CDEF work over the result in the database before the graph is generated? (me thinks about reading from start again).
<!-- Round Robin Database Dump -->
<rrd>
<version> 0001 </version>
<step> 300 </step> <!-- Seconds -->
<lastupdate> 1041646505 </lastupdate> <!-- 2003-01-04 02:15:05 GMT -->
<ds>
<name> ldnroemcr1_swapused </name>
<type> GAUGE </type>
<minimal_heartbeat> 600 </minimal_heartbeat>
<min> 0.0000000000e+00 </min>
<max> 1.0000000000e+00 </max>
<!-- PDP Status -->
<last_ds> UNKN </last_ds>
<value> 0.0000000000e+00 </value>
<unknown_sec> 5 </unknown_sec>
</ds>
<!-- Round Robin Archives -->
<rra>
<cf> AVERAGE </cf>
<pdp_per_row> 1 </pdp_per_row> <!-- 300 seconds -->
<xff> 5.0000000000e-01 </xff>
<cdp_prep>
<ds><value> NaN </value> <unknown_datapoints> 0 </unknown_datapoints></ds>
</cdp_prep>
<database>
<!-- 2003-01-02 00:20:00 GMT / 1041466800 --> <row><v> NaN </v></row>
<!-- 2003-01-02 00:25:00 GMT / 1041467100 --> <row><v> NaN </v></row>
Check this out though....
Here i have a database for the number of mutex spin locks i have on a system.
<!-- Round Robin Database Dump -->
<rrd>
<version> 0001 </version>
<step> 300 </step> <!-- Seconds -->
<lastupdate> 1041870903 </lastupdate> <!-- 2003-01-06 16:35:03 GMT -->
<ds>
<name> ldnroemcr1_mutex </name>
<type> ABSOLUTE </type>
<minimal_heartbeat> 600 </minimal_heartbeat>
<min> 0.0000000000e+00 </min>
<max> 1.0000000000e+00 </max>
<!-- PDP Status -->
<last_ds> UNKN </last_ds>
<value> 2.1601416486e-01 </value>
<unknown_sec> 0 </unknown_sec>
</ds>
<!-- Round Robin Archives -->
<rra>
<cf> AVERAGE </cf>
<pdp_per_row> 1 </pdp_per_row> <!-- 300 seconds -->
<xff> 5.0000000000e-01 </xff>
<cdp_prep>
<ds><value> NaN </value> <unknown_datapoints> 0 </unknown_datapoints></ds>
</cdp_prep>
<database>
<!-- 2003-01-04 14:40:00 GMT / 1041691200 --> <row><v> 2.2560784314e-02 </v></row>
so I am receiving results but they dont relate to the actual snmp get results which are like so "19.4117647058824" . What am i doing wrong.
RRD masters in da house?
Now it's much more clear
First of all in both cases you have set minimum value to 0 and maximum value to 1. This causes any value outside of 0-1 to be discarded. Your values are much bigger so... most of them are not stored in rrd file.
Now one thing more about your mutex counter. You used ABSOLUTE as a DS type. This means you are measuring rate of changes in number of spin locks. Additionaly this type of DS assumes the counter is reset after every read attempt. I think you should use GAUGE instead (I assume it is oscilating number rather than constantly growing value).
- bulek
First of all in both cases you have set minimum value to 0 and maximum value to 1. This causes any value outside of 0-1 to be discarded. Your values are much bigger so... most of them are not stored in rrd file.
Now one thing more about your mutex counter. You used ABSOLUTE as a DS type. This means you are measuring rate of changes in number of spin locks. Additionaly this type of DS assumes the counter is reset after every read attempt. I think you should use GAUGE instead (I assume it is oscilating number rather than constantly growing value).
- bulek
and guess what......CACTI is the one causing the issue. Everyone try this, update your cacti data source and change it to lets say "GAUGE", now dump out the data and see what it says... yes you guessed it its still "ABSOLUTE" (even though I told it to update the file). Something fishy is going on, I sometimes find that when i change something and go back to its options its gone back to what it was before i changed it. Very odd...
I`m wondering about creating the database from fresh
I`m wondering about creating the database from fresh
This issue has been discussed here. Normaly you are taking care of permissions to update rrd files for your cron user. In case of modification rrd file definition (like changing type or min/max values) you need to give the same rights to your apache/httpd user. You will be able succesfully update your DS when you provide proper access rights to your web server user.
- bulek
- bulek
Bulek
you have been a great help, appreciate your time. I`m just getting frustrated with the thing and missing key points . However now that the data sources are updating I am still unable to receive 1) correct Y values for my data source even though graphs are being plotted (for mutex locks) and 2) have correct data in my rrd database (still getting NAN values) for my memory used values in this case 85188 +/- .
how does Unit Exponent Value affect the Y axis values? the only examples i can find it setting 3 for k values and -6 for u (micro).
hope you can help me.
you have been a great help, appreciate your time. I`m just getting frustrated with the thing and missing key points . However now that the data sources are updating I am still unable to receive 1) correct Y values for my data source even though graphs are being plotted (for mutex locks) and 2) have correct data in my rrd database (still getting NAN values) for my memory used values in this case 85188 +/- .
how does Unit Exponent Value affect the Y axis values? the only examples i can find it setting 3 for k values and -6 for u (micro).
hope you can help me.
ad. 1) You wrote you can't get correct values. I would need more details... graph example, why do you think it's not correct, what are expected values?
ad. 2) I'm affraid I need to look at dump of your rrd file again after the changes you made. Also copy/paste here an rrd update line from rrd.log.
As far as I understand exponent value multiplies Y by 10^x (where x is the exponent value). So 10^3 is k (kilo) and 10^-6 is u (micro). THis should work similar for other values like G, m, etc.
- bulek
ad. 2) I'm affraid I need to look at dump of your rrd file again after the changes you made. Also copy/paste here an rrd update line from rrd.log.
As far as I understand exponent value multiplies Y by 10^x (where x is the exponent value). So 10^3 is k (kilo) and 10^-6 is u (micro). THis should work similar for other values like G, m, etc.
- bulek
Who is online
Users browsing this forum: No registered users and 1 guest