Ad Widget

Collapse

Trigger prototype question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • welle
    Junior Member
    • Apr 2013
    • 3

    #1

    Trigger prototype question

    I would like to use {#TRIGGERVALUE} in a Trigger Prototype in my Template.

    I can't get the following to work

    <trigger_prototype>
    <expression>{MyTemplate:myZabbix.fetch[{#ZABBIXPATH}].last(0)}&gt{#TRIGGERVALUE}</expression>
    <name>{#MYLABEL}</name>
    <url/>
    <status>0</status>
    <priority>2</priority>
    <description/>
    <type>0</type>
    </trigger_prototype>

    Both {#ZABBIXPATH} and {#MYLABEL} works ok but not {#TRIGGERVALUE}!
    The follwong expression with a hardcoded value of 100 works:

    <expression>{MyTemplate:myZabbix.fetch[{#ZABBIXPATH}].last(0)}&gt 100</expression>

    Is there a way of controlling the trigger value using parameters set from the Zabbix agent?
  • BDiE8VNy
    Senior Member
    • Apr 2010
    • 680

    #2
    What exactly are you trying to do?
    Is {#TRIGGERVALUE} a macro returned/set by the LLD function or did you actually want {TRIGGER.VALUE}?

    Comment

    • welle
      Junior Member
      • Apr 2013
      • 3

      #3
      Sorry, yes {#TRIGGERVALUE} a macro returned/set by the LLD function.

      Comment

      • BDiE8VNy
        Senior Member
        • Apr 2010
        • 680

        #4
        I'm still not sure what the aim is. Does this work for you?
        Code:
        {MyTemplate:myZabbix.fetch[{#ZABBIXPATH}].last(0)}>{#TRIGGERVALUE}

        Comment

        • welle
          Junior Member
          • Apr 2013
          • 3

          #5
          No it doesn't work. That was what I tested first ;-)

          No matter if I import the Template or try to change the Trigger Prototype to
          Code:
          {MyTemplate:myZabbix.fetch[{#ZABBIXPATH}].last(0)}>{#TRIGGERVALUE}
          It produce the following error:

          Code:
          Incorrect trigger expression. Check expression part starting from ">{#TRIGGERVALUE}".
          I have verified that the answer from the server contains {#TRIGGERVALUE}

          Comment

          • BDiE8VNy
            Senior Member
            • Apr 2010
            • 680

            #6
            Arr, I totally forgot that issue :-)

            "LLD macros can be used: [...] for trigger prototypes in [...] expressions (insofar as when referencing an item key prototype) [...]" (see Macros used in low-level discovery

            So the only way might be to add another item prototype which owns the value and use this instead the LLD macro.
            See post Edit vfs.fs.size trigger NOT to go off for disk C: for such work-around.

            Comment

            Working...