Ad Widget

Collapse

I want to write a trigger with system.uptime

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karzer
    Member
    • Mar 2010
    • 61

    #1

    I want to write a trigger with system.uptime

    Hi, I want to write a trigger with system.uptime, down from 900 last value must be given if notification closes and final value of 400 is opened up when I want to give the warning I wonder how can we do?

    system.uptime.last (0))> 400 (open)
    system.uptime.last (0)) <800 (closes)
  • jerrylenk
    Member
    Zabbix Certified Specialist
    • May 2010
    • 62

    #2
    I try

    Originally posted by karzer
    Hi, I want to write a trigger with system.uptime, down from 900 last value must be given if notification closes and final value of 400 is opened up when I want to give the warning I wonder how can we do?

    system.uptime.last (0))> 400 (open)
    system.uptime.last (0)) <800 (closes)

    Hi Karzer,
    I'm not at all sure if I understand, what your question is but I'm giving it a try:

    You want a trigger, that turns "ON" at uptime 400 sec.
    and back "OFF" at 900 sec. That would be:

    {Jysles:system.uptime.last(0)}<900 & {Jysles:system.uptime.last(0)}>400

    ("Jysles" is my machine, replace it with the name of yours)

    If that was not what you asked, try once more

    cu, Jerry

    Comment

    • karzer
      Member
      • Mar 2010
      • 61

      #3
      Code:
      (Jysles: system.uptime.last (0)) <900 & (Jysles: system.uptime.last (0))> 400
      This trigger only works between 900 and 400. I want to exceed 400 when it opened as a warning I want to give. 900 reputation has been closed down under the thoughts I want to give warnings. ACTIONS I'm also a warning. My purpose of opening and closing of real time server monitoring and to intervene accordingly.

      Comment

      • jerrylenk
        Member
        Zabbix Certified Specialist
        • May 2010
        • 62

        #4
        I'm so sorry I really don't understand you.
        Jerry

        Comment

        • sega
          Junior Member
          • May 2010
          • 11

          #5
          Originally posted by karzer
          Hi, I want to write a trigger with system.uptime, down from 900 last value must be given if notification closes and final value of 400 is opened up when I want to give the warning I wonder how can we do?

          system.uptime.last (0))> 400 (open)
          system.uptime.last (0)) <800 (closes)
          Hi Karzer,
          Try the following example:
          Code:
          ({TRIGGER.VALUE}=0&{server:system.uptime.last(0)}>400)|({TRIGGER.VALUE}=1&{server:system.uptime.last(0)}<800)

          Comment

          • karzer
            Member
            • Mar 2010
            • 61

            #6
            restart control

            Hi,
            I created the following trigger, how can we do better work?

            Code:
            ({Template_Windows:status.last(0)}=0&{Template_Windows:system.uptime.last(0)}>200) |({Template_Windows:status.last(0)}=1&({Template_Windows:system.uptime.last(0 )}<2000))
            If the host is not close to the warning.

            Last edited by karzer; 01-06-2010, 13:27.

            Comment

            • DRXEON
              Junior Member
              • Nov 2019
              • 5

              #7
              Hello guys,

              I am trying to create a trigger for system uptime item to detect a reboot and dont wanna use the uptime<10m means a reboot because its not effective in many ways.

              I was wondering if you guys have any suggestions? I have came up with this idea :
              checking the previous value not to be 0 or null AND the change value from last to previous is below 0 (negative value)

              {HOST:system.uptime[sysUpTime].prev()}<>0 and {HOST:system.uptime[sysUpTime].change()}<=0

              But ! there is an issue with the nodes that dont have previous value for uptime to refer to, they all trigger the alert!
              ----------------------

              getting back to my question, I need an expression to detect reboot based on system uptime value change , in a way that it wont trigger for hosts with no initial uptime data

              Zabbix version is 4.4

              Comment

              • Evgeniy
                Senior Member
                • May 2012
                • 157

                #8

                Where did you get the expression "uptime<10m"? In default templates used expressions system.uptime.change(0)}<0

                Comment


                • DRXEON
                  DRXEON commented
                  Editing a comment
                  Hi there, thanks for responding
                  In generic device SNMPv2 template {HOST:system.uptime[sysUpTime].prev()}<10m
                  is the default expression.
                  Do you have any idea of a better expression that can meet both conditions?
                  Last edited by DRXEON; 06-12-2019, 08:56.
              Working...