Checkmk built in temperature metric and units °C/°F/K

Hi cmk people,

I’m writing a check plugin for Sentry4 pdu temperature and humidity. I found the existing metric for temperature called ‘temp’ within environment.py and an existing parameter set in temperature.py

I’m having difficulty deciding what to do with the parameters, because there is a lot of logic required and most parameters are not relevant for this check.

The default metric ‘temp’ supports only Celsius, and the parameters are as follows

levels - °C
levels_lower - °C
input_unit - °C/°F/K
output_unit - °C/°F/K
device_levels_handling
trend_compute

The temperature sensor supports Celsius and Fahrenheit… but since the metric ‘temp’ only has Celsius my plan is to convert to Celsius if the unit is Fahrenheit specified by the device via SNMP.

The upper and lower levels are easy

There is no reason to implement input_unit or output_unit since the input is handled by SNMP and the only output_unit available for the metric is Celsius

device_levels_handling and trend_compute seem to be overkill for what I’m doing.

Would it be better to write my own metric and simpler parameter set, or use the built in ones and ignore the parameters that aren’t needed? I’m leaning towards the latter… thoughts?