Can not disable sensors.

AIX servers have problem with sensors. All 3 sensors (Temperature, Fanspeed and Voltage) show error: Wrong Type (should be OCTET STRING): NULL.
I what to disable Sensors but it did not work.
Does not work from GUI: Modules -> Discovery Modules -> sensors -> OFF
Does not works in config.php:
$config[‘bad_entity_sensor_regex’][] = ‘/Wrong Type/’;
$config[‘disabled_sensors’][‘current’] = true;

How to disable sensors?

Hi @dlesel
The syntax of $config['bad_entity_sensor_regex'][] = '/Wrong Type/';
is a little different. The regex is matched against the description, so there is no way you can catch “Wrong Type” here.
And $config[‘disabled_sensors’][‘current’] = true; will catch “current” sensor, not voltage, fanspeed and temperature as you seems to need.
You can try :

 $config['os']['aix']['disabled_sensors']['voltage'] = true; 
 $config['os']['aix']['disabled_sensors']['fanspeed'] = true; 
 $config['os']['aix']['disabled_sensors']['temperature'] = true; 


Thank you, but it did not work.
But you gave me an idea.

includes/discovery/ has code for skipping sensors:

if (! empty($sensor_type) && Config::getCombined($device['os'], "disabled_sensors.$sensor_type", false)) {
    return true;

in my case $sensor_type is lmsensors:

select sensor_id,device_id,sensor_type,sensor_descr from sensors;

| sensor_id | device_id | sensor_type | sensor_descr |
| 4 | 85 | lmsensors | Wrong Type (should be OCTET STRING): NULL |
| 5 | 85 | lmsensors | Wrong Type (should be OCTET STRING): NULL |
| 6 | 85 | lmsensors | Wrong Type (should be OCTET STRING): NULL |

This string in config.php worked for me:

$config[‘os’][‘aix’][‘disabled_sensors’][‘lmsensors’] = true;


1 Like

Ohoh. It is sensor_type only here, and not (sensor_type OR sensor_class). I’ll have a look at this.
Thanx for pointing it.

1 Like


that won’t work:

$config['os']['iosxe']['disabled_sensors']['current'] = true;

because “current” or “power”, or “voltage” is a sensor class and not a sensor type

what works:
$config['os']['iosxe']['disabled_sensors']['cisco-entity-sensor'] = true;

but “cisco-entity-sensor” includes all cisco sensor types…

i use now:
$config['os']['iosxe']['disabled_sensors_regex'][] = '/Power/';

however, that is not perfect either, the word “Power” also occurs in other terms.