Ad Widget

Collapse

Template macros and variables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yurtesen
    Senior Member
    • Aug 2008
    • 130

    #1

    Template macros and variables

    Hello,

    I am trying to edit HP iLO template because it has hard coded `$TEMP_CRIT` values although these can be read using SNMP from iLO.
    For example storage battery have max temperature of 60C while BMC has 110C while BMC Zone is 90C. Furthermore the OIDs .1.3.6.1.4.1.232.6.2.6.8.1.3 show these are in the same `$SENSOR_LOCALE`

    So I added <item_prototypes> for reading the threshold temperatures. Then use the values obtained in the expressions. This works fine for the most part. But for example PSU inlet temperature maximums return 0 so they trigger warnings.

    My question is, if there is an easy way to use a pre-defined `$TEMP_CRIT` value if the SNMP value is 0? All I can think of is making a complicated expression, then a complicated recovery expression. Which I would rather avoid if possible. (also how to have expressions span multi-line in template xml files?)

    Thanks
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    As to the multi-line issue, use the (remove the escaping backslash symbol):
    Code:
    &\#13;
    at the end of the line. See example:
    https://git.zabbix.com/projects/ZBX/...edia_slack.xml
    Last edited by dimir; 30-01-2020, 15:54.

    Comment

    Working...