Ad Widget

Collapse

Display value of different item in trigger notification

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • onallion
    Senior Member
    • Mar 2016
    • 131

    #1

    Display value of different item in trigger notification

    Hey guys,

    So I have basic items and triggers for disk space, and I have a trigger for 5% free disk usage.

    My boss wants the alert mail subject line to not only show "Free disk space is less than 5% on volume {#FSNAME}" but ALSO show the actual value in b/kb/gb, which come from another item entirely.

    So can I show the current value of another item in the subject line? If not, is there any other way you would recommend to accomplish this?

    Thanks!
    Last edited by onallion; 15-03-2017, 17:21.
  • GPegel
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2015
    • 113

    #2
    Put this in your subject line:

    Code:
    {TRIGGER.STATUS}: {HOST.NAME} -  {TRIGGER.NAME} - {ITEM.VALUE1}

    Comment

    • onallion
      Senior Member
      • Mar 2016
      • 131

      #3
      Thanks, from my understanding that will give me the current item value.

      I want to display the value of another item

      Comment

      • GPegel
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2015
        • 113

        #4
        The trigger is based on your item that checks if the free disk space is less then 5% isnt't it? The item.value is giving you the exact amount of free disk space at that moment in MB.

        For example:

        Code:
        {hostname:vm.memory.size[available].last(0)}<20M
        this trigger goes into an alert when the free memory size is beneath the 20MB. But it actually also collects the data about the current value about this item.

        So when this trigger is activated the subject in my email looks like this:

        PROBLEM: hostname - Lack of available memory on server servername = 15.52 MB

        Comment

        • onallion
          Senior Member
          • Mar 2016
          • 131

          #5
          In my case the item is giving me a percentage, not the actual value:

          Code:
          vfs.fs.size[{#FSNAME},pfree]
          I have another item that checks the actual value:

          Code:
          vfs.fs.size[{#FSNAME},free]
          So the trigger is for the first one, but I want to also display the value of the second one
          Last edited by onallion; 15-03-2017, 16:13.

          Comment

          • GPegel
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2015
            • 113

            #6
            Ah yes sorry now I understand.

            And what about the idea to create a trigger based on two items? Don't know if it is possible but you could always try.
            Last edited by GPegel; 15-03-2017, 16:19.

            Comment

            • onallion
              Senior Member
              • Mar 2016
              • 131

              #7
              That's interesting, if possible.
              So I make a trigger based on two items and I display "item.value2"?

              I guess I could make it something like "trigger when below 5% OR below 200mb" or something?

              Comment

              • GPegel
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Dec 2015
                • 113

                #8
                That is indeed what I'm thinking about. But I'm not sure if it is going to work. Never tried this one. I would be very interested if this is going to work.

                Comment

                • onallion
                  Senior Member
                  • Mar 2016
                  • 131

                  #9
                  It works!

                  This is the trigger:

                  Code:
                  (({Template OS Windows - test:vfs.fs.size[{#FSNAME},pfree].max(5)}<5) or ({Template OS Windows - test:vfs.fs.size[{#FSNAME},free].max(5)}<50M))
                  And the trigger name:

                  Code:
                  {HOST.NAME} - Free disk space is less than 5% ({ITEM.VALUE2}) on volume {#FSNAME}
                  Last edited by onallion; 15-03-2017, 16:46.

                  Comment

                  • GPegel
                    Senior Member
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • Dec 2015
                    • 113

                    #10
                    High five!!!

                    Comment

                    • Mussolini
                      Junior Member
                      • Oct 2013
                      • 1

                      #11
                      Originally posted by onallion
                      It works!

                      This is the trigger:

                      Code:
                      (({Template OS Windows - test:vfs.fs.size[{#FSNAME},pfree].max(5)}<5) or ({Template OS Windows - test:vfs.fs.size[{#FSNAME},free].max(5)}<50M))
                      And the trigger name:

                      Code:
                      {HOST.NAME} - Free disk space is less than 5% ({ITEM.VALUE2}) on volume {#FSNAME}
                      I have pretty the same situation here. I have two itens, one to get a hard drive status and another one to get the serial number. So, I want to have the drive's serial number in the same email when trigger is pulled due to a disk failure. I guess I'm almost there but stil strugling.

                      Comment

                      Working...