Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 02-06-2017 10:51 AM
Created 02-06-2017 01:19 PM
If you're asking if you can take Ambari Alerts and publish them using PutSlack, I think what you're looking for is a script dispatcher:
https://cwiki.apache.org/confluence/display/AMBARI/Creating+a+Script-based+Alert+Dispatcher
When Ambari triggers an alert, it can invoke a custom python script. We used to use this for dispatching SNMP notifications before it was its own supported type. But you could use it for anything, including pushing data to a URL.
Created 02-06-2017 12:28 PM
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
Created 02-06-2017 01:19 PM
If you're asking if you can take Ambari Alerts and publish them using PutSlack, I think what you're looking for is a script dispatcher:
https://cwiki.apache.org/confluence/display/AMBARI/Creating+a+Script-based+Alert+Dispatcher
When Ambari triggers an alert, it can invoke a custom python script. We used to use this for dispatching SNMP notifications before it was its own supported type. But you could use it for anything, including pushing data to a URL.
Created 02-14-2017 05:22 PM
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]
Created 02-14-2017 06:57 PM
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.