Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 04-11-2016 01:56 PM
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
Created 04-11-2016 02:18 PM
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.
Created 04-11-2016 02:07 PM
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.
Created 04-11-2016 02:18 PM
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.