Support Questions
Find answers, ask questions, and share your expertise

On Alert Definitions which are not Predefined Alerts

On Alert Definitions which are not Predefined Alerts

Unlike Ambari Predefined Alerts the alerts from e.g. Kafka, Storm, Ranger, Nifi are hard to find, let alone the documentation exists. Inspecting the ambari-alerts.log reveals to us snmp messages regarding them but this is not the way to 'reverse engineer' the definitions. The definition text from the UI is not always corresponding to what is available through said logfile so they are not usefull either. Does someone can guide me to the alert definitions for

kafka_broker_process
storm_supervisor_process
storm_supervisor_process_percent
storm_nimbus_process
storm_server_process
storm_drpc_server
storm_webui
nifi_status
ranger_admin_process
ranger_usersync_process

Thanks and all the best.

2 REPLIES 2

Re: On Alert Definitions which are not Predefined Alerts

Super Mentor

@Samuel Peeters

All the services packages the "alerts.json" inside the "/var/lib/ambari-server/resources/common-services/" directory of respective services as following:

# cd /var/lib/ambari-server/resources/common-services/
# find . -name "alerts.json" 
./ACCUMULO/1.6.1.2.2.0/alerts.json
./AMBARI_INFRA/0.1.0/alerts.json
./AMBARI_METRICS/0.1.0/alerts.json
./ATLAS/0.1.0.2.3/alerts.json
./FALCON/0.5.0.2.1/alerts.json
./FLUME/1.4.0.2.0/alerts.json
./GANGLIA/3.5.0/alerts.json
./HAWQ/2.0.0/alerts.json
./HBASE/0.96.0.2.0/alerts.json
./HDFS/2.1.0.2.0/alerts.json
./HIVE/0.12.0.2.0/alerts.json
./KAFKA/0.8.1/alerts.json
./KAFKA/0.9.0/alerts.json
./KNOX/0.5.0.2.2/alerts.json
./LOGSEARCH/0.5.0/alerts.json
./OOZIE/4.0.0.2.0/alerts.json
./OOZIE/4.2.0.2.3/alerts.json
./PXF/3.0.0/alerts.json
./RANGER/0.4.0/alerts.json
./RANGER/0.5.0/alerts.json
./RANGER/0.6.0/alerts.json
./RANGER_KMS/0.5.0.2.3/alerts.json
./SPARK/1.2.1/alerts.json
./SPARK2/2.0.0/alerts.json
./STORM/0.9.1/alerts.json
./YARN/2.1.0.2.0/alerts.json
./ZEPPELIN/0.6.0.2.5/alerts.json
./ZOOKEEPER/3.4.5/alerts.json

.

Also you can use the API call to find the Service alert definitions for the *Installed Services*:

Following will list all the definitions:

# curl -iv -u admin:admin -H "X-Requested-By: ambari" -X GET   http://$AMBARI_HOST:8080/api/v1/clusters/$CLUSTER_NAME/alert_definitions

.

Then from there you can find the alert definition_id for your respective alert. The you can use that ID to egt the particular Alert Definition. For example the alert that you are looking out for has alert ID as 50 (from the above call)

# curl -iv -u admin:admin -H "X-Requested-By: ambari" -X GET   http://$AMBARI_HOST:8080/api/v1/clusters/$CLUSTER_NAME/alert_definitions/50

.

Re: On Alert Definitions which are not Predefined Alerts

Super Mentor

@Samuel Peeters

If you want to find the "alerts.json" for your service in amabri codebase then you can do it via ambari github repo as well.

Like for ambari 2.5.2 you can find all the service definitions here

https://github.com/apache/ambari/tree/release-2.5.2/ambari-server/src/main/resources/common-services

Example for KAFKA in ambari 2.5.2
https://github.com/apache/ambari/blob/release-2.5.2/ambari-server/src/main/resources/common-services...

For RANGER:

https://github.com/apache/ambari/blob/release-2.5.2/ambari-server/src/main/resources/common-services...