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.