NetXMS Support Forum

English Support => General Support => Topic started by: stoffmann on February 19, 2021, 03:58:42 PM

Title: Microsoft Teams notification
Post by: stoffmann on February 19, 2021, 03:58:42 PM
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
Title: Re: Microsoft Teams notification
Post by: Alex Kirhenshtein on February 19, 2021, 07:01:25 PM
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"
Title: Re: Microsoft Teams notification
Post by: Zebble on February 19, 2021, 11:47:38 PM
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
Title: Re: Microsoft Teams notification
Post by: stoffmann on February 22, 2021, 09:00:53 AM
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