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. 程序3-3 Palindromes

    刘大婶说这个比较难,哈哈,我感觉自己写的代码还是比较简单的. #include<stdio.h> #include<string.h> #include<math.h&g ...

  2. iOS9 关于明文HTTP报错的修复方法

    报错:App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. ...

  3. codevs 1082 线段树练习 3 --分块练习

    时间限制: 3 s  空间限制: 128000 KB  题目等级 : 大师 Master 题目描述 Description 给你N个数,有两种操作: 1:给区间[a,b]的所有数增加X 2:询问区间[ ...

  4. 数组,寻找第K大的数

    时间复杂度 O(n) def partition(data,left,right): if (len(data)<=0 or left<0 or right>=len(data)): ...

  5. (function(){})() 立即执行函数

    (function(){})() 立即执行函数 (function(a){})(5) 带参的

  6. mysql 添加记录或者删除记录

    insert into tableName (prod1,pord2,... ) values (v1,v2,...) [,(v1,v2,...),(v1,v2,...)] 程度从强到弱 1.drop ...

  7. JavaScipt30(第二十二个案例)(主要知识点:getBoundingClientRect)

    这是第二十二个案例,这个例子实现的是鼠标移入a标签时,将其高亮. 附上项目链接: https://github.com/wesbos/JavaScript30 以下为注释后的源码: <scrip ...

  8. Vue之x-template(1)

    今天,我们来讲一个比较有趣的一个功能吧 先来看一段代码示例: <html> <head> <meta charset="utf-8"> < ...

  9. 微信小程序------微信支付模块

    最近项目涉及到小程序开发:需要进行微信支付模块,接下来通过叙述,记录一下微信小程序中微信支付模块的开发,以便日后翻阅和使用. 学习指南----------微信支付开发文档:https://pay.we ...

  10. JavaSE-08 封装

    学习要点 封装 访问控制符 包 封装 没有封装的代码有何缺陷? 例如:对狗狗的健康值赋值为-100.如何避免?——使用封装. 封装的概念 将类的某些信息隐藏在类内部,不允许外部程序直接访问,而是通过该 ...