I saw support for slack but no teams… I got to looking and sure enough API’s are available to call from within playbooks yipee!
Youll need to create an incoming web-hook in teams (google this if you dont have it setup).
Once you do that you now have a url which an be used to post messages to via script or whatever your flavor is.
In nutanix heres what i set
Prism Central
set a custom alert policy to 5-10% cpu so it would trigger a lot and selected my test vm
Result:
Obviously this is my very fist time attempting this and I literally just figured it out but in the near future Id like to see if I can call the alert parameters, include useful information automatically e.g only alert on critical, and include the alert info.
Cheers!
Aidan
Page 1 / 1
Nicely done @adoyle .
Cheers
now i just need to try figure out how to get alert info into that message instead of manually, becuase then ill end up with 100 manual messages and playbooks
Well done @adoyle Thanks for sharing, this will certainly help a lot of other community folks with the same desire
so what im now thinking i will have to do is build my own api so I can run a get on the nutanix api and return the values to my teams post message…. and devs willing to point me in the general direction? Is there something natively on nutanix I can/should use for this? or would I be better off just building something in node myself?
or anyone running something remotely to call the nutanix apis and generating the slack/teams alerts form there?
Just some ideas…
That actually sounds like an amazing plan @adoyle . So if I am not wrong you want to send the alert details inside that message to the MS teams.
Let me know if you need anything else which could help
dudes ive just figured it all out… will add in the update when I get a bit of time and work on the MS json a little more.
You can use the inbuilt nutanix parameters to get the alert info… pure magical bliss
Hey @adoyle , that sounds great. Really excited to know how you accomplished it.
So here is how you add messagecards to teams…. few things:
using teams webhooks means you cannot do any of the really cool stuff
You must use messagecards and include the schema @context
you want to do more - look at building a bot + flow
I wish we could change the nutanix alert policies to include the API as manually creating playbooks for single alerts is terrible (im going to see what options are available)