Prometheus 监控进程
Process-exporter
process-exporter可以用来检测所选进程的存活状态
下载process-exporter
下载地址:https://github.com/ncabatoff/process-exporter/releases/tag/v0.4.0
安装部署process-exporter
tar -zxvf process-exporter-0.4.0.linux-amd64.tar.gz -C /usr/local/process-exporter
编写配置文件
vim process-exporter-ncabatoff.yaml
process_names:
- name: "{{.Matches}}"
cmdline:
- 'redis-server'
- name: "{{.Matches}}"
cmdline:
- 'mysqld'
- name: "{{.Matches}}"
cmdline:
- 'org.apache.zookeeper.server.quorum.QuorumPeerMain'
- name: "{{.Matches}}"
cmdline:
- 'org.apache.hadoop.mapreduce.v2.hs.JobHistoryServer'
- name: "{{.Matches}}"
cmdline:
- 'org.apache.hadoop.hdfs.qjournal.server.JournalNode'
注 cmdline: 所选进程的唯一标识,ps -ef 可以查询到。如果改进程不存在,则不会有该进程的数据采集到。
编写启动脚本
vim /usr/lib/systemd/system/process_exporter.service [Unit]
Description=Prometheus exporter for processors metrics, written in Go with pluggable metric collectors.
Documentation=https://github.com/ncabatoff/process-exporter
After=network.target [Service]
Type=simple
User=prometheus
WorkingDirectory=/usr/local/process-exporter
ExecStart=/usr/local/process-exporter/process-exporter -config.path=/usr/local/process-exporter/process-exporter-ncabatoff.yaml
Restart=on-failure [Install]
WantedBy=multi-user.target
启动process-exporter
systemctl daemon-reload
systemctl start process_exporter
systemctl enable process_exporter
验证
curl localhost:9256/metrics
修改Prometheus配置文件
增加 - job_name: 'process'
static_configs:
- targets: ['172.16.8.187:9256']
重启Prometheus

Prometheus 监控进程的更多相关文章
- Prometheus — Process-exporter进程监控
由于我们常用的node_exporter并不能覆盖所有监控项,这里我们使用Process-exporter 对进程进行监控. 安装process-exporter wget https://githu ...
- Kubernetes容器集群管理环境 - Prometheus监控篇
一.Prometheus介绍之前已经详细介绍了Kubernetes集群部署篇,今天这里重点说下Kubernetes监控方案-Prometheus+Grafana.Prometheus(普罗米修斯)是一 ...
- Prometheus 监控领域最锋利的“瑞士军刀”
原文:https://mp.weixin.qq.com/s/Cujn6_4w8ZcXCOWpoAStvQ 一.Kubernetes 容器监控的标配—Prometheus 1.简介 Prometheus ...
- Prometheus(三):Prometheus监控交换机(snmp)
默认已安装Prometheus服务,服务地址:192.168.56.200 一.获取交换机snmp信息 snmp服务IP(交换机IP):172.20.2.83 snmp community:dfete ...
- prometheus监控redis,redis-cluster
Prometheus监控redis使用的是redis_exporter, 作者GitHub: https://github.com/oliver006/redis_exporter 需要说明的是: r ...
- prometheus 监控ElasticSearch核心指标
ES监控方案 本文主要讲述使用 Prometheus监控ES,梳理核心监控指标并构建 Dashboard ,当集群有异常或者节点发生故障时,可以根据性能图表以高效率的方式进行问题诊断,再对核心指标筛选 ...
- 如何利用Prometheus监控你的应用
Prometheus作为一套完整的开源监控接近方案,因为其诸多强大的特性以及生态的开放性,俨然已经成为了监控领域的事实标准并在全球范围内得到了广泛的部署应用.那么应该如何利用Prometheus对我们 ...
- Prometheus监控node-exporter常用指标含义
一.说明 最近使用Prometheus新搭建监控系统时候发现内存采集时centos6和centos7下内存监控指标采集计算公式不相同,最后采用统一计算方法并整理计算公式如下: 1 100-(node_ ...
- 03 . Prometheus监控容器和HTTP探针应用
Eeporter是什么及来源? 是什么? 广义上讲所有可以向Prometheus提供监控样本数据的程序都可以被称为一个Exporter.而Exporter的一个实例称为target,如下所示,Prom ...
随机推荐
- 初学习Qt的一些感悟
最近用Qt写了个人项目,有如下心得(可能有不准确): Qt尽管没有扩展C++语法,但是有额外编译链,每个Q_OBJECT类编译的时候会用moc工具生成另一个meta C++类,之后就是标准C++编译流 ...
- Linux内核分析——进程的描述和进程的创建
进程的描述和进程的创建 一. 进程的描述 (一)进程控制块PCB——task_struct 1.操作系统的三大管理功能包括: (1)进程管理 (2)内存管理 (3)文件系统 2.PCB task_st ...
- WIFI探针技术
1.WIFI 探针定义 WIFI 探针是一种能够主动识别 Android 和 IOS 设备,感知用户行为轨迹的精准数据收集前端,基于 WIFI探测技术.移动互联网和云计算等先进技术自动识别探针附近的智 ...
- Scapy的使用
0.前言 最近现场测试项目时,突如其来需要伪造IGMP报文,骗取交换机相关组播流量,慌忙之下学习了Scapy的使用,以及相关快速学习的方法,在这里分享下. 1.Scapy库安装 github地址:ht ...
- Distances to Zero CodeForces - 803B (二分)
题目链接:https://vjudge.net/problem/CodeForces-803B#author=0 题意: 给你一个数组,其中至少包括一个0,求每一个元素距离最近一个0的距离是多少. 样 ...
- ubuntu16.04下载安装navicate
1.下载试用版本地址: https://www.navicat.com.cn/download/navicat-premium 2.解压缩 tar -zxvf /home/rain/download ...
- eclipse html 打开方式
1. HTML Editor是有HTML语法着色的模式(类似于Notepad++里的效果),适用于大的HTML,这样复制剪贴效率较高,且有语法高亮. 2.Web Page Editor图形设计模式,类 ...
- 转帖: Serverless架构模式简介
Serverless架构模式简介 原贴地址:https://blog.csdn.net/chdhust/article/details/71250099?utm_medium=referral&a ...
- php的四种基本算法
/* 冒泡算法:结果从小到大,规则类似波浪推动的沙滩,先初始阈值为 0,初始第一次波浪之后,如果发现有左值比右边的大,就改变阈值并且完成波浪推动,重新初始化阈值为0,如此往复,直到没有阈值改变的情况出 ...
- iptables防火墙配置
iptables防火墙配置 一.防火墙简介 1.功能: 1)通过源端口,源IP地址,源MAC地址,包中特定标记和目标端口,IP,MAC来确定数据包是否可以通过防火墙 2)分割内网和外网[附带的路由器的 ...