I want to write a script which will run on master node and which will tell me the CPU Usage of data node how I will approach this problem. (Want to write script in Python)
If you are using Ambari we already collect this information. If you go to the hosts section you can see some graphs on the right hand side.
If you have Ambari Metrics and Grafana installed you will see we already have a very robust monitoring platform intergrated within Ambari.
View solution in original post