Ad Widget

Collapse

Weird discovery action issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • culrich
    Junior Member
    • Sep 2012
    • 12

    #1

    Weird discovery action issue

    So -- I've got some discovery rules defined.

    I'm trying to use "received value" like redis_enabled="yes" or even just redis_enabled.

    I'm unclear on how "like" works -- are there any quoting issues? The string I'm looking for has double-quotes in it. Also, in the context of discovery, does it matter if the value returned by a key is a multi-line value or if it is just a long string with no cr/lf in it?

    Also, I'm seeing weird inconsistent behavior depending on a rule's action.

    If I make a rule to just send me email when an action condition is met, I get the email. If I make the same rule add a host to a host-group or link to a template, the action never seems to take place. But, if I manually link that host to a template, I can do so without error. I'm confused.

    Any suggestions on troubleshooting this feature?

    This is on 2.0.2.
  • tchjts1
    Senior Member
    • May 2008
    • 1605

    #2
    I think the like/not like functionality is this:

    like - containing this string. Case sensitive.
    not like - this string cannot be found. Case sensitive.

    Comment

    • culrich
      Junior Member
      • Sep 2012
      • 12

      #3
      Cool. So straight string, no concerns with length, quoting, or cr/lf issues?

      Now, to debug my weird action issues where it seems to work with sending email but not if it is doing other things.


      I'm double-checking that this is indeed what's going on, and I'm getting the verbose debug logs (which are really pretty verbose!).

      More over the weekend.

      Thanks!

      Comment

      • tchjts1
        Senior Member
        • May 2008
        • 1605

        #4
        I am guessing on that, based on this:
        http://www.zabbix.com/documentation/...ion/conditions

        There is not a lot of information on the usage of the like/not like functionality.

        Comment

        • culrich
          Junior Member
          • Sep 2012
          • 12

          #5
          Ah, I found that too and wasn't quite sure how to parse it.

          Off to the source, I guess.

          Comment

          • tchjts1
            Senior Member
            • May 2008
            • 1605

            #6
            Actually I didn't scroll down far enough... here is what is mentioned specifically in regards to received value:

            like - contains the substring. Parameter is given as a string.
            not like - does not contain the substring. Parameter is given as a string.

            Further up though, use of "like" and "not like" mentions case sensitive.

            Comment

            • culrich
              Junior Member
              • Sep 2012
              • 12

              #7
              But there seem to be issues related to if the key returns a value with newlines / carriage returns.

              Comment

              Working...