Page 1 of 1
counter64 ignore check_snmp
Posted: Fri Aug 14, 2015 10:17 am
by vnc786
hi ..
how do i igonre counter64 in output so that my graph does not get impact
check_snmp -H 192.16.2.5 -L authPriv -U user -a MD5 -A password -x DES -X password -P 3 -o mytest -l 'mytest'
SNMP OK - mytest 3457 | 'output'=3457
c
the output is count of number of connection on load balancer
right now i have modified rrddatabase of respective graph using below command
Code: Select all
rrdtool tune server1.rrd -d 1:GAUGE ####it changes value COUNTER to GAUGE
Nagios XI 2014R2.7
check_snmp v2.0.3 (nagios-plugins 2.0.3)
reading
https://nagios-plugins.org/doc/guidelines.html#AEN200
https://bugs.op5.com/view.php?id=8026
Re: counter64 ignore check_snmp
Posted: Fri Aug 14, 2015 12:51 pm
by tgriep
Can you check the rrd file to see if it still set to GAUGE by running the following? We just need the top 20 lines.
There is a post for creating a template which would setup your graphs to use the Gauge for it's settings.
Go to this post for the instructions for creating a template that will graph your data using the GAUGE.
https://support.nagios.com/forum/viewto ... 9&start=10
This is the section of this post you have to start at.
Fri Jul 24, 2015 8:46 am
Re: counter64 ignore check_snmp
Posted: Sat Aug 15, 2015 12:43 am
by vnc786
hi tgriep,
okay i will post pre and post rrd file info once i get to work. Also i am unable to verify your quote it doesn't mention about template. Can you verify again OR I am missing something?
There is a post for creating a template which would setup your graphs to use the Gauge for it's settings.
Go to this post for the instructions for creating a template that will graph your data using the GAUGE.
https://support.nagios.com/forum/viewto ... 9&start=10
This is the section of this post you have to start at.
Fri Jul 24, 2015 8:46 am
I am wandering in Admin->System Config ->Graph Templates
Also for information i am using custom MIB file.
Re: counter64 ignore check_snmp
Posted: Mon Aug 17, 2015 12:54 am
by vnc786
Be default rrd file created information below
#rrdtool info server1.rrd | head -n 20
Code: Select all
filename = "server1.rrd"
rrd_version = "0003"
step = 60
last_update = 1439788816
ds[1].type = "COUNTER"
ds[1].minimal_heartbeat = 8460
ds[1].min = NaN
ds[1].max = NaN
ds[1].last_ds = "2577"
ds[1].value = 1.2056048458e+09
ds[1].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 2880
rra[0].cur_row = 2122
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 2880
Modified rrd file with rrd tune command. i.e rrdtool tune server1.rrd -d 1:GAUGE ####it changes value COUNTER to GAUGE
#rrdtool info server1.rrd | head -n 20
Code: Select all
filename = "server1.rrd"
rrd_version = "0003"
step = 60
last_update = 1439788875
ds[1].type = "GAUGE"
ds[1].minimal_heartbeat = 8460
ds[1].min = NaN
ds[1].max = NaN
ds[1].last_ds = "2483"
ds[1].value = 1.0919408141e+09
ds[1].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 2880
rra[0].cur_row = 2123
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 2880
Below is xml version of above rrd, if this helps
Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<NAGIOS>
<DATASOURCE>
<TEMPLATE>check_xi_service_snmp</TEMPLATE>
<IS_MULTI>0</IS_MULTI>
<DS>1</DS>
<NAME>server1</NAME>
<UNIT>c</UNIT>
<ACT>2272</ACT>
<WARN></WARN>
<WARN_MIN></WARN_MIN>
<WARN_MAX></WARN_MAX>
<WARN_RANGE_TYPE></WARN_RANGE_TYPE>
<CRIT></CRIT>
<CRIT_MIN></CRIT_MIN>
<CRIT_MAX></CRIT_MAX>
<CRIT_RANGE_TYPE></CRIT_RANGE_TYPE>
<MIN></MIN>
<MAX></MAX>
</DATASOURCE>
<RRD>
<RC>0</RC>
<TXT>successful updated</TXT>
</RRD>
<NAGIOS_CHECK_COMMAND>check_xi_service_snmp!-L authPriv -U user -a MD5 -A string -x DES -X string -P 3 -o .1.3.6.1.4.1.3375.2.2.5.2.3.1.8.26.114.101.116.97.105.108.46.97.120.105.115.98.97.110.107.46.99.111.46.105.110.95.112.111.111.108 -l mytest!!!!!!!</NAGIOS_CHECK_COMMAND>
<NAGIOS_DATATYPE>SERVICEPERFDATA</NAGIOS_DATATYPE>
<NAGIOS_DISP_HOSTNAME>192.168.1.1</NAGIOS_DISP_HOSTNAME>
<NAGIOS_DISP_SERVICEDESC>server1</NAGIOS_DISP_SERVICEDESC>
<NAGIOS_HOSTNAME>192.168.1.1</NAGIOS_HOSTNAME>
<NAGIOS_HOSTSTATE>DOWN</NAGIOS_HOSTSTATE>
<NAGIOS_HOSTSTATETYPE>HARD</NAGIOS_HOSTSTATETYPE>
<NAGIOS_MULTI_PARENT></NAGIOS_MULTI_PARENT>
<NAGIOS_PERFDATA>output=2272c </NAGIOS_PERFDATA>
<NAGIOS_RRDFILE>/usr/local/nagios/share/perfdata/192.168.1.1/server1.rrd</NAGIOS_RRDFILE>
<NAGIOS_SERVICECHECKCOMMAND>check_xi_service_snmp!-L authPriv -U user -a MD5 -A string -x DES -X string -P 3 -o .1.3.6.1.4.1.3375.2.2.5.2.3.1.8.26.114.101.116.97.105.108.46.97.120.105.115.98.97.110.107.46.99.111.46.105.110.95.112.111.111.108 -l mytest!!!!!!!</NAGIOS_SERVICECHECKCOMMAND>
<NAGIOS_SERVICEDESC>server1</NAGIOS_SERVICEDESC>
<NAGIOS_SERVICEOUTPUT>SNMP OK - mytest 2272</NAGIOS_SERVICEOUTPUT>
<NAGIOS_SERVICEPERFDATA>output=2272c</NAGIOS_SERVICEPERFDATA>
<NAGIOS_SERVICESTATE>OK</NAGIOS_SERVICESTATE>
<NAGIOS_SERVICESTATETYPE>HARD</NAGIOS_SERVICESTATETYPE>
<NAGIOS_TIMET>1439789284</NAGIOS_TIMET>
<NAGIOS_XMLFILE>/usr/local/nagios/share/perfdata/192.168.1.1/server1.xml</NAGIOS_XMLFILE>
</NAGIOS>
Re: counter64 ignore check_snmp
Posted: Mon Aug 17, 2015 1:11 pm
by tgriep
Can you post a screen shot of the graph that you are having issues with and describe what you would like to see?
Can you check to see if the rrd file didn't get reset by the process_perfdata script but running the following and post the output back here?
Code: Select all
rrdtool info server1.rrd | head -n 20