- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Created on 05-16-2016 06:33 PM
1.Login to Ambari UI using admin credentials [admin/admin]
2.Check the alert definition using below command
http://<ambari_fqdn>:8080/api/v1/clusters/<cluster-name>/alert_definitions/
3.Get the respective alert definition you wan to modify from the above output. Here for example lets say we will modify "Hive Metastore".
Here we will change 'check.command.timeout' value from default 60 to 120
4.Copy the output of point2 to a file say "test.json"
5.First - Modify the test.json and remove the 2nd line of the file which starts with "href" eg. is below -
"href" : "http://<ambari-fqdn>:8080/api/v1/clusters/sandbox/alert_definitions/51",
6.Second - edit the value of 'check.command.timeout' in test.json from 60.0 to 120.0
{ "name" : "check.command.timeout", "display_name" : "Check command timeout", "units" : "seconds", "value" : 120.0, "description" : "The maximum time before check command will be killed by timeout", "type" : "NUMERIC" },
7.Save the test.json.
8.Now POST the JSON back to reflect new updated value using below command -
curl -H 'X-Requested-By:ambari' -u $ambari_username:$ambari_password -X PUT --data @test.json http://<ambari_fqdn>:8080/api/v1/clusters/<cluster-name>/alert_definitions/<alert_no>; Ex. curl -H 'X-Requested-By:ambari' -u $ambari_username:$ambari_password -X PUT --data @test.json http://<ambari-fqdn>:8080/api/v1/clusters/sandbox/alert_definitions/51
9. Above command will display no output.
10.Check from the line below if the value are successfully modified -
http://<ambari_fqdn>:8080/api/v1/clusters/<cluster-name>/alert_definitions/<alert_no>; Eg. http://<ambari-fqdn>:8080/api/v1/clusters/sandbox/alert_definitions/51