Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I can manually run check_nt with USEDDISKSPACE, but I get check_nt: could not parse arguments when called from the configs. The other one that isn't working is SERVICESTATE. MEMUSE, CPULOAD and UPTIME are working fine. Anybody have any ideas? I've tried hard coding all the arguments in the commands.cfg but to no avail.

commands.cfg

define command {
command_name check_nt_DISK_C
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -l C -w $ARG1$ -c $ARG2$ -v USEDDISKSPACE
}

services.cfg

define service {
use generic-service
host_name <server>
service_description USED DISK SPACE
check_command check_nt!DISK_C!-w 80 -c 90
check_interval 1
retry_interval 1
max_check_attempts 3
notification_options w,u,c,r
contact_groups toneman
notification_interval 0
}
share|improve this question

migrated from stackoverflow.com Jul 7 '11 at 1:10

This question came from our site for professional and enthusiast programmers.

2 Answers 2

Following commands.cfg this should be something like:

check_command check_nt_DISK_C!80 90
share|improve this answer
    
I can run the command like this without issue. Thanks, but your suggestion hasn't changed my result. ./check_nt -H <IPAddy> -p 12489 -l C -w 80 -c 90 -v USEDDISKSPACE –  user792974 Jul 5 '11 at 23:02
1  
Actually, it should be check_command check_nt_DISK_C!80!90. You need a ! for each argument. –  Nupraptor Jul 7 '11 at 21:54

I hardcoded the arguments and just created new command definitions for each of the drives. A little extra code, but at least it works.

command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -w 80 -c 90 -l F -v USEDDISKSPACE

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.