procstat怎么配置监控全部进程

Viewed 89

# executable name (ie, pgrep <search_exec_substring>)

search_exec_substring = "java"

# pattern as argument for pgrep (ie, pgrep -f <search_cmdline_substring>)

search_cmdline_substring = "n9e server"

# windows service name

search_win_service = ""

# search process with specific user, option with exec_substring or cmdline_substring

search_user = "root"

2 Answers

不能监控所有进程,你配置的什么筛选条件就监控符合筛选条件的进程。很多系统进程也不太有必要监控。如果想要机器的top视图,那是另一个监控需求了,不是procstat解决的场景。

尝试了下得到这个输出

local.procstat error: the fields should not be all blank: search_exec_substring, search_cmdline_substring, search_win_service

还是按文档要求来写吧 https://github.com/flashcatcloud/categraf/tree/main/inputs/procstat

p.s. 强求一下,设置search_exec_substring="." ,没准能有一点点能符合你要求,不过我这样好像写的不太对,你可以在尝试看看,哈哈哈 image.png