categraf procstat中如何写多于一个的进程监控

Viewed 94

[[instances]]

# executable name (ie, pgrep <search_exec_substring>)

search_exec_substring = "nginx"

请教一下
如何写多于一个进程的监控我想监控 nginx的同时 也监控mysql.
而且标签也需要对应到不同的监控进程方便拍错时候能多一点信息.

3 Answers

复制多几个[[instances]]即可,复制后只需修改search_exec_substring 的值,想监控多少进程就复制几份

image.png

[[instances]]
xxxxx
xxxx
xxx
[[instances]]
yyyy
yyyy
yyy

label 可以对应吗?

label自己定义就行了