centreon / centreon-plugins

Collection of standard plugins to discover and gather cloud-to-edge metrics and status across your whole IT infrastructure.
https://www.centreon.com
Apache License 2.0
311 stars 274 forks source link

Geist plugin thresholds not working #3752

Open dajones70 opened 2 years ago

dajones70 commented 2 years ago

warning and critical thresholds appear to be ignored. No matter what value or range format I try, it always returns OK.

[root@icinga01 plugins]# '/usr/lib64/nagios/plugins/centreon-plugins/centreon_plugins.pl' '--plugin' 'hardware::sensors::geist::snmp::plugin' '--mode' 'sensors' '--hostname' '10.28.33.22' '--snmp-community' '****' '--snmp-port' '161' '--warning-climate-temperature' '27' '--critical-climate-temperature' '29' '--snmp-version' '2'

OK: Internal 'Watchdog 15' temperature 48.5 C, humidity 51.00 %, dew point 37.0555555555556 C | 'Watchdog 15#sensor.internal.temperature.celsius'=48.5C;;;; 'Watchdog 15#sensor.internal.humidity.percentage'=51.00%;;;0;100 'Watchdog 15#sensor.internal.dewpoint.celsius'=37.0555555555556C;;;;

The perf data is not showing the threshold either leading me to believe that these arguments are not "connected" to the code logic and it's using high default values.

Also, I am not able to change the number of decimal places with "--float-precision" either. Any argument I try seems to be ignored.

Finally, could the plugin be updated to provide Fahrenheit input and output for those of us in the United States. :)

Thanks in advance, Dave

Sims24 commented 2 years ago

Hi,

For the threshold in the perfdata, it seems you're not using the right option.

With --warning-internal-temperature or --critical-internal-temperature you will see the value in perfdata.

About Farenheit, there's an available OID in the MIB, so we will look into it to implement an option allowing to choose F instead of C.

If you can share a snmpwalk it would help (by mail if contains sensitive information).

Kind regards

dajones70 commented 2 years ago

What is the correct/right option then? Sorry, it's not clear to me based on the --help output or the perfdata.

There is another issue that contains the snmpwalk of this type of device that I found. It was te original request to have it added to the centreon plugin. I can provide another snmpwalk tomorrow if needed.

Sims24 commented 2 years ago

So don't worry, I'll find the snmpwalk in the previous issue.

We'll keep you posted.

garnier-quentin commented 2 years ago

You can configure the geist equipment to use fahrenheit. If you can configure your geist equipment like that and provide the full snmpwalk ? I think i don't manage it well

dajones70 commented 2 years ago

I don't have admin access to this device to change it to Fahrenheit. Zabbix is able to monitor it in F without changing any settings.

garnier-quentin commented 2 years ago

I can add an option for that specific mode. I would prefer to add a global option but i cant (it would be too dirty) without a refactoring.

lucie-dubrunfaut commented 3 months ago

Hello :)

This issue seems particularly and is about several things.

First about the options you used --warning-climate-temperature and --critical-climate-temperature are only available for geist version 3 not for version 4 (in your case). The plugin search for oid matching with version 3 (oid_climateCount = '.1.3.6.1.4.1.21239.2.1.8.1.2.0') if the OID isn't found, the plugin switch in version 4 with the following options available : internal-temperature, internal-humidity, internal-dewpoint. However, the problem encountered here indicates to me that it would be relevant to change the help/documentation on this subject.

Then about the --float-precision option, this one is generic for all our plugins. Can you confirm us if you use it in the right options for geist version 4 you can use it?

And finally, about the Fahrenheit conversion, if the enhancement request is still current, please address it here to be take into account and vote on.

Thank you for your understanding.