Ad Widget

Collapse

count function with string value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jean
    Member
    • Apr 2006
    • 85

    #1

    count function with string value

    Hello,

    I made a little script to check the raid status for my HP servers in perl. This script return a string (Problem or OK).

    I have create an item checkraid with character for the type and zabbix agent.
    I have also create a trigger as follwow : {Unix_t:checkraid.str(Problem).count(600,Problem," eq")}>1

    But this trigger don't work, if I modify my trigger to this {Unix_t:checkraid.str(Problem)#1}, it works.

    I have also try this {Unix_t:checkraid.str(Problem).count(600,"Problem" ,"eq")}>1, but the result is the same...

    Could you help me please ?
  • jean
    Member
    • Apr 2006
    • 85

    #2
    Hello,

    I want to check a string in my items, but for two checks consecutive or in a range of time.

    I try a trigger like this : {MySQL_t:checkreplication.str(not).count(600,1,"eq "}>1
    and an another like this : ({MySQL_t:checkreplication.str(not).last(1))&({MyS QL_t:checkreplication.str(not).last(2))

    But they don't work...

    Someone have an idea to do this ?

    Comment

    • MrKen
      Senior Member
      • Oct 2008
      • 652

      #3
      What about this

      {MySQL_t:checkreplication.count(600,not)}

      or

      {MySQL_t:checkreplication.count(#2,not)}

      just guessing

      MrKen
      Disclaimer: All of the above is pure speculation.

      Comment

      Working...