1.准备工作 安装go、glibe(需要连google服务器,咋连的,我就不写了,因为尝试了各种办法,都失败了,很伤心)

2.下载hadoop_exporter

cd /usr/local/prom/exporter
git clone https://github.com/Datatamer/hadoop_exporter
cd hadoop_exporter
glide install
go get github.com/prometheus/client_golang/prometheus
go get github.com/prometheus/log
go build */*.go

3.为几个exporter创建systemd服务

#vim /etc/systemd/system/namenode_exporter.service
[Unit]
Description=namenode_exporter
After=network.target
[Service]
Type=simple
User=prometheus
ExecStart=/usr/local/prom/exporter/hadoop_exporter/namenode_exporter -namenode.jmx.url http://lab1:50070/jmx
Restart=on-failure
[Install]
WantedBy=multi-user.target
#vim /etc/systemd/system/datanode_exporter.service
[Unit]
Description=datanode_exporter
After=network.target
[Service]
Type=simple
User=prometheus
ExecStart=/usr/local/prom/exporter/hadoop_exporter/datanode_exporter -datanode.jmx.url http://lab1:50075/jmx
Restart=on-failure
[Install]
WantedBy=multi-user.target
#vim /etc/systemd/system/journalnode_exporter.service
[Unit]
Description=journalnode_exporter
After=network.target
[Service]
Type=simple
User=prometheus
ExecStart=/usr/local/prom/exporter/hadoop_exporter/journalnode_exporter -journalnode.jmx.url http://lab1:8480/jmx
Restart=on-failure
[Install]
WantedBy=multi-user.target
#vim /etc/systemd/system/resourcemanager_exporter.service
[Unit]
Description=resourcemanager_exporter
After=network.target
[Service]
Type=simple
User=prometheus
ExecStart=/usr/local/prom/exporter/hadoop_exporter/resourcemanager_exporter -resourcemanager.url http://lab1:8080
Restart=on-failure
[Install]
WantedBy=multi-user.target

4.为几个exporter配置prometheus配置文件

##hadoop##
- job_name: 'nn'
static_configs:
- targets: ['localhost:9070']
labels:
instance: lab1 - job_name: 'rm'
static_configs:
- targets: ['localhost:9088']
labels:
instance: lab1 - job_name: 'dn'
static_configs:
- targets: ['localhost:9072']
labels:
instance: lab1 - job_name: 'jn'
static_configs:
- targets: ['localhost:9071']
labels:
instance: lab1

5.启动hadoop exporter

systemctl start namenode_exporter
systemctl start journalnode_exporter
systemctl start datanode_exporter
systemctl start resourcemanager_exporter systemctl status namenode_exporter
systemctl status journalnode_exporter
systemctl status datanode_exporter
systemctl status resourcemanager_exporter
systemctl enable namenode_exporter
systemctl enable journalnode_exporter
systemctl enable datanode_exporter
systemctl enable resourcemanager_exporter
 

6.

hadoop_exporter+prometheus的更多相关文章

  1. Prometheus+Grafana+Altermanager搭建监控系统

    基本概念 Prometheus 时间序列化数据库,我的理解就是将数据打上标签,以时间维度存储.后面有机会在深入研究. Prometheus架构如下: Grafana Prometheus中存储的数据, ...

  2. hadoop_exporter python版本的安装使用

    1.需要使用python pip 参考https://www.cnblogs.com/rain124/p/6196053.html python2.7.5 安装pip 1 先安装setuptools ...

  3. prometheus监控系统

    关于Prometheus Prometheus是一套开源的监控系统,它将所有信息都存储为时间序列数据:因此实现一种Profiling监控方式,实时分析系统运行的状态.执行时间.调用次数等,以找到系统的 ...

  4. Prometheus 系统监控方案 一

    最近一直在折腾时序类型的数据库,经过一段时间项目应用,觉得十分不错.而Prometheus又是刚刚推出不久的开源方案,中文资料较少,所以打算写一系列应用的实践过程分享一下. Prometheus 是什 ...

  5. Prometheus 系统监控方案 二 安装与配置

    下载Prometheus 下载最新安装包,本文说的都是在Linux x64下面内容,其它平台没尝试过,请选择合适的下载. Prometheus 主程序,主要是负责存储.抓取.聚合.查询方面. Aler ...

  6. [系统集成] 部署 mesos-exporter 和 prometheus 监控 mesos task

    前几天我在mesos平台上基于 cadvisor部署了 influxdb 和 grafana,用于监控 mesos 以及 docker app 运行信息,发现这套监控系统不太适合 mesos + do ...

  7. Docker 监控- Prometheus VS Cloud Insight

    如今,越来越多的公司开始使用 Docker 了,2 / 3 的公司在尝试了 Docker 后最终使用了它.为了能够更精确的分配每个容器能使用的资源,我们想要实时获取容器运行时使用资源的情况,怎样对 D ...

  8. 安装prometheus+grafana监控mysql redis kubernetes等

    1.prometheus安装 wget https://github.com/prometheus/prometheus/releases/download/v1.5.2/prometheus-1.5 ...

  9. Prometheus : 入门

    Prometheus 是一个开源的监控系统.支持灵活的查询语言(PromQL),采用 http 协议的 pull 模式拉取数据等特点使 Prometheus 即简单易懂又功能强大. Prometheu ...

随机推荐

  1. [POI2007]洪水pow

    Description AKD市处在一个四面环山的谷地里.最近一场大暴雨引发了洪水,AKD市全被水淹没了.Blue Mary,AKD市的市长,召集了他的所有顾问(包括你)参加一个紧急会议.经过细致的商 ...

  2. 字符串处理 Codeforces Round #285 (Div. 2) B. Misha and Changing Handles

    题目传送门 /* 题意:给出一系列名字变化,问最后初始的名字变成了什么 字符串处理:每一次输入到之前的找相印的名字,若没有,则是初始的,pos[m] 数组记录初始位置 在每一次更新时都把初始pos加上 ...

  3. .NET面试题解析(00)-系列文章索引

    .NET面试题解析(01)-值类型与引用类型 .NET面试题解析(02)-拆箱与装箱 .NET面试题解析(03)-string与字符操作 .NET面试题解析(04)-类型.方法与继承 .NET面试题解 ...

  4. 免费大数据搜索引擎 xunsearch 实践

    以前在IBM做后端开发时,也接触过关于缓存技术,当时给了n多文档来学习,后面由于其他紧急的项目,一直没有着手去仔细研究这个技术,即时后来做Commerce的时候,后台用了n多缓存技术,需要build ...

  5. Android开源项目:GifView——Android显示GIF动画

    下载:http://code.google.com/p/gifview/downloads/list 简介:android中现在没有直接显示gif的view,只能通过mediaplay来显示,且还常常 ...

  6. 简说JAVA8引入函数式的问题

    JAVA8中加入lambda演算是一个令人兴奋的新特性——虽然这个新特性来得太迟了,目前的主流开发语言中,JAVA似乎是最后一个支持函数式思维的语言. 虽然晚了点,但总比没有好——况且我认为它的实现还 ...

  7. Vue.js语法糖整理

    el:element 需要获取的元素,一定是HTML中的根容器元素 data:用于数据的存储 methods:用于存储各种方法 数据绑定字面量只加载一次{{* msg}} data里面可以进行简单的运 ...

  8. vue2.0排序应该注意的问题

    在computed里新声明了一个对象sortItems,如果不重新声明会污染原来的数据源,这是Vue不允许的,所以你要重新声明一个对象. 如果不重新声明报错: <!DOCTYPE html> ...

  9. MAC 添加共享,脚本执行

    Linux需要首先安装 yum install samba-client linxu添加windows 公共盘  mount -t cifs  user=guest,password=guest // ...

  10. swift try try? try!

    try You have 2 options when you try calling a function that may throw. You can take responsibility o ...