zoukankan      html  css  js  c++  java
  • Ubuntu 14.10 下Ganglia监控Hadoop集群

    前提是已经安装好Ganglia和Hadoop集群

    1 Master节点配置hadoop-metrics2.properties

    # syntax: [prefix].[source|sink|jmx].[instance].[options]
    # See package.html for org.apache.hadoop.metrics2 for details
    
    *.sink.file.class=org.apache.hadoop.metrics2.sink.FileSink
    
    #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
    # Below are for sending metrics to Ganglia
    #
    # for Ganglia 3.0 support
    # *.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink30
    #
    # for Ganglia 3.1 support
    *.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31
    
    *.sink.ganglia.period=10
    
    # default for supportsparse is false
    *.sink.ganglia.supportsparse=true
    
    *.sink.ganglia.slope=jvm.metrics.gcCount=zero,jvm.metrics.memHeapUsedM=both
    *.sink.ganglia.dmax=jvm.metrics.threadsBlocked=70,jvm.metrics.memHeapUsedM=40
    
    namenode.sink.ganglia.servers=master:8649
    
    tasktracker.sink.ganglia.servers=master:8649
    
    maptask.sink.ganglia.servers=master:8649
    
    reducetask.sink.ganglia.servers=master:8649

    2 slave节点配置hadoop-metrics2.properties
    # syntax: [prefix].[source|sink|jmx].[instance].[options]
    # See package.html for org.apache.hadoop.metrics2 for details
    
    *.sink.file.class=org.apache.hadoop.metrics2.sink.FileSink
    
    #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
    # Below are for sending metrics to Ganglia
    #
    # for Ganglia 3.0 support
    # *.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink30
    #
    # for Ganglia 3.1 support
    *.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31
    
    *.sink.ganglia.period=10
    
    # default for supportsparse is false
    *.sink.ganglia.supportsparse=true
    
    *.sink.ganglia.slope=jvm.metrics.gcCount=zero,jvm.metrics.memHeapUsedM=both
    *.sink.ganglia.dmax=jvm.metrics.threadsBlocked=70,jvm.metrics.memHeapUsedM=40
    
    datanode.sink.ganglia.servers=master:8649
    
    jobtracker.sink.ganglia.servers=master:8649
    
    maptask.sink.ganglia.servers=master:8649
    
    reducetask.sink.ganglia.servers=master:8649

    3 重启Hadoop和ganglia
  • 相关阅读:
    [java] 深入理解内部类: inner-classes
    [java] 更好的书写equals方法-汇率换算器的实现(4)
    [java] 注释以及javadoc使用简介-汇率换算器的实现-插曲3
    [java] jsoup使用简介-汇率换算器实现-插曲2
    [java] 汇率换算器实现(3)
    [java] 汇率换算器实现-插曲1-正则表达式(1)
    [java] 汇率换算器实现(2)
    [java] 汇率换算器实现(1)
    [Basic] The most basic things about java
    电路相关知识–读<<继电器是如何成为CPU的>>
  • 原文地址:https://www.cnblogs.com/liuchangchun/p/4577136.html
Copyright © 2011-2022 走看看