Error I am getting on check proccesses


check_procs: Unknown argument - (null)

any ideas?


Not with that kind of description. Would it be too much to ask, just what the command line looks like? Are we supposed to know just what your config files are defined by magic or something? Throw us a frickin bone here huh?


Sorry I thought this would be a common error as this is a fresh install. If I run the command from command line I get:

PROCS OK: 155 processes

useing minimal.cfg

define service{
use generic-service ; Name of service template to use
host_name localhost
service_description Total Processes
is_volatile 0
check_period 24x7
max_check_attempts 4
normal_check_interval 5
retry_check_interval 1
contact_groups admins
notification_interval 960
notification_period 24x7
check_command check_local_procs!250!400


Nothing common about it.
The checkcommands.cfg defines check_local_procs as this:
define command{
command_name check_local_procs
command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
Your service.cfg defines t the check with only 2 arguments, sooo, where is the 3rd argument?

Your output would look like this by command line:
[root@tia2665 libexec]# ./check_procs -w 250 -c 400 -s
./check_procs: option requires an argument – s

But that’s not what you did by command line. You tried:
[root@tia2665 libexec]# ./check_procs
PROCS OK: 81 processes
which is perfectly ok, but that is not what you have defined in checkcommands.cfg
Either change your definition in checkcommands to fit your services.cfg or correct services.cfg to fit the commands.cfg defintion.


Okay I see what your saying, quickest fix was to change commands.cfg to remove the 3rd arg out of the line, below is now what it reads. I restarted nagios and am still getting the error.

‘check_local_procs’ command definition

define command{
command_name check_local_procs
command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$

also I ran the command via line with the correct args as shown below

/usr/local/libexec/nagios/check_procs -w 250 -c 400
PROCS OK: 161 processes

yet I am still reciveing the error via the webpage, I did a force refresh, and like I said killed and restarted nagios.


It takes a good 5 minutes before that check will be performed again. Are you sure it has ran at least once, since you restarted?


here is come infomation from nagios.log

[1116531899] SERVICE ALERT: localhost;PING;CRITICAL;HARD;4;CRITICAL - Plugin timed out after 10 seconds
[1116532189] Warning: Return code of 139 for check of service ‘PING’ on host ‘localhost’ was out of bounds.
[1116532330] Caught SIGTERM, shutting down…
[1116532330] Successfully shutdown… (PID=46327)
[1116532349] Nagios 2.0b3 starting… (PID=46537)
[1116532349] LOG VERSION: 2.0
[1116532349] Finished daemonizing… (New PID=46538)
[1116532369] SERVICE ALERT: localhost;Current Load;UNKNOWN;SOFT;1;check_load: Unknown argument - (null)
[1116532423] SERVICE ALERT: localhost;Current Load;UNKNOWN;SOFT;2;check_load: Unknown argument - (null)


So now the problem is check_load?
If so, check the syntax on that one too, since your check_procs syntax was incorrect.


AH HA! I see what is happening! its doing each util one at time till one fails syntax. Okay I got it now (bonehead move on my part didnt RTFS (screen) and assumed since it was the same error it was same process. Okay let me bang away at this for a bit.


strange: when i first run the fresh install of nagios2.x with the default minimal.cfg it worked fine even with the 3 arguments in the command file even though ther ewere only 2 values being passed in the services bit. then when i decided not to use the minimal file anymore but split everything up liek in nagios 1.x i found that it gave me this error even though i used the same settings i had for minimal. changing the checkcommands file to get rid of the third argument worked in the end though. thought i’d add this


Minimal.cfg doesn’t use any other files to define its commands, which is probably why it was working for you. You could’ve put lines of garbage and profanity in your other .cfg files (except cgi.cfg) and it would’ve worked fine, because minimal.cfg would’ve taken care of all other configurations.

Minimal.cfg covers all check command definitions and defines the hosts and services checks. By default those commands are configured so that they’ll go off without a hitch if you read (and exactly follow) the manual.
Edited Sun Jan 29 2006, 10:27PM ]