Page 2 of 8
Re: check_snmp, performance graph and graph explorer discrep
Posted: Thu Jul 16, 2015 2:10 pm
by tmcdonald
I spoke to the developers and it looks like the graph is showing a change over time instead of the value itself for whatever reason. I don't have a fix yet but I wanted to keep you updated.
Re: check_snmp, performance graph and graph explorer discrep
Posted: Sun Jul 19, 2015 7:28 pm
by iptribe
tmcdonald wrote:I spoke to the developers and it looks like the graph is showing a change over time instead of the value itself for whatever reason. I don't have a fix yet but I wanted to keep you updated.
Does it have something to do with the letter "c" in the output shown in the group instead of numbers only? Because even if it is showing a change over time, it is not supposed to be showing decimal numbers as the values are from 0 and up.
Re: check_snmp, performance graph and graph explorer discrep
Posted: Mon Jul 20, 2015 9:08 am
by tgriep
The letter "c" on the output lets the system know that the data is a counter.
There is a formula that the data gets processed through and what you are seeing is rounding errors from that formula.
We are still looking at the issue and we think that a graph template for SNMP counters will have to be created.
If you do remove the letter "c" from the output, it will graph correctly.
Re: check_snmp, performance graph and graph explorer discrep
Posted: Tue Jul 21, 2015 2:22 am
by iptribe
tgriep wrote:The letter "c" on the output lets the system know that the data is a counter.
There is a formula that the data gets processed through and what you are seeing is rounding errors from that formula.
We are still looking at the issue and we think that a graph template for SNMP counters will have to be created.
If you do remove the letter "c" from the output, it will graph correctly.
I shall wait for the new template for SNMP counters then. Tried to edit the existing plugin check_snmp, however, it is in binary format...
Re: check_snmp, performance graph and graph explorer discrep
Posted: Tue Jul 21, 2015 3:52 pm
by jdalrymple
Binary, sure, but the source is readily available:
https://github.com/nagios-plugins/nagio ... eck_snmp.c
I think lines 400-411 are what's gettin ya
Re: check_snmp, performance graph and graph explorer discrep
Posted: Tue Jul 21, 2015 9:15 pm
by iptribe
Thanks jdalrymple. I believe this is the same one that I have. Which does not show the right value in the graph...
Re: check_snmp, performance graph and graph explorer discrep
Posted: Wed Jul 22, 2015 2:13 pm
by ssax
It is the same one, jdalrymple was just offering you the code in case you wanted to try to fix it and recompile it.
I've edited the code to remove the "c" from the sections that jdalrymple mentioned (see attached).
*** Note: this does change it for all counters being returned
check_snmp.zip
Here is how you compile it:
Code: Select all
cd /tmp
wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz
tar zxf nagios-plugins-2.0.3.tar.gz
Unzip the attachment and replace /tmp/nagios-plugins-2.0.3/plugins/check_snmp.c then:
Code: Select all
cd /tmp/nagios-plugins-2.0.3
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
mv /usr/local/nagios/libexec/check_snmp /usr/local/nagios/libexec/check_snmp.old
cp /tmp/nagios-plugins-2.0.3/plugins/check_snmp /usr/local/nagios/libexec/
Re: check_snmp, performance graph and graph explorer discrep
Posted: Thu Jul 23, 2015 10:06 pm
by iptribe
ssax wrote:It is the same one, jdalrymple was just offering you the code in case you wanted to try to fix it and recompile it.
I've edited the code to remove the "c" from the sections that jdalrymple mentioned (see attached).
*** Note: this does change it for all counters being returned
check_snmp.zip
Here is how you compile it:
Code: Select all
cd /tmp
wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz
tar zxf nagios-plugins-2.0.3.tar.gz
Unzip the attachment and replace /tmp/nagios-plugins-2.0.3/plugins/check_snmp.c then:
Code: Select all
cd /tmp/nagios-plugins-2.0.3
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
mv /usr/local/nagios/libexec/check_snmp /usr/local/nagios/libexec/check_snmp.old
cp /tmp/nagios-plugins-2.0.3/plugins/check_snmp /usr/local/nagios/libexec/
I did as you instructed, but it is still showing the same values in the graph with "c". Do I have to delete the existing rrd and xml files for that service so it to generates a new one?
Re: check_snmp, performance graph and graph explorer discrep
Posted: Fri Jul 24, 2015 8:46 am
by tgriep
I have the graph template done that should fix the graphing issue with monitoring counters with SNMP. Here is how to install it.
In Core Config Manager
Create a copy of the check_snmp command and call it check_snmp_gauge
Edit the Command Name to check_snmp_gauge
define command {
command_name check_snmp_gauge
command_line $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
}
Then edit the service check to use the check_snmp_gauge command like below
Code: Select all
define service {
host_name xxx.xxx.xxx.xxx
service_description Test SNMP
check_command check_snmp_gauge! -P 2c -C public -o 1.3.6.1.2.1.4.31.1.1.35.1 -w 100 -c 110 -l test!!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
register 1
}
The graph template is called check_snmp_gauge.cfg and it needs to be uploaded to this folder in the XI system /usr/local/nagios/etc/pnp/check_commands/
Changed the permissions of the check_snmp_gauge.cfg file to the following
chown apache.nagios check_snmp_gauge.cfg
chmod 666 check_snmp_gauge.cfg
Delete the .rrd and .xml files for that service. They are in this folder under the hostname
/usr/local/nagios/share/perfdata/<HostName>/
After 15 minutes, the graph should be populated with the data.
Re: check_snmp, performance graph and graph explorer discrep
Posted: Sun Jul 26, 2015 10:39 pm
by iptribe
tgriep wrote:I have the graph template done that should fix the graphing issue with monitoring counters with SNMP. Here is how to install it.
In Core Config Manager
Create a copy of the check_snmp command and call it check_snmp_gauge
Edit the Command Name to check_snmp_gauge
define command {
command_name check_snmp_gauge
command_line $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
}
Then edit the service check to use the check_snmp_gauge command like below
Code: Select all
define service {
host_name xxx.xxx.xxx.xxx
service_description Test SNMP
check_command check_snmp_gauge! -P 2c -C public -o 1.3.6.1.2.1.4.31.1.1.35.1 -w 100 -c 110 -l test!!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
register 1
}
The graph template is called check_snmp_gauge.cfg and it needs to be uploaded to this folder in the XI system /usr/local/nagios/etc/pnp/check_commands/
Changed the permissions of the check_snmp_gauge.cfg file to the following
chown apache.nagios check_snmp_gauge.cfg
chmod 666 check_snmp_gauge.cfg
Delete the .rrd and .xml files for that service. They are in this folder under the hostname
/usr/local/nagios/share/perfdata/<HostName>/
After 15 minutes, the graph should be populated with the data.
Hi,
I did as u instructed. However, there is no change in the graph.
Command:
2.PNG
Service:
1.PNG
$ARG1$ : -P 2c -C public -o globalStatActiveCalls.summaryPeriod1Current5Minutes -m /usr/share/snmp/mibs/perimeta.mib -c 10000 -l ActiveCalls
Graph Template:
[xxx@NFVI-COMMON-NAGIOS-01 ~]$ ls -l /usr/local/nagios/etc/pnp/check_commands/ |grep snmp
-rw-rw-rw- 1 apache nagios 776 Jul 27 10:10 check_snmp_gauge.cfg
Graph:
3.PNG
Deleted the rrd and xml files too. Did I miss anything?