Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

how to run zookeeper service check VIA REST API

avatar

how to run zookeeper service check VIA REST API ?

what is the relevant payload for the zookeeper?

Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Master Mentor

@Michael Bronson

The Following HCC article shows how we can trigger the bulk service checks as wel as individual service checks using Ambari API.

Ambari API - Run all service checks (bulk) : https://community.hortonworks.com/articles/11852/ambari-api-run-all-service-checks-bulk.html

You can also choose a batch of selective Service checks to be triggered at once as described in https://gist.github.com/mr-jstraub/0b55de318eeae6695c3f#payload-to-run-all-service-checks

View solution in original post

4 REPLIES 4

avatar
Super Guru

@Michael Bronson,

You can use this curl call to do zookeeper service check

curl -u {ambari-username}:{ambari-password} -H "X-Requested-By: ambari" -X POST -d '{"RequestInfo":{"context":"ZooKeeper Service Check","command":"ZOOKEEPER_QUORUM_SERVICE_CHECK"},"Requests/resource_filters":[{"service_name":"ZOOKEEPER"}]}' http://{ambari-host}:{ambari-port}/api/v1/clusters/{clustername}/requests

Replace all the placeholders before running the curl call.

Thanks,

Aditya

avatar

I will happy to get the same API for all other service in ambari cluster

Michael-Bronson

avatar
Master Mentor

@Michael Bronson

The Following HCC article shows how we can trigger the bulk service checks as wel as individual service checks using Ambari API.

Ambari API - Run all service checks (bulk) : https://community.hortonworks.com/articles/11852/ambari-api-run-all-service-checks-bulk.html

You can also choose a batch of selective Service checks to be triggered at once as described in https://gist.github.com/mr-jstraub/0b55de318eeae6695c3f#payload-to-run-all-service-checks

avatar
Master Mentor

@Michael Bronson

For the script based Zookeeper Service check , I have added a response here: https://community.hortonworks.com/questions/176909/ambari-trigger-service-checkspy-bug.html?childToV...

.