Hi everyone
I have a problem and I'm hoping someone has a quick fix.
Checking SNMP values in NagiosXI and we noticed all the ones that are returned as Counter64 are not being graphed correctly by RRD.
Looking at the output from check_snmp with a -v to see what it's doing, it adds a "c" to the value that isn't there with an snmpget
/usr/local/nagios/libexec/check_snmp -H <servername>-o 1.3.6.1.4.1.1230.2.7.2.5.1.0 -C <snmpcomm> -P 2c -l "CPU" -w 70 -c 90 -v
/usr/bin/snmpget -Le -t 1 -r 5 -m '' -v 2c [authpriv] <servername>:161 1.3.6.1.4.1.1230.2.7.2.5.1.0
iso.3.6.1.4.1.1230.2.7.2.5.1.0 = Counter64: 1
SNMP OK - CPU 1 | 'CPU'=1c;70;90;
Anyone know why it's adding a "c" there? It breaks all the RRD graphs.
any ideas? This doesn't happen with the 32 bit counters. I've seen a few other threads but no-one seems to address the little c.
It's a Centos 6.8 system 64-bit running Nagios XI 5.4.4
(also, any idea why I can't post to the XI forum?)
Counter64 and check_snmp RRD
- tacolover101
- Posts: 432
- Joined: Mon Apr 10, 2017 11:55 am
Re: Counter64 and check_snmp RRD
what version of check_snmp are you running?
Re: Counter64 and check_snmp RRD
Also, you should be able to post to the XI forums, just not the Customer section. Also note that your first two posts need to be approved by a moderator.
Former Nagios employee
Re: Counter64 and check_snmp RRD
Thanks tacolover101 for reply so quickly.
The version is v.2.0.3
/usr/local/nagios/libexec/check_snmp --version
check_snmp v2.0.3 (nagios-plugins 2.0.3)
Is there a newer one?
(@ tmcdonald - thanks, I'll try that next time)
The version is v.2.0.3
/usr/local/nagios/libexec/check_snmp --version
check_snmp v2.0.3 (nagios-plugins 2.0.3)
Is there a newer one?
(@ tmcdonald - thanks, I'll try that next time)
Re: Counter64 and check_snmp RRD
There's likely old data in the current RRD that's referencing a '% usage' for the UOM. See this github issue for a better explanation:
https://github.com/nagios-plugins/nagio ... issues/102
I think Counter64 will evaluate to c for the UOM when gathered by check_snmp. See here:
https://github.com/nagios-plugins/nagio ... nmp.c#L431
Whether or not that is a correct thing to do, I have no idea. But that is appears to be what's happening and why the c shows up.
Is creating a fresh RRD an option? I would imagine the problem would be fixed if you started with a fresh RRD for the service check.
https://github.com/nagios-plugins/nagio ... issues/102
I think Counter64 will evaluate to c for the UOM when gathered by check_snmp. See here:
https://github.com/nagios-plugins/nagio ... nmp.c#L431
Code: Select all
else if (strstr (response, "Counter64: ")) {
show = strstr (response, "Counter64: ") + 11;
is_counter=1;
if(!calculate_rate)
strcpy(type, "c");
}
Is creating a fresh RRD an option? I would imagine the problem would be fixed if you started with a fresh RRD for the service check.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Counter64 and check_snmp RRD
Can you view the Customer Forums?
If so, take a look at this post for creating a template in XI to convert the counter output from the check_snmp plugin to a gauge so it will format the data correctly for the graphs.
https://support.nagios.com/forum/viewto ... 65#p146465
Let me know if you have any questions.
If so, take a look at this post for creating a template in XI to convert the counter output from the check_snmp plugin to a gauge so it will format the data correctly for the graphs.
https://support.nagios.com/forum/viewto ... 65#p146465
Let me know if you have any questions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Counter64 and check_snmp RRD
Thank you mcapra.
Those articles are fab - it all makes sense now !
I did delete the RRD data file nad let it start filling again - no change.
I think the easiest thing would be to wrap check_snmp with a bash file and remove the 'c'
@ tgriep - No, it seems I'm not authorized to read that but as I know what's causing the little c, I can handle it.
thanks guys really appreciated.
Those articles are fab - it all makes sense now !
I did delete the RRD data file nad let it start filling again - no change.
I think the easiest thing would be to wrap check_snmp with a bash file and remove the 'c'
@ tgriep - No, it seems I'm not authorized to read that but as I know what's causing the little c, I can handle it.
thanks guys really appreciated.
Re: Counter64 and check_snmp RRD
Creating a script to remove the counter "c" for the performance output would work as well.
Let us know if you need any further help on this.
Let us know if you need any further help on this.
Be sure to check out our Knowledgebase for helpful articles and solutions!