Each sensor chip gets its own directory in the sysfs /sys/devices tree. To find all sensor chips, it is easier to follow the device symlinks from /sys/class/hwmon/hwmon*, where * is a real number (0,1,2,...).
The sensor readings are located either in /sys/class/hwmon/hwmon*/ directory for virtual devices, or in /sys/class/hwmon/hwmon*/device directory for non-virtual devices. A file, called name, located inside hwmon* or hwmon*/device directories contains the name of the chip, which corresponds to the name of the kernel driver used by the sensor chip.
There is only one sensor reading value per file. The common scheme for naming the files that contain sensor readings inside any of the directories mentioned above is: <type><number>_<item>, where
The information regarding sensors available on the host can be acquired using sensor-detect and sensors tools (lm-sensors package: http://lm-sensors.org/). Sensors-detect helps to determine which modules are necessary for available sensors. When modules are loaded the sensors program can be used to show the readings of all sensor chips. The labeling of sensor readings, used by this program, can be different from the common naming scheme (<type><number>_<item> ):
This labeling allows user to determine what kind of hardware is used. If there is neither <type><number>_label file nor label inside the configuration file the type of hardware can be determined by the name attribute (hwmon*/device/name). The actual names of sensors, which zabbix_agent accepts, can be obtained by running sensors program with -u parameter (sensors -u).
In sensor program the available sensors are separated by the bus type (ISA adapter, PCI adapter, SPI adapter, Virtual device, ACPI interface, HID adapter).
(Az érzékelők leolvasása a /proc/sys/dev/sensors könyvtárból származik)
A Zabbix 1.8.4 előtt a szenzor[temp1] formátumot használták.
(Az érzékelők leolvasása a /sys/class/hwmon könyvtárból származik)
sensor[k8temp-pci-00c3,temp,max] vagy sensor[0000:00:18.3,temp1]
érzékelő[smsc47b397-isa-0880,in,avg] vagy érzékelő[smsc47b397.2176,in1]
Sensor labels, as printed by the sensors command, cannot always be used directly because the naming of labels may be different for each sensor chip vendor. For example, sensors output might contain the following lines:
Out of these, only one label may be used directly:
Attempting to use other labels (like Vcore or +12V) will not work.
To find out the actual sensor name, which can be used by Zabbix to retrieve the sensor readings, run sensors -u. In the output, the following may be observed:
So Vcore should be queried as in1, and +12V should be queried as in4.1
Not only voltage (in), but also current (curr), temperature (temp) and fan speed (fan) readings can be retrieved by Zabbix.