These scripts help to collect Hadoop jmx and evently sent the metrics to stdout or Kafka. Tested with Python 2.7.
Edit the configuration file (json file). For example:
{ "env": { "site": "sandbox" }, "input": { "component": "namenode", "port": "50070", "https": false }, "filter": { "monitoring.group.selected": ["hadoop", "java.lang"] }, "output": { } }
Run the scripts
python hadoop_jmx_kafka.py > 1.txt
eagle-collector.conf
input
“port” defines the hadoop service port, such as 50070 => “namenode”, 60010 => “hbase master”.
filter
“monitoring.group.selected” can filter out beans which we care about.
output
if we left it empty, then the output is stdout by default.
"output": {}
It also supports Kafka as its output.
"output": { "kafka": { "topic": "test_topic", "brokerList": [ "sandbox.hortonworks.com:6667"] } }