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

Microsoft Teams Alerts receives 400 Bad Request - runtime error from Microsoft

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • Professional Edition
    • Alerting
    • None
    • CentOS 7.9, PHP 7.3.27

    Description

      I have enabled Microsoft Teams alert but they don't work.

      Web request is receicing: RESPONSE CODE[400 Bad Request]

      And page says Runtime Error.

      and something like: Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

      Attachments

        Activity

          [OBS-3697] Microsoft Teams Alerts receives 400 Bad Request - runtime error from Microsoft

          Resolved some time ago.

          Install php-curl module.

          landy Mike Stupalov added a comment - Resolved some time ago. Install php-curl module.

          curl request was added exactly for fix this problem (too).
          Because seems as ms teams now use HTTP/2 protocols, which not supported by php fetch.

          landy Mike Stupalov added a comment - curl request was added exactly for fix this problem (too). Because seems as ms teams now use HTTP/2 protocols, which not supported by php fetch.
          jelot69500 John Doe added a comment -

          Hi,

           

          Not sure if this is still relevant but I was able to find a workaround for this problem. After I updated our observium instance  to 23.4.12651 (13th April 2023) I noticed that cURL can be used as fetch method instead of php (alpine: apk add php-curl and restart apache2).

          I spent several hours today dealing with the same problem and came to the conclusion that something is wrong in the php request code. Tried to debug it but it is quite difficult for me to follow the php ...

          jelot69500 John Doe added a comment - Hi,   Not sure if this is still relevant but I was able to find a workaround for this problem. After I updated our observium instance  to 23.4.12651 (13th April 2023) I noticed that cURL can be used as fetch method instead of php (alpine: apk add php-curl and restart apache2). I spent several hours today dealing with the same problem and came to the conclusion that something is wrong in the php request code. Tried to debug it but it is quite difficult for me to follow the php ...

          We had same problem. Proxy was defined in WEB UI config in the field "HTTP(S) Proxy hostname".
          Worked fine after removing though, since we allow that traffic.

          However it worked with proxy if we used the cmd displayed under "HTTP CURL cmd" during alert_test debug.
          Makes me believe there is a problem somewhere in the code when using proxy (I believe it's not using curl then?).

          kentbjoh Kent Johannessen added a comment - We had same problem. Proxy was defined in WEB UI config in the field "HTTP(S) Proxy hostname". Worked fine after removing though, since we allow that traffic. However it worked with proxy if we used the cmd displayed under "HTTP CURL cmd" during alert_test debug. Makes me believe there is a problem somewhere in the code when using proxy (I believe it's not using curl then?).

          It's forced to use http proxy where this Observium is running, sorry. Firewall is blocking if i take it off. But everything else is working thru that http proxy.

           

          If i do Hello World using curl thru that proxy to that Teams webhook URL, it works, Teams channel received this test message OK.

          ppanula Pekka Panula added a comment - It's forced to use http proxy where this Observium is running, sorry. Firewall is blocking if i take it off. But everything else is working thru that http proxy.   If i do Hello World using curl thru that proxy to that Teams webhook URL, it works, Teams channel received this test message OK.

          Can you check same contact without proxy?
          (as I see you configured http proxy and I not sure who report 400 error)

          landy Mike Stupalov added a comment - Can you check same contact without proxy? (as I see you configured http proxy and I not sure who report 400 error)

          It's not about device, its alert. Alert is from Syslog, not from SNMP.

          ppanula Pekka Panula added a comment - It's not about device, its alert. Alert is from Syslog, not from SNMP.

          People

            adama Adam Armstrong
            ppanula Pekka Panula
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: