“Process-exporter”的版本间的差异

来自linux中国网wiki
跳到导航 跳到搜索
 
(未显示同一用户的12个中间版本)
第2行: 第2行:
 
=down and inst=
 
=down and inst=
 
<pre>
 
<pre>
wget  -c https://github.com/ncabatoff/process-exporter/releases/download/v0.5.0/process-exporter-0.5.0.linux-amd64.tar.gz
 
  
 +
#rpm
 +
https://github.com/ncabatoff/process-exporter/releases/download/v0.7.10/process-exporter_0.7.10_linux_amd64.rpm
 +
 +
 +
#Deb
 +
https://github.com/ncabatoff/process-exporter/releases/download/v0.7.10/process-exporter_0.7.10_linux_amd64.deb
 +
 +
 +
wget  -c https://github.com/ncabatoff/process-exporter/releases/download/v0.7.5/process-exporter-0.7.5.linux-amd64.tar.gz
 +
# wget  -c https://github.com/ncabatoff/process-exporter/releases/download/v0.5.0/process-exporter-0.5.0.linux-amd64.tar.gz
 +
 +
 +
#if rpm
 +
vi /etc/process-exporter/all.yaml
  
 
  process-exporter]# pwd
 
  process-exporter]# pwd
第47行: 第60行:
 
WantedBy=multi-user.target
 
WantedBy=multi-user.target
  
 +
systemctl  enable  process-exporter
 +
systemctl  start  process-exporter  && systemctl  status    process-exporter
 +
 +
 +
</pre>
  
 +
=配置 =
 +
<pre>
  
配置
+
这个是在 安装了 process-exporter的机器上
 
Process-Exporter的做法是配置需要监控的进程的名称,他会去搜索该进程从而得到其需要的监控信息, 其实也就是我们常做的“ps -efl | grep xxx”命令来查看对应的进程。配置文件一开始是不存在的,需要我们创建,名字可以自定义:
 
Process-Exporter的做法是配置需要监控的进程的名称,他会去搜索该进程从而得到其需要的监控信息, 其实也就是我们常做的“ps -efl | grep xxx”命令来查看对应的进程。配置文件一开始是不存在的,需要我们创建,名字可以自定义:
 +
 +
 +
这个配置是在 prometheus机器上
 +
现在,我们需要去配置Prometheus来采集这份数据了,和其他配置一样,就是给Prometheus添加一份数据源:
 +
  - job_name: 'snsweb2-process'
 +
    static_configs:
 +
    - targets: ['12.41.11.20:9256']
 +
  
  
 
</pre>
 
</pre>
  
 +
=see also=
 +
 +
[https://www.jianshu.com/p/6a7511004766 Prometheus监控进程状态(Process-Exporter)]
 +
 +
[https://blog.csdn.net/u012599988/article/details/102929269 Grafana+Prometheus+Process-exporter/node_exporter监控服务进程(三)]
 +
 +
[https://www.cnblogs.com/huandada/p/10431667.html  Prometheus — Process-exporter进程监控 ]
 +
 +
[https://www.cnblogs.com/bigberg/p/10174222.html Prometheus 监控进程]
  
[[category:ops]] [[category:container]]
+
[[category:ops]] [[category:container]] [[category:prom]]

2022年1月4日 (二) 07:43的最新版本

down and inst


#rpm 
https://github.com/ncabatoff/process-exporter/releases/download/v0.7.10/process-exporter_0.7.10_linux_amd64.rpm


#Deb
https://github.com/ncabatoff/process-exporter/releases/download/v0.7.10/process-exporter_0.7.10_linux_amd64.deb


 wget  -c https://github.com/ncabatoff/process-exporter/releases/download/v0.7.5/process-exporter-0.7.5.linux-amd64.tar.gz
# wget  -c https://github.com/ncabatoff/process-exporter/releases/download/v0.5.0/process-exporter-0.5.0.linux-amd64.tar.gz


#if rpm 
vi /etc/process-exporter/all.yaml 

 process-exporter]# pwd
/data/apps/process-exporter
[root@prod-sns-mq01 process-exporter]# cat process-name.yaml 
process_names:
  - name: "{{.Matches}}"
    cmdline:
    - 'redis'

  - name: "{{.Matches}}"
    cmdline:
    - 'nuxt'


./process-exporter -config.path process-name.yaml &


#!/bin/bash
./process-exporter -config.path process-name.yaml & > process-exporter.log


curl http://localhost:9256/metrics


启动脚本

cat  /etc/systemd/system/process-exporter.service 
[Unit]
Description=process-exporterr
After=network.target
Wants=network-online.target

[Service]
Type=simple
User=root
ExecStart=/data/apps/process-exporter/process-exporter  -config.path /data/apps/process-exporter/process-name.yaml

Restart=on-failure
LimitNOFILE=65536

[Install]
WantedBy=multi-user.target

systemctl  enable  process-exporter
systemctl  start   process-exporter  && systemctl  status    process-exporter


配置


这个是在 安装了 process-exporter的机器上
Process-Exporter的做法是配置需要监控的进程的名称,他会去搜索该进程从而得到其需要的监控信息, 其实也就是我们常做的“ps -efl | grep xxx”命令来查看对应的进程。配置文件一开始是不存在的,需要我们创建,名字可以自定义:


这个配置是在 prometheus机器上
现在,我们需要去配置Prometheus来采集这份数据了,和其他配置一样,就是给Prometheus添加一份数据源:
  - job_name: 'snsweb2-process'
    static_configs:
    - targets: ['12.41.11.20:9256']



see also

Prometheus监控进程状态(Process-Exporter)

Grafana+Prometheus+Process-exporter/node_exporter监控服务进程(三)

Prometheus — Process-exporter进程监控

Prometheus 监控进程