Support Questions

Find answers, ask questions, and share your expertise

Metric alert examples

Explorer

Hi.


I am interested in creating some alerts based upon cluster metrics that I see on the Grafana dashboard in Ambari.


I see there is an API for metrics (https://cwiki.apache.org/confluence/display/AMBARI/Ambari+Metrics+API+specification) which presumably means I can pull that same data via a service call. However, what I want to do is fire a notification based upon an alert so the less code I have to write the better.


I found this link about creating an alert definition based upon a metric and it looks like its just me posting the write data and I can create an alert based off of any one of these metrics:

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


However, I don't fully understand it and I was wondering if there is any more in-depth documentation or example set for creating alert definitions based upon metrics?


Thanks.

1 REPLY 1

Explorer

Hi. To build on this, would it be possible to provide me a real-world example of the .json required for doing a POST to create an alert definition, creating a metric-based alert, upon the following YARN metric? :

yarn.QueueMetrics.Queue=root.ActiveApplications


https://github.com/apache/ambari/blob/release-2.6.1/ambari-server/src/main/resources/common-services...


It doesn't have to be that one but that's one I'm interested in and once I understand this a bit better, I can go from there.


Thanks.