JMX metric for Apache Hadoop namenode url http://127.0.0.1:50070/jmx can be monitored using Apache Eagle (called Eagle in the following). Follow below steps to enable this feature in Eagle.
From Hortonworks sandbox just run below setup script to Install Pyton JMX script, Create Kafka topic, update Apache Hbase tables and deploy “hadoopjmx” Storm topology.
$ /usr/hdp/current/eagle/examples/hadoop-metric-sandbox-starter.sh $ /usr/hdp/current/eagle/examples/hadoop-metric-policy-create.sh
You should see policy with name “safeModePolicy”.
First make sure that Kafka topic “nn_jmx_metric_sandbox” is populated with JMX metric data periodically.(To make sure that python script is running)
$ /usr/hdp/2.2.4.2-2/kafka/bin/kafka-console-consumer.sh --zookeeper sandbox.hortonworks.com:2181 --topic nn_jmx_metric_sandbox
Genrate Alert by producing alert triggering message into Kafka topic.
$ /usr/hdp/2.2.4.2-2/kafka/bin/kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic nn_jmx_metric_sandbox $ {"host": "localhost", "timestamp": 1457033916718, "metric": "hadoop.namenode.fsnamesystemstate.fsstate", "component": "namenode", "site": "sandbox", "value": 1.0}
[^STORM]:All mentions of “storm” on this page represent Apache Storm. [^KAFKA]:All mentions of “kafka” on this page represent Apache Kafka.