This plugin provides native process instrumentation for monitoring and metrics collection, including: process status, uptime, thread count, and others.
When trying to match a process that is owned by a user with a long name fails to match using check-process.rb -u longusername
It appears this line in check-process.rb:
229 >> read_lines('ps axwwo user,pid,vsz,rss,pcpu,nlwp,state,etime,time,command').drop(1).map do |line|
Uses ps which by default truncates the username at 7 characters (adding a + at the end to indicate that the field is truncated). A possible fix for this would be to specify the length of the user field. I've tried this on a few flavors of linux successfully, but not an exhaustive test.
229 >> read_lines('ps axwwo user:30,pid,vsz,rss,pcpu,nlwp,state,etime,time,command').drop(1).map do |line|
It seems to make more sense to make the user column display length of the ps call set based on the length of the -u query so that it would have sufficient length to match the user delimiter parameter in the check.
When trying to match a process that is owned by a user with a long name fails to match using check-process.rb -u longusername
It appears this line in check-process.rb:
229 >> read_lines('ps axwwo user,pid,vsz,rss,pcpu,nlwp,state,etime,time,command').drop(1).map do |line|
Uses ps which by default truncates the username at 7 characters (adding a + at the end to indicate that the field is truncated). A possible fix for this would be to specify the length of the user field. I've tried this on a few flavors of linux successfully, but not an exhaustive test.
229 >> read_lines('ps axwwo user:30,pid,vsz,rss,pcpu,nlwp,state,etime,time,command').drop(1).map do |line|
It seems to make more sense to make the user column display length of the ps call set based on the length of the -u query so that it would have sufficient length to match the user delimiter parameter in the check.