Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Monitoring Hadoop

You're reading from  Monitoring Hadoop

Product type Book
Published in Apr 2015
Publisher
ISBN-13 9781783281558
Pages 100 pages
Edition 1st Edition
Languages
Author (1):
Aman Singh Aman Singh
Profile icon Aman Singh
Toc

Configuring Metrics2


For Hadoop version 2, which uses the YARN framework, the metrics can be configured using hadoop-metrics2.properties, in the $HADOOP_HOME folder:

*.sink.file.class=org.apache.hadoop.metrics2.sink.FileSink
*.period=10
namenode.sink.file.filename=namenode-metrics.out
datanode.sink.file.filename=datanode-metrics.out
jobtracker.sink.file.filename=jobtracker-metrics.out
tasktracker.sink.file.filename=tasktracker-metrics.out
maptask.sink.file.filename=maptask-metrics.out
reducetask.sink.file.filename=reducetask-metrics.out

We can also script it out and use it for metrics generation, shown as follows:

# namenode
[script://./bin/hadoop_metrics.sh http://192.168.1.70:50070/jmx]
disabled = 0
interval = 10
sourcetype = hadoop_metrics
index = hadoop_metrics

# datanode
[script://./bin/hadoop_metrics.sh http://192.168.1.70:50075/jmx]
disabled = 0
interval = 10
sourcetype = hadoop_metrics
index = hadoop_metrics

# jobtracker
[script://./bin/hadoop_metrics.sh http://192.168.1.70:50030...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime