Ad Widget

Collapse

Issue with invalid second parameter trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • killmasta93
    Member
    • Oct 2019
    • 45

    #1

    Issue with invalid second parameter trigger

    Hi guys i was wondering if someone could shed some light currently getting this issue using this template

    HTML Code:
    Cannot evaluate function last(/myhost/backup.userdatabasediff.mssql.status[SQLEXPRESS,mydb,{$UDBDTIME1},{$UDBDTIME2},{$UDBDTI ME3}],#1:now-0): invalid second parameter.
    was working fine with version 5.0 zabbix since update to 6.4 not sure what changed?


    Thanks
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    All that second parameter part seems useless anyway...
    Code:
    #1:now-0
    #1 is default anyway, so no need to mention it and now-0 seems like "no timeshitf", so why even mention it... ? just remove that part and see, if it works...
    Otherwise you may need time unit there..m,s,h,d,w

    Comment

    • killmasta93
      Member
      • Oct 2019
      • 45

      #3
      Thanks for the reply, i guess my question is howcome it was working on version 5?

      so i have this in the expression of the trigger type

      Code:
      last(/dotup-zabbix-template-mssql-backup/backup.userdatabasediff.mssql.status[{#SQLINSTANCENAME},{#DBNAME},{$UDBDTIME1},{$UDBDTIME2},{$UDBDTIME3}],#1:now-0)=14
      would i change it like this?

      Code:
      last(/dotup-zabbix-template-mssql-backup/backup.userdatabasediff.mssql.status[{#SQLINSTANCENAME},{#DBNAME},{$UDBDTIME1},{$UDBDTIME2},{$UDBDTIME3}])=14
      but what is odd from the first code when i test it out it shows the result to true

      Click image for larger version

Name:	image.png
Views:	930
Size:	28.2 KB
ID:	476861

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        ah ok .. I see now, where that strange thing came from .. already in 5.0 template it has last(,0), which for me is weird... and then it is converted to newer format...
        your example is ok. I cannot comment on the testing part, there may be things in code for different cases... for testing and for actually using it... Maybe something left from older code here and there...

        Comment

        • killmasta93
          Member
          • Oct 2019
          • 45

          #5
          thanks for the reply it seems that
          Code:
          last(/dotup-zabbix-template-mssql-backup/backup.userdatabasediff.mssql.status[{#SQLINSTANCENAME},{#DBNAME},{$UDBDTIME1},{$UDBDTIME2},{$UDBDTIME3}])=14
          it changed from unknown to enabled , but for some odd reason not getting the triggered

          Comment

          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4807

            #6
            Considering LLD macros, it is a discovery prototype, so verify, that all the discovery has been performed and data comes in...

            Comment

            • killmasta93
              Member
              • Oct 2019
              • 45

              #7
              yeah i gave up and went to the odbc mssql

              Comment

              Working...