proc - Munin plugin to monitor various aspects of named processes
Processes running under Linux for a longer timespan.
The plugin needs to be able to parse the /proc-filesystem.
The plugin is configured by supplying a pipe-delimitered list of parameters through environment variables. [proc] env.procname proc1|proc2|proc3 env.procargs |--run| env.procuser joe||mary env.procaspect cpu|memory|ctxt_switches|threads|processes|io
env.procname defines the processname as seen inside the paranthesis of the second column in /proc/pid/stat. If you don't get the data you expect, you can check if the value is what you expect here. This is what's used for the first filter, and args/user-filters are then applied on top of this filter.
env.procargs defines a string which is matched against the command line of the process. It's a wildcard match, so you don't have to provide the entire argument list if there's only one key option you care about filtering on.
env.procuser defines the user the process has to run as. If nothing is provided, processes ran by any user are included.
env.procaspect defines which graphs to render. Per default, all graphs are included. You don't have to set this unless you want to exclude graphs.
Each graph uses data from the proc filesystem.
#%# family=auto #%# capabilities=multigraph
The graphs will be misleading in an event where you have multiple processes monitored, but less then all of them is restarted (or exits). This is due to the nature of counters, and I need to track state of individual processes to do this in a reliable way. It's on my TODO, but has a low priority as I consider this plugin something for graphing daemons.
Trygve Vea <firstname.lastname@example.org> Kristian Lyngstol <email@example.com>
Thanks to Kristian Lyngstol, I stole most of the initial code in this plugin from his varnish_-plugin, which is a really nice outline of how a wildcardplugin should look like. I've added some weird hacks to make it output multigraph. It's pretty ugly, but it works.