Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-3486

Alert slack transport sending empty messages

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • Professional Edition
    • Alerting
    • None
    • Debian GNU/Linux 9.13 (stretch), running observium from svn checkout.
      We use rocket.chat instead of slack, but it has an identical webhook system.

    Description

      After updating to 20.9.10749 any alerts sent using the slack transport have empty messages. The same alerts sent using other transports like email, work fine. 

      The alerts we received before the update:

      After the update we're receiving alerts, but with empty messages. 

      Attachments

        Activity

          [OBS-3486] Alert slack transport sending empty messages
          dbeskoek dbe added a comment -

          after further debugging the problem is "charset=utf-8" within Content-Type in file includes/common.inc.php line 3860, the following change will solve the issue for us

          //$header .= "Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n";
          $header .= "Content-Type: application/x-www-form-urlencoded\r\n";
          

          dbeskoek dbe added a comment - after further debugging the problem is "charset=utf-8" within Content-Type in file includes/common.inc.php line 3860, the following change will solve the issue for us //$header .= "Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n" ;
          dbeskoek dbe added a comment -

          we discover the same issue since updating to r10732 without finding the reason.

          dbeskoek dbe added a comment - we discover the same issue since updating to r10732 without finding the reason.

          I tried all three options: Unset, True and False. It makes no difference.

          rickschippers Rick Schippers added a comment - I tried all three options: Unset, True and False. It makes no difference.
          rickschippers Rick Schippers added a comment - debug-output.txt

          Please attach full debug output for:

          ./test_alert.php -d -c <contact_id>

          landy Mike Stupalov added a comment - Please attach full debug output for: ./test_alert.php -d -c <contact_id>

          The only local modification is to the rewriterule in the .htaccess:

          The test alert sends empty notifications as well. In debug mode the the test response also fails:

           

          the reponse of the url is also {"success":true}

          not ok like it's testing. 

          Could it be the rocket chat api has been modified then?

          I just tested with the two other rocket chat transports. The first one called "Rocket.Chat" I could not get working. But the other one "Rocket.Chat (Webhook)" is working fine. The messages are formatted a bit differently but all info we need is in there and it works fine. So this solves my issue. 

          But weird that it stopped working immediately after the observium update. 

           

           

          rickschippers Rick Schippers added a comment - The only local modification is to the rewriterule in the .htaccess: The test alert sends empty notifications as well. In debug mode the the test response also fails:   the reponse of the url is also {"success":true} not ok like it's testing.  Could it be the rocket chat api has been modified then? I just tested with the two other rocket chat transports. The first one called "Rocket.Chat" I could not get working. But the other one "Rocket.Chat (Webhook)" is working fine. The messages are formatted a bit differently but all info we need is in there and it works fine. So this solves my issue.  But weird that it stopped working immediately after the observium update.     

          Additionally, make sure you haven't set this option for the contact:

          landy Mike Stupalov added a comment - Additionally, make sure you haven't set this option for the contact:

          You have local changed for code? Please show:

          svn status /opt/observium | grep -v ?
          

          Additionally please make test alert notification for this contact as:

          ./test_alert.php -d -c <contact_id>
          

          contact_id you can see at left of your contact in contacts page.

          landy Mike Stupalov added a comment - You have local changed for code? Please show: svn status /opt/observium | grep -v ? Additionally please make test alert notification for this contact as: ./test_alert.php -d -c <contact_id> contact_id you can see at left of your contact in contacts page.

          I noticed there are two specific rocket chat transports now as well.

          I just setup both variants to see if those will have different results, since we had the slack transport configured before. 

          rickschippers Rick Schippers added a comment - I noticed there are two specific rocket chat transports now as well. I just setup both variants to see if those will have different results, since we had the slack transport configured before. 

          Very strange, slack transport mostly not changed..

          landy Mike Stupalov added a comment - Very strange, slack transport mostly not changed..

          People

            landy Mike Stupalov
            rickschippers Rick Schippers
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: