Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 1.23 KB

README.md

File metadata and controls

51 lines (39 loc) · 1.23 KB

Ambari Service Check python util

You can use this python util to initiate Ambari service checks for selected or all services. The API calls are based on this article.

Config

You can find below a sample config. Please set the permission that only the user who may run this script can read it.

Sample config:

{
  "hostname": "localhost",
  "port": 8080,
  "cluster_name": "sandbox",
  "user": "admin",
  "password": "admin",
  "ssl": false
}

Usage

You can specify two option:

  1. config file location with -c
  2. list of services you want to check with -s, please use only comma to separate the service_names

If you do not use -s option, that means the script will check all services.
If you do not use -c option, that means the script will search the config file at ../conf/config.

Some samples:

ambari_check_service.py -c ../conf/config -s HDFS
ambari_check_service.py -c ../conf/config -s HDFS,YARN
ambari_check_service.py -c ../conf/config

Output

$ ambari_check_service.py -c ../conf/config -s HDFS,YARN

Status:
RUNNING...
RUNNING...
RUNNING...
COMPLETED

Results:
HDFS: COMPLETED
YARN: COMPLETED