<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Hadoop metrics2 to Graphite: only 2 are received in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hadoop-metrics2-to-Graphite-only-2-are-received/m-p/194132#M68660</link>
    <description>&lt;P&gt;Fair enough about the &lt;EM&gt;*.period&lt;/EM&gt;. As I did get metrics there is probably a smart default, but nice to have.&lt;/P&gt;&lt;P&gt;I indeed found some messages in the service logs, and all looks good. To be honest, it all worked today.&lt;/P&gt;&lt;P&gt;I then happily applied the settings to prod, and lo and behold, I only have 2 metrics there. &lt;/P&gt;&lt;P&gt;Carrying on thinking, I understood is that in metrics2.properties I say that I want for instance node manager metrics, but I then actually need to restart the node manages to see those metrics. Indeed, the cluster I worked on yesterday has been rebooted (dev cluster, switched off at night).&lt;/P&gt;&lt;P&gt;Now all works as expected.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 28 Sep 2017 18:14:35 GMT</pubDate>
    <dc:creator>guillaume_roger</dc:creator>
    <dc:date>2017-09-28T18:14:35Z</dc:date>
    <item>
      <title>Hadoop metrics2 to Graphite: only 2 are received</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hadoop-metrics2-to-Graphite-only-2-are-received/m-p/194130#M68658</link>
      <description>&lt;P&gt;I have a graphite server, to which I want to send Hadoop metrics2.&lt;/P&gt;&lt;P&gt;On paper it's easy. Just add log4j.logger.org.apache.hadoop.metrics2=DEBUG to the log4j template and update hadoop-metrics2.properties template with:&lt;/P&gt;&lt;PRE&gt;*.sink.graphite.class=org.apache.hadoop.metrics2.sink.GraphiteSink 
*.sink.graphite.server_host=10.x.x.x
*.sink.graphite.server_port=2003

datanode.sink.graphite.metrics_prefix=datanode
namenode.sink.graphite.metrics_prefix=namenode
resourcemanager.sink.graphite.metrics_prefix=resourcemanager
nodemanager.sink.graphite.metrics_prefix=nodemanager
jobhistoryserver.sink.graphite.metrics_prefix=jobhistoryserver
journalnode.sink.graphite.metrics_prefix=journalnode
maptask.sink.graphite.metrics_prefix=maptask
reducetask.sink.graphite.metrics_prefix=reducetask
applicationhistoryserver.sink.graphite.metrics_prefix=applicationhistoryserver
&lt;/PRE&gt;&lt;P&gt;It works very well with one service (eg. datanode). If I put more than one, I will only get 2 services in graphite, and I cannot confirm that all metrics for those services are present.&lt;/P&gt;&lt;P&gt;Not knowing what metrics to expect and wanting to experiment, I do not want to filter on actual metric to limit their number.&lt;/P&gt;&lt;P&gt;On collectd side I can see one metric dropped (invalid), but one metric only. It does not account for all the rest. Furthemore, setting CollectInternalStats to true shows me that no metrics is dropped.&lt;/P&gt;&lt;P&gt;On Hadoop side... Well, I could not find anything telling me if metrics ar actually sent or not, if it succeeds or fail... Not logging anywhere.&lt;/P&gt;&lt;P&gt;So my 2 questions are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;How can I debug metrics2?&lt;/LI&gt;&lt;LI&gt;Is there any known reasons why I am missing metrics?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Context: hdp2.6 on AWS.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 12:18:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hadoop-metrics2-to-Graphite-only-2-are-received/m-p/194130#M68658</guid>
      <dc:creator>guillaume_roger</dc:creator>
      <dc:date>2022-09-16T12:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Hadoop metrics2 to Graphite: only 2 are received</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hadoop-metrics2-to-Graphite-only-2-are-received/m-p/194131#M68659</link>
      <description>&lt;P&gt;You should be able to find DEBUG level messages in the individual Hadoop service logs; messages starting with org.apache.hadoop.metrics2.*&lt;/P&gt;&lt;P&gt;One config missing is:&lt;/P&gt;&lt;P&gt;# default sampling period&lt;/P&gt;&lt;P&gt;*.period=10&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 01:32:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hadoop-metrics2-to-Graphite-only-2-are-received/m-p/194131#M68659</guid>
      <dc:creator>sidwagle</dc:creator>
      <dc:date>2017-09-28T01:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Hadoop metrics2 to Graphite: only 2 are received</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hadoop-metrics2-to-Graphite-only-2-are-received/m-p/194132#M68660</link>
      <description>&lt;P&gt;Fair enough about the &lt;EM&gt;*.period&lt;/EM&gt;. As I did get metrics there is probably a smart default, but nice to have.&lt;/P&gt;&lt;P&gt;I indeed found some messages in the service logs, and all looks good. To be honest, it all worked today.&lt;/P&gt;&lt;P&gt;I then happily applied the settings to prod, and lo and behold, I only have 2 metrics there. &lt;/P&gt;&lt;P&gt;Carrying on thinking, I understood is that in metrics2.properties I say that I want for instance node manager metrics, but I then actually need to restart the node manages to see those metrics. Indeed, the cluster I worked on yesterday has been rebooted (dev cluster, switched off at night).&lt;/P&gt;&lt;P&gt;Now all works as expected.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 18:14:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hadoop-metrics2-to-Graphite-only-2-are-received/m-p/194132#M68660</guid>
      <dc:creator>guillaume_roger</dc:creator>
      <dc:date>2017-09-28T18:14:35Z</dc:date>
    </item>
  </channel>
</rss>

