Ad Widget

Collapse

Official iLO template bug?

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

    #1

    Official iLO template bug?

    Hello,
    I was reviewing https://share.zabbix.com/cat-server-...-hp-ilo-snmpv2
    and I think there may be a bug. There are predefined `TEMP_*` macros in the template as:
    Code:
                <macro>
                   <macro>{$TEMP_CRIT:"Ambient"}</macro>
                   <value>35</value>
                </macro>
                <macro>
                   <macro>{$TEMP_CRIT_LOW}</macro>
                   <value>5</value>
                </macro>
                <macro>
                   <macro>{$TEMP_CRIT}</macro>
                   <value>60</value>
                </macro>
                <macro>
                   <macro>{$TEMP_WARN:"Ambient"}</macro>
                   <value>30</value>
                </macro>
                <macro>
                   <macro>{$TEMP_WARN}</macro>
                   <value>50</value>
                </macro>
    However for example the PSU template trigger use a value `{$TEMP_CRIT:"PSU"}` which was not defined:

    Code:
                         <expression>{Template Server HP iLO SNMPv2:sensor.temp.value[cpqHeTemperatureCelsius.PSU.{#SNMPINDEX}].avg(5m)}&gt;{$TEMP_CRIT:"PSU"}</expression>
    What happens in these cases when the value is missing?

    Thanks!
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1782

    #2
    Hi, TEMP_CRIT will then be used. See the User macro contexts in https://www.zabbix.com/documentation...ros/usermacros:

    When context macros are processed, Zabbix looks up the macro with its context. If a macro with this context is not defined by host or linked templates, and it is not a defined as a global macro with context, then the macro without context is searched for.
    This is very useful way to define "default" macros that can be overridden for specific items if needed, like demonstrated in your iLO template.

    Markku

    Comment

    • yurtesen
      Senior Member
      • Aug 2008
      • 130

      #3
      Hi Markku, thanks for the link to the documentation. Indeed macros seem to be quite versatile. Kiitos

      Comment

      Working...