天天看點

prometheus監控程序

項目位址: ​​https://github.com/ncabatoff/process-exporter​​

grafana:  ​​https://grafana.com/grafana/dashboards/4202​​ | ​​https://grafana.com/grafana/dashboards/10317​​

process-exporter是主要針對程序進行監控

 包含原始可執行檔案的基本名稱,即第二個字段 ​<code>​/proc/&lt;pid&gt;/stat​</code>​

{{.ExeBase}} 包含可執行檔案的basename

{{.ExeFull}} 包含可執行檔案的完全限定路徑

{{.Matches}} 映射包含應用指令行tlb所産生的所有比對項

 [root@izx7dvghztbiorz process-exporter]# ps -ef | grep redis 

redis 771 1 0 Jun05 ? 00:45:49 /usr/bin/redis-server *:6379

<col>

{{.Comm}} 

groupname="redis-server"

exe或者sh檔案名稱

{{.ExeBase}}

groupname="redis-server *:6379"

/

{{.ExeFull}}

groupname="/usr/bin/redis-server *:6379"

ps中的程序完成資訊

{{.Username}}

groupname="redis"

使用程序所屬的使用者進行分組

{{.Matches}}

groupname="map[:redis]"

表示配置到關鍵字“redis”

繼續閱讀