blind-oracle / zabbix-sensors

Zabbix template & scripts to discover & monitor Linux sensors
36 stars 15 forks source link

Cannot evaluate expression: Invalid macro '{$SENSORS_HIGH}' value on Zabbix 4.0.1 #3

Closed VChernenkoRT closed 4 years ago

VChernenkoRT commented 4 years ago

Everything seems fine despite of triggers not working in Z401 with "Invalid macro '{$SENSORS_HIGH}' value", "Invalid macro '{$SENSORS_CRIT}' value". How to fix this behavior?

blind-oracle commented 4 years ago

Hi. It's strange, the {$SENSORS_CRIT} macro is defined in the template and should work. It worked for me on 4.4 and now works on 5.0

You can try upgrading Zabbix (maybe there's some bug in 4.0.1) or replacing macros with some values in a trigger.

VChernenkoRT commented 4 years ago

as I see in discover-sensors.py there is no sensor type "SENSORS" (lines 27-30), therefore discover-sensors.py cannot output {$SENSORS_HIGH} and {$SENSORS_CRIT} data which exists in template triggers.

VChernenkoRT commented 4 years ago

aaand theres no {$SENSORS_HIGH} and {$SENSORS_CRIT} overriding macros/values in template_sensors.xml

blind-oracle commented 4 years ago

These are template-level macros, they're defined in the template and have some defaults. They're used if you don't override them on the host level.

blind-oracle commented 4 years ago

aaand theres no {$SENSORS_HIGH} and {$SENSORS_CRIT} overriding macros/values in template_sensors.xml

Yes I guess I forgot to add them. They're there in my own template, but not in github for whatever reason. I'll fix it, sorry.