Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Post Ambari alerts on slack.

avatar
Contributor
 
1 ACCEPTED SOLUTION

avatar
Super Collaborator
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
4 REPLIES 4

avatar
Master Mentor

you can combine Ambari Rest API with Nifi and it's built-in PutSlack processor to achieve what seems to be what you're asking from your post.

https://github.com/apache/ambari/blob/branch-2.1/ambari-server/docs/api/v1/alert-definitions.md

https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.slack.PutSlack/index.ht...

avatar
Super Collaborator
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
New Contributor

Hi @Jonathan Hurley

Is there any way to get the host name in which the state service changed along with the other definitions that were given in the python script at your given link? I'm able to see notifications going to my my slack channels with the ones below but I still need the hostname definition as a separate definition, any idea?

definitionName = sys.argv[1] definitionLabel = sys.argv[2] serviceName = sys.argv[3] alertState = sys.argv[4] alertText = sys.argv[5]

avatar
Super Collaborator

Currently no, there is not. I believe there is a Jira open for changing how we send arguments to a script dispatcher so they are parameterized. Some fields, such as host name and component name, are not always present, so the current model simply omits them.