Can not disable sensors.

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

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?
Thanks,
David.

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; 

Bye

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

includes/discovery/functions.inc.php 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;

Thanks,
david.

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.