Reply
DN
New Contributor
Posts: 6
Registered: ‎09-16-2013

Cloudera Manager + Hadoop Metrics2 Safety Valve

Hello,

 

I'm using Cloudera Manager + CDH4.4 and would like to use ganglia for some external monitoring.  I've set up the Hadoop Metrics2 Safety Valve and have entries like this:

 

*.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31
# default sampling period
*.period=10
namenode.sink.ganglia.servers=localhost:8749
datanode.sink.ganglia.servers=localhost:8749
nodemanager.sink.ganglia.servers=localhost:8749
resourcemanager.sink.ganglia.servers=localhost:8749
secondarynamenode.sink.ganglia.servers=localhost:8749

 

But what shows up on the graphs in ganglia all appear to be coming from localhost.  Is there anyway to do a hostname substitution in Cloudera Manager?  I assume I want something like this to see the metrics split out per host:

 

*.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31
# default sampling period
*.period=10
namenode.sink.ganglia.servers=${HOSTNAME}:8749
datanode.sink.ganglia.servers=${HOSTNAME}:8749
nodemanager.sink.ganglia.servers=${HOSTNAME}:8749
resourcemanager.sink.ganglia.servers=${HOSTNAME}:8749
secondarynamenode.sink.ganglia.servers=${HOSTNAME}:8749

 

 

David

Highlighted
Posts: 416
Topics: 51
Kudos: 89
Solutions: 49
Registered: ‎06-26-2013

Re: Cloudera Manager + Hadoop Metrics2 Safety Valve

David,

 

  It appears that you are specifying "localhost" in the configurations.  The properties you mentioned in your post are simply to specify your Ganglia server's hostname and port.  If you'd like to use that server's hostname, you can just place it in there as a literal, no variable substitution is required.  Example:

 

namenode.sink.ganglia.servers=ganglia1.example.com:8749

 

HTH,

 

Clint