Microsoft Teams notification

Started by stoffmann, February 19, 2021, 03:58:42 PM

Previous topic - Next topic

stoffmann

Hi,

does someone have MS Teams notification working?
What I've done so far:
- Created Webhook URL in Teams
- Configured notification channel (Attachment 1)
- Configured action (Attachment 2)
- Configured Event Policy to run action

I also have a Powershell script for testing the webhook notification. With the Powershell script it works.
When I raise the configured event in NetXMS I get no notification.

Is there a logfile I can check if it does not? In the netxmsd.log there is only


2021.02.19 14:35:01.610 *I* [ncd.msteams        ] Microsoft Teams driver instantiated


Thanks

Stefan

Alex Kirhenshtein

Enable level 6 debugging for tag ncd.msteams and check server log (after attempt to send).

You can change debug level in runtime with
nxadm -c "debug ncd.msteams 6"

Zebble

I just got this working yesterday, at least through a script, and found this NXSL command helpful:

SendNotification("Notification Channel", "Channel", "text", "text2");

In your case, this would be:

SendNotification("Teams Notification", "NetXMS", "does this work?", "Yup!");

I ran it manually through "Execute server script".  Worked great.

I haven't tried it as an actual event notification yet.

-zeb

stoffmann

It's working now. The webhook URL didn't copy paste correct.
The nxadm -c "debug ncd.msteams 6" pointed me in the right direction.

Thank You Alex