Page 1 of 2
check_xi_service_snmp low threshold (rrd MRTG also)
Posted: Sat May 30, 2020 1:44 pm
by zaji_nms
Dear Expert
want to use NagiosXI inbuilt check_xi_service_snmp with lower and high threshold same time in one Service, how possible?
assume we need mild temperature of 20 degree centigrade every time
if going lower than 18 WARNING, if going lower than 16 CRITICAL
same way
if going higher than 22 WARNING, if going higher than 24 CRITICAL
how possible in this below
-o '1.3.6.1.4.1.x.x.x.x.x' -C 'public' -P 2c -wl 18 -cl 16 -wh 22 -ch 24
the above is u can say guideline , pseudo code.
-wl = Warning Lower
-cl = Critical Lower
-wh = Warning High
-ch = Critical High
please modify above $ARG1$ in true way
regards
Re: check_xi_service_snmp threshold
Posted: Mon Jun 01, 2020 2:48 pm
by cdienger
check_xi_service_snmp is a command definition which uses the check_snmp plugin.
The check_snmp plugin can specify a range using the -w and -c options
Ranges can be defined as described in
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT.
This should do the trick:
Code: Select all
-o '1.3.6.1.4.1.x.x.x.x.x' -C 'public' -P 2c -w 18:22 -c 16:24
Re: check_xi_service_snmp threshold
Posted: Tue Jun 02, 2020 3:03 pm
by zaji_nms
thanks for trick....will see how its works.
just want to clear for other users too, its like this or that (This:That)
if temperature is gone down to 18 or shoot upto 22 --- Warning
if temperature went down to 16 or shooted to 24 --- Critical
okay then can you do something for MRTG
$USER1$/check_rrdtraf -f /var/lib/mrtg/$ARG1$ -w $ARG2$ -c $ARG3$ -l $ARG4$
its perfectly working for Higher bandwidth, is there anyway to set Lower Threshold, is there any trick here too?
if not, then please consider for minor feature request in NagiosXI 6.0
Re: check_xi_service_snmp threshold
Posted: Wed Jun 03, 2020 11:20 am
by ssax
This means it will warn if below 18 and critical if below 16.
This also means warn if higher than 22 and critical if higher than 24
check_rrdtraf supports the same threshold format, please read here to see the examples:
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT
Re: check_xi_service_snmp threshold also in rrdtraf
Posted: Fri Jun 05, 2020 1:37 pm
by zaji_nms
dear ssax
no.....for MRTG the lower threshold not working
[nagios@ ~]$ /usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/myrouter_903.rrd -w 1:2,1:2 -c .5:2.5,.5:2.5 -l M
OK (903) Current BW in: .01Mbps Out: .04Mbps|in=.015851Mb/s;1:2;.5:2.5 out=.046342Mb/s;1:2;.5:2.5
It should give CRITICAL - Low , but looks not working or you have to give some idea.
$ARG2$ = 1:2,1:2
$ARG3$ = .5:2.5,.5:2.5
I want to set WARNING if less then <1Mbps or >2Mbps
CRITICAL if less than <.5Mbps or >2.5Mbps
regards
Re: check_xi_service_snmp threshold
Posted: Fri Jun 05, 2020 3:51 pm
by ssax
It's working properly on mine, what version of the plugin are you using? (mine is 0.5)
/usr/local/nagios/libexec/check_rrdtraf -V
Code: Select all
[root@xid ~]# /usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/192.168.X.X_XXXX.rrd -w 1:2,1:2 -c .5:2.5,.5:2.5 -l M
CRITICAL - Current BW in: .97Mbps Out: 13.79Mbps|in=.977452Mb/s;1:2;.5:2.5 out=13.794772Mb/s;1:2;.5:2.5
Re: check_xi_service_snmp threshold also RRD MRTG
Posted: Sun Jun 07, 2020 1:48 am
by zaji_nms
dear ssax
mine is same
[root@] /usr/local/nagios/libexec/check_rrdtraf -V
check_rrdtraf v0.5
in your example its CRITICAL due to High Utilization.....plz test on LOW Warning and LOW Critical
Regards
Re: check_xi_service_snmp threshold
Posted: Mon Jun 08, 2020 3:47 pm
by ssax
See here, it also works:
Code: Select all
[root@xid tmp]# /usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/192.168.5.89_10135.rrd -w 1:30,1.27:30 -c 1:30,1:30 -l M
WARNING - Current BW in: 4.11Mbps Out: 1.26Mbps|in=4.111375Mb/s;1:30;1:30 out=1.260709Mb/s;1.27:30;1:30
Code: Select all
[root@xid tmp]# /usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/192.168.5.89_10135.rrd -w 1:30,1:30 -c 1:30,1.27:30 -l M
CRITICAL - Current BW in: 4.11Mbps Out: 1.26Mbps|in=4.111375Mb/s;1:30;1:30 out=1.260709Mb/s;1:30;1.27:30
Re: check_xi_service_snmp threshold
Posted: Wed Jun 10, 2020 8:24 am
by zaji_nms
sorry, not working, checked with one of my friend having XI5.6.7, he said not working too.
[root]# ./check_rrdtraf -f /var/lib/mrtg/myrouter_533.rrd -w 10:900,10:900 -c 5:950,5:950
(standard_in) 1: illegal character: :
(standard_in) 1: syntax error
(standard_in) 1: illegal character: :
(standard_in) 1: syntax error
./check_rrdtraf: line 306: [: too many arguments
(standard_in) 1: illegal character: :
(standard_in) 1: syntax error
(standard_in) 1: illegal character: :
(standard_in) 1: syntax error
./check_rrdtraf: line 311: [: too many arguments
OK Current BW in: 9.68Mbps Out: 19.08Mbps|in=9.685676Mb/s;10:900;20:950 out=19.089516Mb/s;10:900;20:950
Re: check_xi_service_snmp threshold
Posted: Wed Jun 10, 2020 4:34 pm
by ssax
Please send me these files:
Code: Select all
/usr/local/nagios/libexec/check_rrdtraf
/usr/local/nagios/libexec/utils.sh