hadoop_exporter+prometheus
1.准备工作 安装go、glibe(需要连google服务器,咋连的,我就不写了,因为尝试了各种办法,都失败了,很伤心)
2.下载hadoop_exporter
cd /usr/local/prom/exporter
git clone https://github.com/Datatamer/hadoop_exporter
cd hadoop_exporterglide 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的更多相关文章
- Prometheus+Grafana+Altermanager搭建监控系统
基本概念 Prometheus 时间序列化数据库,我的理解就是将数据打上标签,以时间维度存储.后面有机会在深入研究. Prometheus架构如下: Grafana Prometheus中存储的数据, ...
- hadoop_exporter python版本的安装使用
1.需要使用python pip 参考https://www.cnblogs.com/rain124/p/6196053.html python2.7.5 安装pip 1 先安装setuptools ...
- prometheus监控系统
关于Prometheus Prometheus是一套开源的监控系统,它将所有信息都存储为时间序列数据:因此实现一种Profiling监控方式,实时分析系统运行的状态.执行时间.调用次数等,以找到系统的 ...
- Prometheus 系统监控方案 一
最近一直在折腾时序类型的数据库,经过一段时间项目应用,觉得十分不错.而Prometheus又是刚刚推出不久的开源方案,中文资料较少,所以打算写一系列应用的实践过程分享一下. Prometheus 是什 ...
- Prometheus 系统监控方案 二 安装与配置
下载Prometheus 下载最新安装包,本文说的都是在Linux x64下面内容,其它平台没尝试过,请选择合适的下载. Prometheus 主程序,主要是负责存储.抓取.聚合.查询方面. Aler ...
- [系统集成] 部署 mesos-exporter 和 prometheus 监控 mesos task
前几天我在mesos平台上基于 cadvisor部署了 influxdb 和 grafana,用于监控 mesos 以及 docker app 运行信息,发现这套监控系统不太适合 mesos + do ...
- Docker 监控- Prometheus VS Cloud Insight
如今,越来越多的公司开始使用 Docker 了,2 / 3 的公司在尝试了 Docker 后最终使用了它.为了能够更精确的分配每个容器能使用的资源,我们想要实时获取容器运行时使用资源的情况,怎样对 D ...
- 安装prometheus+grafana监控mysql redis kubernetes等
1.prometheus安装 wget https://github.com/prometheus/prometheus/releases/download/v1.5.2/prometheus-1.5 ...
- Prometheus : 入门
Prometheus 是一个开源的监控系统.支持灵活的查询语言(PromQL),采用 http 协议的 pull 模式拉取数据等特点使 Prometheus 即简单易懂又功能强大. Prometheu ...
随机推荐
- border-radius的参数
border-radius的参数: 据w3c上的官方解释,是这样子的: border-radius: 1-4 length|% / 1-4 length|%;1-4指的是radius的四个值,leng ...
- [ZPG TEST 110] 多边形个数【DP】
1. 多边形个数 (polygons.pas/c/cpp) [问题描述] 给定N线段,编号1到n.并给出这些线段的长度,用这些线段组成一个K边形,并且每个线段做多使用一次.若使用了一条不同编号的线段, ...
- 学会用LATEX写论文
记录下,方便找寻 https://www.bilibili.com/video/av18365099/
- B. Hongcow Solves A Puzzle
http://codeforces.com/contest/745/problem/B 题目要求的是,给定一个图形,要求里面判断是否有矩形,且仅有一个 就是 XXX.... XXX...X 是不行的, ...
- C# 控制台语音计算器
记得上高中时,给人当会计,帮忙结算月度工资:用的就是带语音功能的计算器! 当时用起来倍儿爽,于是速度加倍,效率加速:结果让老板赔了不少钱! 就是因为这个,才对语音计算器有了深刻印象!可能是这货坑了我! ...
- mysql自动获取时间日期
实现方式: 1.将字段类型设为 TIMESTAMP 2.将默认值设为 CURRENT_TIMESTAMP 举例应用: 1.MySQL 脚本实现用例 --添加CreateTime 设置默认时间 C ...
- AJPFX:如何保证对象唯一性呢?
思想: 1,不让其他程序创建该类对象. 2,在本类中创建一个本类对象. 3,对外提供方法,让其他程序获取这个对象. 步骤: 1,因为创建对象都需要构造函数初始化,只要将本类中的构造函数私有化,其他程序 ...
- 用RecyclerView做一个小清新的Gallery效果
一.简介 RecyclerView现在已经是越来越强大,且不说已经被大家用到滚瓜烂熟的代替ListView的基础功能,现在RecyclerView还可以取代ViewPager实现Banner效果,当然 ...
- (转载)Sql注入的分类:数字型+字符型
Sql注入: 就是通过把SQL命令插入到Web表单提交或输入域名或页面请求的查询字符串,最终达到欺骗服务器执行恶意的SQL命令.通过构造恶意的输入,使数据库执行恶意命令,造成数据泄露或者修改内容等,以 ...
- docker使用registry搭建本地私有仓库
参考链接来自:http://blog.csdn.net/wangtaoking1/article/details/44180901/ 和Mavan的管理一样,Dockers不仅提供了一个中央仓库,同时 ...