Member since
04-02-2019
2
Posts
0
Kudos Received
0
Solutions
04-03-2019
04:43 PM
Hi team, I have a bunch of custom metrics sitting in AMS (which is also graphed by Grafana). Now I want to implement an alert for those. I've looked around and so far I can only see JMX example from https://github.com/apache/ambari/blob/branch-2.1/ambari-server/docs/api/v1/alert-definitions.md#metric Could anyone provide me an example of the JSON that I need to POST to Ambari's Alert? It should look really similar to this {
"AlertDefinition":{
"component_name":"NiFi",
"description":"xxx description",
"enabled":true,
"interval":1,
"label":"xxx label",
"name":"xxx name",
"repeat_tolerance":1,
"repeat_tolerance_enabled":true,
"scope":"SERVICE",
"service_name":"NIFI",
"source":{
"ams":{
"metric_list":[
"metric0"
],
"value":"{0}",
"interval":60.0,
"app_id":"NiFi",
"minimum_value":1.0
},
"reporting":{
"ok":{
"text":"{0}%"
},
"warning":{
"text":"{0}%",
"value":10.0
},
"critical":{
"text":"{0}%",
"value":20.0
},
"units":"%"
},
"type":"METRIC",
"uri":{
"http":"{{ams-site/timeline.metrics.service.webapp.address}}",
"https":"{{ams-site/timeline.metrics.service.webapp.address}}",
"https_property":"{{ams-site/timeline.metrics.service.http.policy}}",
"https_property_value":"HTTPS_ONLY",
"default_port":0.0,
"connection_timeout":5.0
}
}
}
}
... View more
Labels:
- Labels:
-
Apache Ambari