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 监控进程的更多相关文章

  1. Prometheus — Process-exporter进程监控

    由于我们常用的node_exporter并不能覆盖所有监控项,这里我们使用Process-exporter 对进程进行监控. 安装process-exporter wget https://githu ...

  2. Kubernetes容器集群管理环境 - Prometheus监控篇

    一.Prometheus介绍之前已经详细介绍了Kubernetes集群部署篇,今天这里重点说下Kubernetes监控方案-Prometheus+Grafana.Prometheus(普罗米修斯)是一 ...

  3. Prometheus 监控领域最锋利的“瑞士军刀”

    原文:https://mp.weixin.qq.com/s/Cujn6_4w8ZcXCOWpoAStvQ 一.Kubernetes 容器监控的标配—Prometheus 1.简介 Prometheus ...

  4. Prometheus(三):Prometheus监控交换机(snmp)

    默认已安装Prometheus服务,服务地址:192.168.56.200 一.获取交换机snmp信息 snmp服务IP(交换机IP):172.20.2.83 snmp community:dfete ...

  5. prometheus监控redis,redis-cluster

    Prometheus监控redis使用的是redis_exporter, 作者GitHub: https://github.com/oliver006/redis_exporter 需要说明的是: r ...

  6. prometheus 监控ElasticSearch核心指标

    ES监控方案 本文主要讲述使用 Prometheus监控ES,梳理核心监控指标并构建 Dashboard ,当集群有异常或者节点发生故障时,可以根据性能图表以高效率的方式进行问题诊断,再对核心指标筛选 ...

  7. 如何利用Prometheus监控你的应用

    Prometheus作为一套完整的开源监控接近方案,因为其诸多强大的特性以及生态的开放性,俨然已经成为了监控领域的事实标准并在全球范围内得到了广泛的部署应用.那么应该如何利用Prometheus对我们 ...

  8. Prometheus监控node-exporter常用指标含义

    一.说明 最近使用Prometheus新搭建监控系统时候发现内存采集时centos6和centos7下内存监控指标采集计算公式不相同,最后采用统一计算方法并整理计算公式如下: 1 100-(node_ ...

  9. 03 . Prometheus监控容器和HTTP探针应用

    Eeporter是什么及来源? 是什么? 广义上讲所有可以向Prometheus提供监控样本数据的程序都可以被称为一个Exporter.而Exporter的一个实例称为target,如下所示,Prom ...

随机推荐

  1. 【Beta版本发布】爬虫队长装备全面更新!

    一.Beta阶段目标回顾 1.为了解决Alpha阶段线程异常泛滥的问题,我们需要一个线程池. 2.为了爬取得到的文件正确可用,我们需要一个异常清理器. 3.为了不间断爬取,管理员不必频繁运行程序点,我 ...

  2. 网络:Session原理及存储

    一.Session的工作流程 二.会话保持 会话保持是负载均衡最常见的问题之一,会话保持是指在负载均衡器上实现的一种机制,可以识别客户端与服务器之间交互过程的关连性,在作负载均衡的同时还保证一系列相关 ...

  3. [2017BUAA软工]第零次作业

    第一部分:结缘计算机     你为什么选择计算机专业?你认为你的条件如何?和这些博主比呢?(必答) 我当初选择计算机,是因为:1.北航的前辈对北航计算机专业评价非常高:2.我也喜欢通过编程来代替我完成 ...

  4. Why yarn

    http://www.cnblogs.com/LeftNotEasy/archive/2012/02/18/why-yarn.html https://www.ibm.com/developerwor ...

  5. APS.NET MVC4生成解析二维码简单Demo

    一.视图 @{ Layout = null; } <!DOCTYPE html> <html> <head> <meta name="viewpor ...

  6. [转帖]nginx upstream模块--负载均衡

    nginx upstream模块--负载均衡 https://www.cnblogs.com/linjiqin/p/5494783.html Module ngx_http_upstream_modu ...

  7. [CB]2018年中国智能手机市场出货量

    Canalys:2018年中国智能手机市场出货量同比跌逾14% https://www.cnbeta.com/articles/tech/813267.htm 市场调研机构Canalys今日公布中国智 ...

  8. [转帖]GitHub上整理的一些工具

    GitHub上整理的一些工具   技术站点 Hacker News:非常棒的针对编程的链接聚合网站 Programming reddit:同上 MSDN:微软相关的官方技术集中地,主要是文档类 inf ...

  9. python3_字符串

    一.字符串的表示 >>> s = "narjaja never give up" #字符串的创建和初始化 >>> s = 'narjaja ne ...

  10. Android控件第7类——对话框

    1.AlertDialog AlertDialog用来生成对话框,功能十分强大. AlertDialog可以分成4个组成部分:标题栏上的图标,标题区,文本区,按钮区. 使用方法: 创建AlertDia ...