Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

monolive/ambari-custom-alerts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

ambari-custom-alerts

Custom Alerts for Ambari server

Push the new alert via Ambari REST API.

curl -u admin:admin -i -H 'X-Requested-By: ambari' -X POST -d @alerts.json http://ambari.cloudapp.net:8080/api/v1/clusters/hdptest/alert_definitions

You will also need to copy the python script in /var/lib/ambari-server/resources/host_scripts and restart the ambari-server. After restart the script will be pushed in /var/lib/ambari-agent/cache/host_scripts on the different hosts.

You can find the ID of your alerts by running

curl -u admin:admin -i -H 'X-Requested-By: ambari' -X GET http://ambari.cloudapp.net:8080/api/v1/clusters/hdptest/alert_definitions

If we assume, that your alert is id 103. YOu can force the alert to run by

curl -u admin:admin -i -H 'X-Requested-By: ambari' -X PUT  http://ambari.cloudapp.net:8080/api/v1/clusters/hdptest/alert_definitions/103?run_now=true

About

Custom Alerts for Ambari server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages