Ad Widget

Collapse

Trigger TIMER

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vikty
    Senior Member
    • Jul 2007
    • 104

    #1

    Trigger TIMER

    Hi,
    How can I configure a trigger to fire only between 08:00 and 23:00?

    For example:
    I have configured a trigger that fire when itemkey.last(0)=0, but between 23:00 and 08:00
    the item have value zero, it is normal, therefore the trigger must not start in this hours...

    How can I tell this to the trigger?
  • vikty
    Senior Member
    • Jul 2007
    • 104

    #2
    time function

    I have found the time function in the zabbic-doc and I have thought how to use:
    Code:
    ({host1:cont.files.num.avg(#4)}=0)&({host1:cont.files.num.time(0)}>080000)&({host1:cont.files.num.time(0)}<230000)
    Is It correct this idea?

    Anyway zabbix tell me "Unknown function [time]" I use Zabbix-server 1.4.1
    Doc: Zabbix Manual v1.4 Release 012

    Could someone explain me?

    Comment

    • vikty
      Senior Member
      • Jul 2007
      • 104

      #3
      Other solution

      Configure in the Action the "Time period in"

      In This way The trigger go ON but the Action doesn't work if the time period is uncorrect.
      it is good, but I prefer that trigger doesn't go ON if time is out of period..... so....

      Comment

      • welkin
        Senior Member
        • Mar 2007
        • 132

        #4
        I have the same Problem. I also tried to change the "Action timeperiod" but if a Trigger triggers e.g. at night and the "Action Timeperiod" is set to only at daytime there will be no action executed when daytime is reached again.

        Can you confirm that your trigger setup works ?

        mfg
        welkin

        Comment

        • vikty
          Senior Member
          • Jul 2007
          • 104

          #5
          Yes, unfortunately it works in this way

          Mainly I wanted not send a SMS at the nigth.... but I send the e-mail anyway

          Comment

          • skogan
            Member
            • Nov 2007
            • 70

            #6
            I'd set up a simple external script that will return 1 during the defined time period and 0 in all other time. Then, the Trigger will use that check in the condition.

            Comment

            • vikty
              Senior Member
              • Jul 2007
              • 104

              #7
              Originally posted by skogan
              I'd set up a simple external script that will return 1 during the defined time period and 0 in all other time. Then, the Trigger will use that check in the condition.
              very nice

              Comment

              • skogan
                Member
                • Nov 2007
                • 70

                #8
                There is a catch in that solution, though. (lately it seems that there always is one )

                Running external scripts is not a cheap operation under zabbix, so you wouldn't want to set up that script to run more than once. So, let's say you set it up as a data source in the localhost (zabbix server). In this case, all your triggers that reference this item will appear TWICE: once for the host being monitored and once for the localhost. The cause for that is that in Zabbix triggers are not owned by any hosts - only items are. Trigger membership is determined by the items mentioned in the trigger. A very annoying misfeature

                Comment

                • Alexei
                  Founder, CEO
                  Zabbix Certified Trainer
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Sep 2004
                  • 5654

                  #9
                  Originally posted by vikty
                  I have found the time function in the zabbic-doc and I have thought how to use:
                  Code:
                  ({host1:cont.files.num.avg(#4)}=0)&({host1:cont.files.num.time(0)}>080000)&({host1:cont.files.num.time(0)}<230000)
                  Is It correct this idea?

                  Anyway zabbix tell me "Unknown function [time]" I use Zabbix-server 1.4.1
                  Doc: Zabbix Manual v1.4 Release 012

                  Could someone explain me?
                  The idea is absolutely correct. There is no message "Unknown function ..." in ZABBIX 1.4.x code. Are you sure you are running 1.4.x?
                  Alexei Vladishev
                  Creator of Zabbix, Product manager
                  New York | Tokyo | Riga
                  My Twitter

                  Comment

                  • vikty
                    Senior Member
                    • Jul 2007
                    • 104

                    #10
                    Yes,
                    I use the 1.4.1 version.

                    But Zabbix return me "unknown function"... anyway tomorrow I check again.


                    I have checked....
                    Zabbix-server version is 1.4.1
                    Frontend PHP is 1.4.1
                    Last edited by vikty; 28-02-2008, 12:04.

                    Comment

                    Working...