how can I enable under Debian 6 to list the processes of a foreign user? I have the user nagios but this user can only list his own processes.
Br
check_procs command accepts a "-u USER" argument to list the processes for the specified user.
You have to edit you command.cfg (the place where your nagios command are defined), and add something like this:
define command{
command_name check_user_procs
command_line /usr/lib/nagios/plugins/check_procs -w '$ARG1$' -c '$ARG2$' -u '$ARG3$'
}
and create a service check for the user:
define service{
use generic-service
host_name YOUR-HOST-NAME
service_description Total Processes
check_command check_user_procs!250!400!USER_NAME_OR_ID
}
you have to replace USER_NAME_OR_ID withe the user info you are checking for.
The first two number specify the limits for warning and critical events.
check_procs
as user nagios. Because ps aux
also lists only own processes. It must be a system wide setting on Debian not nagios.