DX Unified Infrastructure Management

 View Only
Expand all | Collapse all

UIM MS Teams alarm integration via webhook

  • 1.  UIM MS Teams alarm integration via webhook

    Posted Nov 29, 2024 01:45 PM

    Hello to all,

    Does anyone has integrated UIM with MS Teams to post an alarm on a ms teams group?

    I'm using UIM 23.4 CU2 

    Regards,

    Guillermo



  • 2.  RE: UIM MS Teams alarm integration via webhook

    Broadcom Employee
    Posted Nov 29, 2024 01:52 PM

    Please refer to:

    https://knowledge.broadcom.com/external/article/246965/send-uim-alarm-to-microsoft-teams-chat.html



    ------------------------------
    Steve Danseglio
    Technical Support Engineer 4 | IMS Division
    UIM Certified Expert
    KCSv6 Practices Certified
    Certified Customer Success Manager (CCSM) Level 1
    ------------------------------



  • 3.  RE: UIM MS Teams alarm integration via webhook

    Posted Nov 29, 2024 02:00 PM

    Hello Steve! 

    Thanks a lot...I'm working with this paper right know :-) 

    It's not exactly UIM specific, but I'll try to get it working and if it does, I'll post the result for everyone.

    I´m go back soon with the results...

    Regards,

    Guillermo




  • 4.  RE: UIM MS Teams alarm integration via webhook

    Posted Nov 29, 2024 03:53 PM

    Steve, Have you or anyone else tried this and found it to work?

    I follow all procedures but I have a doubt about the payload value and their format.

    Regards,

    Guillermo




  • 5.  RE: UIM MS Teams alarm integration via webhook

    Broadcom Employee
    Posted Nov 29, 2024 05:34 PM

    Yes. I'm not back in the office until December 2 and I can check then or you could open a case and somebody will check for you.



    ------------------------------
    Steve Danseglio
    Technical Support Engineer 4 | IMS Division
    UIM Certified Expert
    KCSv6 Practices Certified
    Certified Customer Success Manager (CCSM) Level 1
    ------------------------------



  • 6.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 01, 2024 07:04 PM

    Sure, I just opened it.

    Thanks Steve.

    Regards,

    Guillermo




  • 7.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 03, 2024 05:53 AM

    Hi Guillermo, 

    I'm keen to see how you get this working.

    We've achieved "UIM - Teams Group Chat" by using Power Automate as a middle man.

    It would be great to get it direct.




  • 8.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 03, 2024 02:56 PM

    Hello Sam!

    WOW! Nice! How did you get it?




  • 9.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 03, 2024 11:18 PM
      |   view attached

    Hi Sam and Guillermo,

    We use NAS Auto Operator, Command, the command line string then allows us to pass custom (different Webhook URI's) with the required NAS variables like "$nimid" "$hostname" "$source" "$message" "$level".

    The backend command script was written in PowerShell, we use the same method for OpsGenie and Slack.



    Attachment(s)

    zip
    NAStoTEAMS.zip   35 KB 1 version


  • 10.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 04, 2024 09:27 AM

    Nice Trevor! Let me try it :-)




  • 11.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 05, 2024 05:50 AM

    Thank you Trevor!

    Great! 

    I've set up the script in our UIM location and updated the script, I've also configured our Teams channel with Webhook.  Got our API and tested it with Postman.

    I've updated the script with our Teams API and configured the AO rule.

    I can see the AO rule firing when a matching alert is received, but the script isn't sending anything.

    I'm thinking it may be a security restriction on our servers as the script is unsigned.  I'll look to getting it signed and I'll test it again.

    Looks to be a great solution! Thank you for sharing.




  • 12.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 05, 2024 08:20 AM

    Can this method also be used to post to Teams group chats? Or is it channels only?




  • 13.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 05, 2024 08:28 AM

    Hi Trevor,

    Unfortunately I can't activate the script at Auto-operator.

    I simulate an alarm but the auto-operator doesn't run the script.




  • 14.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 05, 2024 09:49 AM

    Guillermo,

    It might be that the nas can't find powershell.exe, try using the full path to .exe

    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe




  • 15.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 05, 2024 03:46 PM

    Unfortunately not, same issue...

    this is de commnad:

    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy remotesigned -File E:\UIM\script\NAStoTEAMS\NAStoTEAMS.ps1 https://webhook..... "$nimid" "$hostname" "$source" "$message" "$level"

    At the Nas log, I cannot see any call to a command...




  • 16.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 06, 2024 03:56 AM

    Guillermo,

    The Webhook URI is from the Connectors?
    Create an Incoming Webhook - Teams | Microsoft Learn

    From a previous screenshot, the AO profile have "User Tag 1" defined, you do have robots with this tag creteria?




  • 17.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 06, 2024 08:18 AM

    Hello Trevor,

    No, I just repeat the configuration received. 




  • 18.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 09, 2024 01:29 PM

    Hi thevor, 

    I solve the powershell problem but I have other with the webhook invocation:

    1) I can call the webhook but I don't receive any data from UIM in the invocation...  "api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=mTxLVaHeTbfDoCYzqBFeqHjkZZ6FWtKVc03taJ1NUWU ; hostname ;  ; source ;  ; message ;  ; UIM level " ... THIS is an extract from log

    2) How you solve the credentials on office 365 to allow you to reach and publish using this webhook?

    Regards,

    Guillermo




  • 19.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 09, 2024 11:20 PM
      |   view attached

    Hi Guillermo,

    Please find attached updated guide.


    Attachment(s)

    docx
    NAStoTEAMS.docx   149 KB 1 version


  • 20.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 09, 2024 11:30 PM
      |   view attached

    Updated script and guide


    Attachment(s)

    zip
    NAStoTEAMS.zip   35 KB 1 version


  • 21.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 10, 2024 02:52 PM

    Hi Trevor, IT'S WORKING !!!! 

    Thanks a lot!!!!




  • 22.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 10, 2024 02:32 PM

    Hello Trevor!

    This script works ok!, the NAS prove call the .ps1 file, pass the uim variables with data, and it can comunicate with my ms teams webhook but at office 365 I'm got an error with the workflow...I don't know why




  • 23.  RE: UIM MS Teams alarm integration via webhook

    Posted Dec 11, 2024 12:01 AM

    Hi Guillermo,

    It's because the JSON payload requirement is different for Workflow, refer to first article below regarding Incoming Webhooks retirement.


    Migrate Teams Incoming Webhooks to Workflows (Power Automate)
    Sending messages to a Microsoft Teams channel using workflows via webhook - Simon Scholz




  • 24.  RE: UIM MS Teams alarm integration via webhook

    Posted Jan 08, 2025 01:00 PM

    Hello Steve and all people in this community.

    I  already did the integration with UIM and MS Teams using webhook. 

    I writing a HOW TO in english and I will share it here soon.

    Stay tuned.

    Guillermo




  • 25.  RE: UIM MS Teams alarm integration via webhook

    Posted Jan 08, 2025 02:49 PM
      |   view attached

    Hello! Here is my documentation. I hope it helps you.

    Regards,

    Guillermo


    Attachment(s)



  • 26.  RE: UIM MS Teams alarm integration via webhook

    Broadcom Employee
    Posted Jan 08, 2025 02:58 PM

    Awesome job!

    Thank you for sharing!



    ------------------------------
    Steve Danseglio
    Technical Support Engineer 5 | IMS Division
    UIM Certified Expert
    KCSv6 Practices Certified
    Certified Customer Success Manager (CCSM) Level 1
    ------------------------------



  • 27.  RE: UIM MS Teams alarm integration via webhook

    Posted Jan 09, 2025 10:41 AM

    Good work! Thank you Guillermo!




  • 28.  RE: UIM MS Teams alarm integration via webhook

    Posted Jan 17, 2025 04:17 PM
    Edited by Miller Echagarreta Jan 17, 2025 04:33 PM

    Hi @Guillermo Salgado how are you?

    Excellent work whit this document.

    Right now I am working for accomplish this integration...!!! I want to confirm if this procedure will work with my environment ?

    DX UIM 23.4 CU1 with OS RH 8.

    Other question: When i need to send alarms to another group is necessary to create another workflow MS Teams and all the process in messagegtw and AO profile ?

    Best regards...!!!



  • 29.  RE: UIM MS Teams alarm integration via webhook

    Posted Jan 20, 2025 09:23 AM

    Hi Miller, glad to hear that it worked for you. Unfortunately you need to create another Webhook to send messages to another group and create the new entry at the auto-operator to send messages base on a diferent pattern.

    Our team is working to solve some issues related to the event time.

    Regards,

    Guillermo