Logger Questions

Hi all,

I have configured a lot of HP_ILO sensors to monitor my HP DL380 server:

The configuration is the following:

- platform: hp_ilo
    host: 192.168.0.XX
    username: XXXXXXX
    password: XXXXXXXX
    monitored_variables:
        #System Uptime
      - name: System Uptime
        sensor_type: server_power_on_time
        unit_of_measurement: 'min'
        #Ventilation
      - name: System Fan 1
        sensor_type: server_health
        unit_of_measurement: '%'
        value_template: '{{ ilo_data.fans["Fan 1"].speed[0] }}'
      - name: System Fan 2
        sensor_type: server_health
        unit_of_measurement: '%'
        value_template: '{{ ilo_data.fans["Fan 2"].speed[0] }}'
      - name: System Fan 3
        sensor_type: server_health
        unit_of_measurement: '%'
        value_template: '{{ ilo_data.fans["Fan 3"].speed[0] }}'
      - name: System Fan 4
        sensor_type: server_health
        unit_of_measurement: '%'
        value_template: '{{ ilo_data.fans["Fan 4"].speed[0] }}'
      - name: System Fan 5
        sensor_type: server_health
        unit_of_measurement: '%'
        value_template: '{{ ilo_data.fans["Fan 5"].speed[0] }}'
      - name: System Fan 6
        sensor_type: server_health
        unit_of_measurement: '%'
        value_template: '{{ ilo_data.fans["Fan 6"].speed[0] }}'
        #Energy
      - name: Power Supply 2
        sensor_type: server_health
        value_template: '{{ ilo_data.power_supplies["Power Supply 2"].status }}'
      - name: Power Supply 1
        sensor_type: server_health
        value_template: '{{ ilo_data.power_supplies["Power Supply 1"].status }}'
      - name: Current Power
        sensor_type: server_power_readings
        unit_of_measurement: 'Watts'
        value_template: '{{ ilo_data.present_power_reading[0]}}'
        #Temperatures
      - name: Ambient Zone
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 1"].currentreading[0] }}'
      - name: CPU 1
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 2"].currentreading[0] }}'
      - name: CPU 2
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 3"].currentreading[0] }}'
      - name: Memory Zone 1
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 4"].currentreading[0] }}'
      - name: Memory Zone 2
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 5"].currentreading[0] }}'
      - name: Memory Zone 3
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 6"].currentreading[0] }}'
      - name: Memory Zone 4
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 7"].currentreading[0] }}'
      - name: Power Supply 1 Zone
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 8"].currentreading[0] }}'
      - name: Power Supply 2 Zone
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 9"].currentreading[0] }}'
      - name: I/O Board Zone 1
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 10"].currentreading[0] }}'
      - name: I/O Board Zone 2
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 11"].currentreading[0] }}'
      - name: I/O Board Zone 3
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 12"].currentreading[0] }}'
      - name: CPU Zone 1
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 19"].currentreading[0] }}'
      - name: CPU Zone 2
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 20"].currentreading[0] }}'
      - name: CPU Zone 3
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 21"].currentreading[0] }}'
      - name: CPU Zone 4
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 22"].currentreading[0] }}'
      - name: I/O Board Zone 4
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 23"].currentreading[0] }}'
      - name: Memory Zone 5
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 24"].currentreading[0] }}'
      - name: Memory Zone 6
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 25"].currentreading[0] }}'
      - name: Memory Zone 7
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 26"].currentreading[0] }}'
      - name: System Zone
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 29"].currentreading[0] }}'
      - name: I/O Board Zone 5
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: '{{ ilo_data.temperature["Temp 30"].currentreading[0] }}'

The problem is that i´m getting a lot of theese Warn:

2019-07-23 09:58:35 WARNING (MainThread) [homeassistant.components.sensor] Updating hp_ilo sensor took longer than the scheduled update interval 0:00:30
2019-07-23 09:58:48 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.hp_ilo_system_uptime is taking over 10 seconds
2019-07-23 09:59:06 WARNING (MainThread) [homeassistant.components.sensor] Updating hp_ilo sensor took longer than the scheduled update interval 0:00:30
2019-07-23 09:59:11 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.hp_ilo_memory_zone_7 is taking over 10 seconds
2019-07-23 09:59:21 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.hp_ilo_memory_zone_1 is taking over 10 seconds
2019-07-23 09:59:37 WARNING (MainThread) [homeassistant.components.sensor] Updating hp_ilo sensor took longer than the scheduled update interval 0:00:30
2019-07-23 09:59:41 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.hp_ilo_i_o_board_zone_1 is taking over 10 seconds
2019-07-23 09:59:51 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.hp_ilo_system_fan_5 is taking over 10 seconds

I’ve tryed to create a logger exception under the following namespaces without success

logger:
  default: warn
  logs:
    homeassistant.helpers.entity: error
    homeassistant.components.sensor.hp_ilo: error
    homeassistant.components.hp_ilo: error
    homeassistant.components.sensor.EntintyId: error

None of this has worked, ¿anyone knows how to skip theese logging?

Kind regards

It’s not coming from either of those log names. The phrases in the square brackets are what the logger filters off of. So you’d have to use this followed by a restart.

logger:
  default: warn
  logs:
    homeassistant.helpers.entity: error
    homeassistant.components.sensor: error

Personally, I use this because it will show python errors only. Usually the rest of the errors can be worked out without needing the logs. Like through config checker and the sorts.

logger:
  default: critical

I understand that if i set logger like this:

logger:
  default: warn
  logs:
    homeassistant.helpers.entity: error
    homeassistant.components.sensor: error

I would not receive warns from any sensor, the same with this one:

logger:
  default: critical

And I’m confortable with the rest of warning, they have helped me to solve and notice problems. I want to ignore only the ones coming from HP_ILO. It´s not critical info for me so it´s ok to take more time to refresh.

¿anyone has a clue if this is posibble?

It’s not possible because the way the filter works is based off the words inside the brackets. The section that is producing the warnings is: [homeassistant.components.sensor]. So the only way to remove them from the logs is to remove that section. The logging filter doesn’t search anything else, so this is literally your only option.

I’m not sure why you even want the warnings. They are almost always useless. Most components/integrations don’t even use that logging level.

I don´t agree that they are not usefull. I’ve used most of the time to trace components that don´t work properly.

I want all logs that are higher that INFO as i usually do. It’s a pitty the filter is done that way, i think it´s pretty normal to want certain level for a component but other for anotherone