1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| docker login -u admin -p Harbor12345 172.31.10.118
docker run -d --name node-exporter --restart=always -p 9100:9100 -v "/proc:/host/proc:ro" -v "/sys:/host/sys:ro" -v "/:/rootfs:ro" 172.31.10.118/monitor/node-exporter:v0.18.1
docker run --restart=always -tid -p 9256:9256 --privileged -v /proc:/host/proc -v `pwd`:/config --name process-exporter 172.31.10.118/monitor/process-exporter:0.7.1 --procfs /host/proc -config.path /config/process-name.yaml
vi process.yml
process_names: - name: "{{.Matches}}" cmdline: - 'mysqld'
process_names: - name: "{{.Matches}}" cmdline: - 'nginx'
- name: "{{.Matches}}" cmdline: - 'keepalived'
|