Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Labels (1)

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
3,639 Views
Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎05-16-2016 06:33 PM
Updated by:
 
Contributors
Top Kudoed Authors