Skip to main content

hello

the regexp doesnt find the Power sensor i want check:

/usr/lib/centreon/plugins/centreon_cisco_standard_snmp.pl --plugin=network::cisco::standard::snmp::plugin --mode=environment --hostname=10.1.2.37 --snmp-version='2c' --snmp-community='-------' --component='sensor' --critical='sensors,.*Receive Power Sensor.*,-50:10'
CRITICAL: Sensor 'TenGigabitEthernet1/0/2 Receive Power Sensor/1073' is -40 dBm | 'sensor.celsius_TenGigabitEthernet1/0/1 Module Temperature Sensor'=35.7C;0.1:69.9;-4.9:74.9;;  'sensor.dBm_TenGigabitEthernet1/0/2 Transmit Power Sensor'=-3dBm;-5.9:-1.1;-7.9:-0.1;; 'sensor.dBm_TenGigabitEthernet1/0/2 Receive Power Sensor'=-40dBm;-14:-1.1;-15.3:-0.1;; 'count_sensor'=10;;;;

with the threshold i set plugin should be in status OK not Critical
which is the right regexp syntax ?

 

Hello :)

Unfortunately this is a known issue (thresholds for temperature not working) for which a dev ticket already exists. I'm linking to your question so that when it's released you'll be informed in this topic.

Kind regards


Hello :)

Unfortunately this is a known issue (thresholds for temperature not working) for which a dev ticket already exists. I'm linking to your question so that when it's released you'll be informed in this topic.

Kind regards

hello thanks for reply but not in the scope
The metric Sensor 'TenGigabitEthernet1/0/2 Receive Power Sensor/1073' with a value of -40 dBm monitors the optical receive power on the interface TenGigabitEthernet1/0/2. Not the temperature.
i find why the plugin is critical : they are default tresholds set directly in the plugin perl code


It turns out the issue is likely due to default thresholds hardcoded in the plugin itself, not the ones I explicitly set via --critical.

After checking the source code (sensor.pm and environment.pm), I noticed that default thresholds are applied internally depending on the sensor type (e.g. dBm, voltage, etc.), even if you override them with --critical or --warning.

This behavior can cause the plugin to return CRITICAL even if your custom threshold should result in OK.

It's not intuitive, and unfortunately, this is not documented in the plugin help nor in the official Centreon plugin documentation — you need to dig into the Perl code to understand it.

Possibly the option --threshold-overload could be used to disable default thresholds and allow only user-defined ones — needs testing.


Hello :)

Unfortunately, the problem reported was related to the critical and warning options, but also to the threshold-overload option, which doesn't seem to work (you can try it). We're working on the issue and hope to be able to provide you with a fix soon.


Reply