Skip to main content
Solved

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

  • March 17, 2023
  • 4 replies
  • 239 views

Forum|alt.badge.img+2
  • Steward *
  • 4 replies

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]
 

4 replies

Forum|alt.badge.img+2
  • Author
  • Steward *
  • 4 replies
  • Answer
  • March 20, 2023

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 *
  • 4 replies
  • March 21, 2023

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 *
  • 4 replies
  • March 21, 2023

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 *
  • 4 replies
  • March 21, 2023

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 ?