Skip to main content
Solved

Change state (CRITICAL, OK) in term of data performance

  • Mar 17, 2023 11:22 AM UTC
  • 4 replies
  • 300 views

Forum|alt.badge.img+2

Hi all,

I want to test ETH via OID 1.3.6.1.2.1.2.2.1.8.XXX

 

It’s work but state stay at OK while the ETH is UP (1) or DOWN (2).

 

Performance data shown : 'value'=2;;0:2;; where the first “2” indicate the down status.

 

How to change status to CRITICAL when the performance data show 2 ?

 

I use centreon_generic_snmp.pl and this command to test this :

 

$CENTREONPLUGINS$/centreon_generic_snmp.pl  --plugin=apps::protocols::snmp::plugin --mode=numeric-value --hostname=192.168.1.1 --snmp-community=snmp_community --snmp-version=1 --oid=1.3.6.1.2.1.2.2.1.8.1 --warning=$_SERVICEWARNING$ --critical=$_SERVICECRITICAL$ $_SERVICEOPTIONS$

 

Thx for all.

Best answer by Mzr

I resolve my issue by changing script cehck by : http://nagios.manubulon.com/check_snmp_int.pl

And change $descr_table to match with ethxx :

[code]my $descr_table = '1.3.6.1.2.1.31.1.1.1.1';
# pour le nom de l'eth : my $descr_table = '1.3.6.1.2.1.2.2.1.2';[/code]
 

View original

4 replies

Forum|alt.badge.img+2
  • Author
  • Steward *
  • Answer
  • Mar 20, 2023 10:47 AM UTC

I resolve my issue by changing script cehck by : http://nagios.manubulon.com/check_snmp_int.pl

And change $descr_table to match with ethxx :

[code]my $descr_table = '1.3.6.1.2.1.31.1.1.1.1';
# pour le nom de l'eth : my $descr_table = '1.3.6.1.2.1.2.2.1.2';[/code]
 


Forum|alt.badge.img+2
  • Author
  • Steward *
  • Mar 21, 2023 8:14 AM UTC

In fact, this plugin only indicate if there is un path plugged and dident analyse the performance data which is the only information contains if my eth is connected AND ready : the "2" value in : 'value'=2;;0:2;;


Forum|alt.badge.img+2
  • Author
  • Steward *
  • Mar 21, 2023 9:12 AM UTC

Ok, it works.

 

The goad is to use this plugin : https://exchange.nagios.org/directory/Plugins/Network-Protocols/SNMP/check_snmp_oid/details

And play with max et min value and voilà !


Forum|alt.badge.img+2
  • Author
  • Steward *
  • Mar 21, 2023 2:37 PM UTC

Grrrrr, this plugin doesn’t read perfdata… 

I want CRITICAL status when the 2 is showned here in the performance data : ''=1;;0:2;; AND on th first position : ''=2;;;;

 

Any idea ?