[ZBX-15659] sensors item not returning correct values Created: 2019 Feb 16  Updated: 2019 Feb 18  Resolved: 2019 Feb 18

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 4.2.0alpha3
Fix Version/s: None

Type: Problem report Priority: Major
Reporter: florius Assignee: Zabbix Support Team
Resolution: Won't fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Steps to reproduce:

Sensors module seems to be hardcoded with max and min, and both return 'input' value in stead of giving an error, and both 'high' and 'crit' return an error, which it shouldn't:

# sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +34.0°C (high = +69.0°C, crit = +79.0°C)
Core 1: +35.0°C (high = +69.0°C, crit = +79.0°C)
Core 2: +37.0°C (high = +69.0°C, crit = +79.0°C)
Core 8: +31.0°C (high = +69.0°C, crit = +79.0°C)
Core 9: +38.0°C (high = +69.0°C, crit = +79.0°C)
Core 10: +39.0°C (high = +69.0°C, crit = +79.0°C)

 

root@localhost:~# zabbix_get -s localhost -k 'sensor[coretemp-isa-0000,temp2,max]'
34.000000
root@localhost:~# zabbix_get -s localhost -k 'sensor[coretemp-isa-0000,temp2,min]'
34.000000
root@localhost:~# zabbix_get -s localhost -k 'sensor[coretemp-isa-0001,temp2, high]'
ZBX_NOTSUPPORTED: Invalid third parameter.
root@localhost:~# zabbix_get -s localhost -k 'sensor[coretemp-isa-0001,temp2, crit]'
ZBX_NOTSUPPORTED: Invalid third parameter.

Result:

root@localhost:~# zabbix_get -s localhost -k 'sensor[coretemp-isa-0000,temp2,max]'
34.000000
root@localhost:~# zabbix_get -s localhost -k 'sensor[coretemp-isa-0000,temp2,min]'
34.000000
root@localhost:~# zabbix_get -s localhost -k 'sensor[coretemp-isa-0001,temp2, high]'
ZBX_NOTSUPPORTED: Invalid third parameter.
root@localhost:~# zabbix_get -s localhost -k 'sensor[coretemp-isa-0001,temp2, crit]'
ZBX_NOTSUPPORTED: Invalid third parameter.

*Expected:*root@localhost:~# zabbix_get -s localhost -k 'sensor[coretemp-isa-0000,temp2,max]'
ZBX_NOTSUPPORTED: Invalid third parameter.
root@localhost:~# zabbix_get -s localhost -k 'sensor[coretemp-isa-0000,temp2,min]'
ZBX_NOTSUPPORTED: Invalid third parameter.

  1. root@localhost:~# zabbix_get -s localhost -k 'sensor[coretemp-isa-0001,temp2, high]'
    69.000000
    root@localhost:~# zabbix_get -s localhost -k 'sensor[coretemp-isa-0001,temp2, crit]'
    79.000000


 Comments   
Comment by florius [ 2019 Feb 16 ]

Expected:

root@localhost:~# zabbix_get -s localhost -k 'sensor[coretemp-isa-0000,temp2,max]'
ZBX_NOTSUPPORTED: Invalid third parameter.
root@localhost:~# zabbix_get -s localhost -k 'sensor[coretemp-isa-0000,temp2,min]'
ZBX_NOTSUPPORTED: Invalid third parameter.
root@localhost:~# zabbix_get -s localhost -k 'sensor[coretemp-isa-0001,temp2, high]'
69.000000
root@localhost:~# zabbix_get -s localhost -k 'sensor[coretemp-isa-0001,temp2, crit]'
79.000000

Comment by richlv [ 2019 Feb 16 ]

This might be normal. high/crit are threshold values, I believe Zabbix does not support returning those (they come from lm_sensors config file anyway).

Comment by Arturs Lontons [ 2019 Feb 18 ]

Hi,

richlv is right. As per our documentation, the possible mode values are:

 possible values: avg, max, min

If you'd like to request some changes to the sensor mode parameter behavior, you should create a feature request describing the desired behavior.

Generated at Fri Mar 29 00:36:22 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.