“Process-exporter”的版本间的差异
跳到导航
跳到搜索
第23行: | 第23行: | ||
#!/bin/bash | #!/bin/bash | ||
./process-exporter -config.path process-name.yaml & > process-exporter.log | ./process-exporter -config.path process-name.yaml & > process-exporter.log | ||
+ | |||
+ | |||
+ | curl http://localhost:9256/metrics | ||
2020年9月23日 (三) 08:41的版本
down and inst
wget -c https://github.com/ncabatoff/process-exporter/releases/download/v0.5.0/process-exporter-0.5.0.linux-amd64.tar.gz 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