Skip to main content
Question

Généric SNMP OID

  • Nov 13, 2024 10:07 AM UTC
  • 4 replies
  • 151 views

Forum|alt.badge.img+4

Good morning,

I don't understand why when I query an OID with the plugin, it doesn't go critical as requested.
Am I doing it wrong? the format is not correct?
If anyone can guide me please :)

it's always OK

Thank you in advance for your help,
Sincerely

 

4 replies

Forum|alt.badge.img+7
  • Steward *
  • Nov 15, 2024 10:37 AM UTC

Hi,

For threshold and ranges, you should read that nagios page :

https://nagios-plugins.org/doc/guidelines.html#THRESHOLDFORMAT

Try 3 instead 2 in CRITICAL field.

Regards


Forum|alt.badge.img+4
  • Author
  • Steward **
  • Nov 18, 2024 10:54 AM UTC

Thank you for this feedback, 
I didn't understand that they were thresholds!
The problem is that my oid returns: 2=OK and 1=KO...
How can I act on these results please?
Sincerely


Forum|alt.badge.img+7
  • Steward *
  • Nov 18, 2024 11:10 AM UTC

Hi,

 

Centreon documentation :

https://docs.centreon.com/docs/24.04/monitoring/metrics/#syntax-of-metric-thresholds

 

 

You can try 2:2. It will be OK when return value is 2 and CRITICAL when return value is different.

 

Regards.


Forum|alt.badge.img+4
  • Author
  • Steward **
  • Nov 18, 2024 1:10 PM UTC

Thank you very much for your help,
It works perfectly now, I have a lot of trouble with syntax and regex :).

Thank you and the entire community.
Sincerely