Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

ambari agent health

Solved Go to solution

ambari agent health

New Contributor

Is there some api / endpoint exposed on the ambari agent that i can use to check if ambari agent is up / healthy & collect some stats

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: ambari agent health

Super Collaborator

Each host has its own endpoint: api/v1/clusters/<clusterName>/hosts/<hostName>

From this, you can look at various parts of the JSON response:

"host_state": "HEALTHY",
"host_status": "HEALTHY",
"ip": "192.168.64.103",
"last_agent_env": {},
"last_heartbeat_time": 1460383979229,
"last_registration_time": 1460135920315,

The state will move from HEALTHY to HEARTBEAT_LOST (or something else like UNHEALTHY) when an agent can't communicate. Also, there is a host heartbeat alert (called Ambari Agent Heartbeat) which you can leverage to send emails or SNMP traps when the server can't communicate with an agent.

View solution in original post

2 REPLIES 2
Highlighted

Re: ambari agent health

@jabir ahmed

I think there is no api for ambari-agent health checkup - only you can see agent installation status using ambari api as mentioned -

https://cwiki.apache.org/confluence/display/AMBARI/Installing+ambari-agent+on+target+hosts

You might need to write custom script for the same.

Monitoring tools like nagios can track this.

Highlighted

Re: ambari agent health

Super Collaborator

Each host has its own endpoint: api/v1/clusters/<clusterName>/hosts/<hostName>

From this, you can look at various parts of the JSON response:

"host_state": "HEALTHY",
"host_status": "HEALTHY",
"ip": "192.168.64.103",
"last_agent_env": {},
"last_heartbeat_time": 1460383979229,
"last_registration_time": 1460135920315,

The state will move from HEALTHY to HEARTBEAT_LOST (or something else like UNHEALTHY) when an agent can't communicate. Also, there is a host heartbeat alert (called Ambari Agent Heartbeat) which you can leverage to send emails or SNMP traps when the server can't communicate with an agent.

View solution in original post

Don't have an account?
Coming from Hortonworks? Activate your account here