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]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (1)
avatar
Super Guru

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
4,780 Views
Version history
Last update:
‎05-16-2016 06:33 PM
Updated by:
Contributors