Collecting other snmp data, some problems
Moderators: Developers, Moderators
Greetings,
Congrats on a WONDERFULL program.
I have been trying to set up graphing of error rates from the MIBII spec, the OIDs are:
.1.3.6.1.2.1.2.2.1.14.1
.1.3.6.1.2.1.2.2.1.20.1
I am using the SNMP Data Input that came with cacti. I have created the graphs, and everything is generating fine except for one problem. There is no data being presented on the graph.
I watched the cron job output, and there is no error except for the swap collection error which is not related to this problem. I also looked at the cron job in the web interface of cacti to see what command was being used to fetch the data, and then ran that command in the shell manually to see what it returned.
The command was correct, and returned the OID and then the OID value. For example:
The OID was: .1.3.6.1.2.1.2.2.1.14.1
The Command was: snmpget -O neEXbqfsStv <router name> <community> .1.3.6.1.2.1.2.2.1.14.1
The value should be: 1295
The data returned via the command was: .1.3.6.1.2.1.2.2.1.14.1.1295
The graph has GPRINTs for max, average, and last, but they all show zeros. What am I doing wrong?
The URL for this is:
http://thor.lfc.edu/cacti/graph_view.php?action=tree
And check the "LFRouter Error Rate" entry.
Congrats on a WONDERFULL program.
I have been trying to set up graphing of error rates from the MIBII spec, the OIDs are:
.1.3.6.1.2.1.2.2.1.14.1
.1.3.6.1.2.1.2.2.1.20.1
I am using the SNMP Data Input that came with cacti. I have created the graphs, and everything is generating fine except for one problem. There is no data being presented on the graph.
I watched the cron job output, and there is no error except for the swap collection error which is not related to this problem. I also looked at the cron job in the web interface of cacti to see what command was being used to fetch the data, and then ran that command in the shell manually to see what it returned.
The command was correct, and returned the OID and then the OID value. For example:
The OID was: .1.3.6.1.2.1.2.2.1.14.1
The Command was: snmpget -O neEXbqfsStv <router name> <community> .1.3.6.1.2.1.2.2.1.14.1
The value should be: 1295
The data returned via the command was: .1.3.6.1.2.1.2.2.1.14.1.1295
The graph has GPRINTs for max, average, and last, but they all show zeros. What am I doing wrong?
The URL for this is:
http://thor.lfc.edu/cacti/graph_view.php?action=tree
And check the "LFRouter Error Rate" entry.
Network Administrator
Lake Forest College
Lake Forest College
Ok, found the problem for the data missing, but the cause.
The graphs and the readouts are zero because the data in the rrd files is zero. The numbers are set to: 0.0000000000e+00 instead of NaN.
So the data input is updating into the rrd file, but the data is not getting there relative to the output I am seeing. (example, the OID contains some number like 1249, but 0.0000000000e+00 is getting into the rrd)
I wonder if the snmpget output is throwing it off, for example:
The OID was: .1.3.6.1.2.1.2.2.1.14.1
The Command was: snmpget -O neEXbqfsStv .1.3.6.1.2.1.2.2.1.14.1
The value should be: 1295
The data returned via the command was: .1.3.6.1.2.1.2.2.1.14.1.1295
rrd and the graphing understands 1295, but not .1.3.6.1.2.1.2.2.1.14.1.1295
Thoughts?
_________________
Network Administrator
Lake Forest College
<font size=-1>[ This Message was edited by: ritter on 2002-01-29 15:21 ]</font>
The graphs and the readouts are zero because the data in the rrd files is zero. The numbers are set to: 0.0000000000e+00 instead of NaN.
So the data input is updating into the rrd file, but the data is not getting there relative to the output I am seeing. (example, the OID contains some number like 1249, but 0.0000000000e+00 is getting into the rrd)
I wonder if the snmpget output is throwing it off, for example:
The OID was: .1.3.6.1.2.1.2.2.1.14.1
The Command was: snmpget -O neEXbqfsStv .1.3.6.1.2.1.2.2.1.14.1
The value should be: 1295
The data returned via the command was: .1.3.6.1.2.1.2.2.1.14.1.1295
rrd and the graphing understands 1295, but not .1.3.6.1.2.1.2.2.1.14.1.1295
Thoughts?
_________________
Network Administrator
Lake Forest College
<font size=-1>[ This Message was edited by: ritter on 2002-01-29 15:21 ]</font>
This page might give you some ideas on munging the output results -
http://www.midcoast.com/~jp/snmp.html
Nic
http://www.midcoast.com/~jp/snmp.html
Nic
I will try and answer this question the best I can. The 'Get SNMP Data' script does no string parsing. It simply calls snmpget with all of the parameters and hopes to get a clean number back. I already realize that this is a problem since some versions of ucd-snmp do not return just a number; but the entire OID also.
The 'Get SNMP Network Data' does do string parsing. For *most* situations it is smart enough to strip off the leading OID that snmpget returns it. This data input source may be better off for what you are doing too since you seem to be gathering network interface info (correct me if I'm wrong).
It seems as though the solution to this problem would simply be to modify the 'Get SNMP Data' script to do a little more parsing. If you are interested in doing this; feel free. Otherwise I'll probably do it and include it in the next release.
One of the things you mentioned reminded me that I have to add support for NaN within cacti, which is very important. Whenever cacti gets bad data; it needs to detect this and feed rrdtool a NaN instead of the bad data.
Hope this helps,
-Ian
The 'Get SNMP Network Data' does do string parsing. For *most* situations it is smart enough to strip off the leading OID that snmpget returns it. This data input source may be better off for what you are doing too since you seem to be gathering network interface info (correct me if I'm wrong).
It seems as though the solution to this problem would simply be to modify the 'Get SNMP Data' script to do a little more parsing. If you are interested in doing this; feel free. Otherwise I'll probably do it and include it in the next release.
One of the things you mentioned reminded me that I have to add support for NaN within cacti, which is very important. Whenever cacti gets bad data; it needs to detect this and feed rrdtool a NaN instead of the bad data.
Hope this helps,
-Ian
The parsing is the problem I think. I could fix that, but I wonder if it would be better to add the MIB II error OIDs to the rest of the network data.
I would think that people would want to see this type of data. The problem is that it would not scale well when graphed with bandwith data because errors happen at a much smaller rate.
I would think that people would want to see this type of data. The problem is that it would not scale well when graphed with bandwith data because errors happen at a much smaller rate.
Network Administrator
Lake Forest College
Lake Forest College
It looks like one of the command options for snmpget is broken. snmpget appears to have a command option that just spits out the OID's value and not the OID itself.
I think that parsing should be added to the snmp data input regardless of how and where the error monitoring is added to cacti.
I am going to look at the snmpget issue a little further. I may not be following this right granted, but it looks like:
snmpget -O v <hostname> <community> <OID>
should print out just the value, but it doesn't. Regardless of that value is collected, parsing by Cacti would not be needed if this command option worked.
Nick
I think that parsing should be added to the snmp data input regardless of how and where the error monitoring is added to cacti.
I am going to look at the snmpget issue a little further. I may not be following this right granted, but it looks like:
snmpget -O v <hostname> <community> <OID>
should print out just the value, but it doesn't. Regardless of that value is collected, parsing by Cacti would not be needed if this command option worked.
Nick
Network Administrator
Lake Forest College
Lake Forest College
I second the vote for error OID collection. It is one of the best indications of network problem that administrators have a very difficult time troubleshooting if they can't or don't know how to see the error OIDs.</P>
I'ld also like the SNMP network script to fetch Counter64s instead of Counter32s for octets if Counter64 exists.</P>
As more people use cacti (and they will! this is a really, really well designed and organized application from a programming perspective.) More people will be using it to watch core router devices that have Multi-gig links such as OC12s.</P>
I have that problem right now.</P>
Anyhow. I really rely on the SNMP Interfaces page to automate my construction of data sources and graphs. Without that I was getting very tired entering in the hundreds of data sources and graphs I need in order to flesh out my whole network. So it would be nice to be able to automate the error and Counter64 OIDs as well.</P>
I've been posting a lot of problems and feature requests. So let me take the time to Congratulate you on very nice job. I taught C programming at the university level for several years. I really do mean it when I say that this is one of the best designed tools I've seen as far as the programming and organization goes.
I'ld also like the SNMP network script to fetch Counter64s instead of Counter32s for octets if Counter64 exists.</P>
As more people use cacti (and they will! this is a really, really well designed and organized application from a programming perspective.) More people will be using it to watch core router devices that have Multi-gig links such as OC12s.</P>
I have that problem right now.</P>
Anyhow. I really rely on the SNMP Interfaces page to automate my construction of data sources and graphs. Without that I was getting very tired entering in the hundreds of data sources and graphs I need in order to flesh out my whole network. So it would be nice to be able to automate the error and Counter64 OIDs as well.</P>
I've been posting a lot of problems and feature requests. So let me take the time to Congratulate you on very nice job. I taught C programming at the university level for several years. I really do mean it when I say that this is one of the best designed tools I've seen as far as the programming and organization goes.
First off...... Ian.... Cacti rox hell with an iron fist!
Second, this was keeping me up tonight. Here is the answer to the problem at hand.
========================
#!/usr/bin/perl
$ret = `snmpget -OneEXbqfsStv $ARGV[0] $ARGV[1] $ARGV[2]`;
chomp $ret;
$ret =~ s/$ARGV[2]//;
print $ret;
========================
It is now 5am and I must sleep. Please let me know if this helps anyone. ( digger@digger.cc )
night....
Second, this was keeping me up tonight. Here is the answer to the problem at hand.
========================
#!/usr/bin/perl
$ret = `snmpget -OneEXbqfsStv $ARGV[0] $ARGV[1] $ARGV[2]`;
chomp $ret;
$ret =~ s/$ARGV[2]//;
print $ret;
========================
It is now 5am and I must sleep. Please let me know if this helps anyone. ( digger@digger.cc )
night....
Who is online
Users browsing this forum: No registered users and 4 guests