Details

    • Help
    • Resolution: Not A Bug
    • Major
    • None
    • Professional Edition
    • Alerting
    • Ubuntu

    Description

      I have defined a JSON Contact with 2 Associated Syslog Rules.  This worked for quite awhile then started sending [] as the payload.  I successfully tested Contact using test_alert.php and see a full JSON payload.  Not sure how to debug from here.  Note, I did have an Alert checker also defined but removed it, so only the Syslog rules remain. I have recreated the Contact to no avail.  I also tested my Syslog rules successfully with an Email contact. 

      Attachments

        Activity

          [OBS-4178] JSON Contact sending [] as payload.

          Initially Webhook with JSON transport is hard for use with generated data.
          Need be sure that passed values correct.

          landy Mike Stupalov added a comment - Initially Webhook with JSON transport is hard for use with generated data. Need be sure that passed values correct.

          I think that's it. Seems wierd though that same rule worked for an email contact.  Also, pretty sure Observium changed the format of the regex statement to include the \> so I assumed that was OK.  I guess the character > is not something that needs escaped.  Sorry for the hassle, my debugging was sending me down multiple rabbit holes.

          clearnetworx Clearnetworx added a comment - I think that's it. Seems wierd though that same rule worked for an email contact.  Also, pretty sure Observium changed the format of the regex statement to include the \> so I assumed that was OK.  I guess the character > is not something that needs escaped.  Sorry for the hassle, my debugging was sending me down multiple rabbit holes.
          landy Mike Stupalov added a comment - - edited

          I think trouble exactly in syslog rule(s), as I see in screenshot you have incorrect regex with escaped char:

          /^ONU.+ Operation-\>Deactivated/
          

          instead

           /^ONU.+ Operation->Deactivated/
          

          landy Mike Stupalov added a comment - - edited I think trouble exactly in syslog rule(s), as I see in screenshot you have incorrect regex with escaped char: /^ONU.+ Operation-\>Deactivated/ instead  /^ONU.+ Operation->Deactivated/

          I simplified the RULE to only /ONU/ and that results in JSON payloads.  

          clearnetworx Clearnetworx added a comment - I simplified the RULE to only /ONU/ and that results in JSON payloads.  

          I created a syslog rule /decline ip address/, then used it for the JSON contact and I get a payload.

          clearnetworx Clearnetworx added a comment - I created a syslog rule /decline ip address/, then used it for the JSON contact and I get a payload.

          The RAW input is []

          clearnetworx Clearnetworx added a comment - The RAW input is []

          I mean pastebin or attach as file (or preformatted text here) full field from "JSON passed to Webhook".

          There seems inserted incorrect JSON

          landy Mike Stupalov added a comment - I mean pastebin or attach as file (or preformatted text here) full field from "JSON passed to Webhook". There seems inserted incorrect JSON
          clearnetworx Clearnetworx added a comment - - edited

          I don't understand what "RAW JSON contact as "Preformated" is.  If you are asking for the webhook raw inout it is []

          If I change the rule to another I have I will get a JSON payload.

           

          clearnetworx Clearnetworx added a comment - - edited I don't understand what "RAW JSON contact as "Preformated" is.  If you are asking for the webhook raw inout it is [] If I change the rule to another I have I will get a JSON payload.  

          Show JSON contact screenshot and RAW JSON contact as "Preformated" here, or pastebin..

          landy Mike Stupalov added a comment - Show JSON contact screenshot and RAW JSON contact as "Preformated" here, or pastebin..

          Syslog Messages:

          ONU[8:3:UBNTf91a0220] State: Operation->Deactivated

          ONU[8:3:UBNTf91a0220] State: Activated->Setup

          Syslog Rules:

          /^ONU.+ Operation->Deactivated/

          /^ONU.+ Activated-\>Setup/

          JSON Payload: []

           

          Rule works with an Email Contact.

           

           

           

          clearnetworx Clearnetworx added a comment - Syslog Messages: ONU [8:3:UBNTf91a0220] State: Operation->Deactivated ONU [8:3:UBNTf91a0220] State: Activated->Setup Syslog Rules: /^ONU.+ Operation->Deactivated/ /^ONU.+ Activated-\>Setup/ JSON Payload: []   Rule works with an Email Contact.      

          People

            adama Adam Armstrong
            clearnetworx Clearnetworx
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: