Ad Widget

Collapse

how to use this function "now"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • scotti
    Member
    • Dec 2005
    • 32

    #1

    how to use this function "now"

    Hi, folks;

    how can I use this functions when I'm setting up a trigger?

    I have try the examples listed here
    http://www.zabbix.com/manual/v1.1/config_triggers.php

    I want an expression to return the seconds since it's last modified.I have tried these, but none of them worked.

    (now-{tpl:vfs.file.time[/somefile,modify].last(0)})<900
    {tpl:vfs.file.time[/somefile,modify].last(0)-now}<900
  • stkr
    Junior Member
    • Feb 2007
    • 18

    #2
    Originally posted by scotti
    I want an expression to return the seconds since it's last modified.I have tried these, but none of them worked.
    That is what I want, too. Can anyone help?

    Comment

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

      #3
      Use the 'now' like this: {tpl:vfs.file.time[/somefile,modify].last(0)-tpl:vfs.file.time[/somefile,modify].now(0)}<900
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      • scotti
        Member
        • Dec 2005
        • 32

        #4
        Originally posted by Alexei
        Use the 'now' like this: {tpl:vfs.file.time[/somefile,modify].last(0)-tpl:vfs.file.time[/somefile,modify].now(0)}<900
        I've tried, but received the following warning:
        Code:
        No such host (tpl) or monitored parameter (vfs.file.time[/somefile,modify].now(0)-tpl:vfs.file.time[/somefile,modify])
        the tpl is a template not a real host, and I'm using zabbix-1.1.1
        Last edited by scotti; 07-03-2007, 06:02. Reason: hide something :)

        Comment

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

          #5
          It should be {tpl:vfs.file.time[/somefile,modify].last(0)}-{tpl:vfs.file.time[/somefile,modify].now(0)}<900
          Alexei Vladishev
          Creator of Zabbix, Product manager
          New York | Tokyo | Riga
          My Twitter

          Comment

          • scotti
            Member
            • Dec 2005
            • 32

            #6
            it seems a bug in 1.1.1, I'll try other versions, thanks, Alexei!

            Comment

            • sbadger
              Member
              • Dec 2005
              • 81

              #7
              Just checking, but do you have a item for vfs.file.time[/somefile,modify] in the tmp template?

              Comment

              • James Wells
                Senior Member
                • Jun 2005
                • 664

                #8
                Greetings,
                Originally posted by scotti
                it seems a bug in 1.1.1, I'll try other versions
                I recommend going to 1.1.6. What you are describing is a known bug in all 1.1 versions prior to 1.1.6.
                Unofficial Zabbix Developer

                Comment

                • scotti
                  Member
                  • Dec 2005
                  • 32

                  #9
                  Originally posted by James Wells
                  Greetings,

                  I recommend going to 1.1.6. What you are describing is a known bug in all 1.1 versions prior to 1.1.6.
                  So good! Many thanks!

                  Comment

                  Working...