check_snmp, performance graph and graph explorer discrepancy
Re: check_snmp, performance graph and graph explorer discrep
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.
Former Nagios employee
Re: check_snmp, performance graph and graph explorer discrep
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.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.
Re: check_snmp, performance graph and graph explorer discrep
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.
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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_snmp, performance graph and graph explorer discrep
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...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.
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: check_snmp, performance graph and graph explorer discrep
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
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
jdalrymple wrote: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
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
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
Here is how you compile it:
Unzip the attachment and replace /tmp/nagios-plugins-2.0.3/plugins/check_snmp.c then:
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
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.gzCode: 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/You do not have the required permissions to view the files attached to this post.
Re: check_snmp, performance graph and graph explorer discrep
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
Here is how you compile it:
Unzip the attachment and replace /tmp/nagios-plugins-2.0.3/plugins/check_snmp.c then: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
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
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
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.
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
}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.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_snmp, performance graph and graph explorer discrep
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
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/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 }
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: Service:
Graph Template:$ARG1$ : -P 2c -C public -o globalStatActiveCalls.summaryPeriod1Current5Minutes -m /usr/share/snmp/mibs/perimeta.mib -c 10000 -l ActiveCalls
[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: Deleted the rrd and xml files too. Did I miss anything?
You do not have the required permissions to view the files attached to this post.