Login

Home Forum
Welcome, Guest
Please Login or Register.    Lost Password?

NagiosQL unable to handle arguments?
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: NagiosQL unable to handle arguments?
#138
NagiosQL unable to handle arguments? 2 Years, 1 Month ago Karma: 0
Hi all.

Just wanted to start off by saying that I'm loving NagiosQL. This is my 3rd Nagios web-based configuration tool that I'm trying, and it is by far the best I've used so far.


I'm trying to use the Nagios service argument feature within NagiosQL.

I know that passing arguments works from my Nagios server since I can run the "check_nrpe" command fine WITH arguments from the command line.

On my remote host, this is my line in the nrpe.cfg:

command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -u GB -p $ARG3$


From my Nagios server, this is the command line that I am running:

/usr/local/nagios/libexec/check_nrpe -H 10.10.10.1 -p 5666 -c check_disk -a 1000G 7G /


Which returns a successful result of:

DISK WARNING - free space: / 236 GB (93% inode=99%);| /=16GB;-734;259;0;266



But when I try to use this functionality in NagiosQL, the Nagios web interface always returns "Unknown argument"


Here's what my checkcommands.cfg looks like when I'm trying to configure the service via NagiosQL:


define command {
command_name Disk_Space
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c check_disk
}




... and here is what shows up in my service cfg file:





define service {
hostgroup_name Chicago
service_description Disk_Space_Service
servicegroups Main_Monitor
is_volatile 0
check_command Disk_Space!1000G!7G!/
max_check_attempts 10
normal_check_interval 1
retry_check_interval 1
active_checks_enabled 1
passive_checks_enabled 1
check_period 24_7
parallelize_check 1
obsess_over_service 1
check_freshness 0
event_handler notify-service-by-email2
event_handler_enabled 1
flap_detection_enabled 1
failure_prediction_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
contact_groups Support
notification_interval 5
notification_period 24_7
notification_options w,c
notifications_enabled 1
register 1
}





Yet if I were to pass the arguments directly in the checkcommands.cfg as I do on the command line of the Nagios server, I get a successful result




checkcommands.cfg


define command {
command_name Disk_Space
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c check_disk -a 1000G 7G /
}




Will yield this successful result in Nagios Web Page:



DISK WARNING - free space: / 236 GB (93% inode=99%):



I am using the fields provided for "Command arguments" on the "services.php" page of NagiosQL and populating the first 3 boxes ($ARG1$ $ARG2$ $ARG3$ ...).


Do I have the setup / syntax wrong somewhere in NagiosQL, or am I trying to do something outside the scope of what NagiosQL is designed to do?

Thanks for all your help in advance!
chrischarles2002
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#142
Re:NagiosQL unable to handle arguments? 2 Years, 1 Month ago Karma: 2
Hi,
no this should work with NagiosQL. I have done this kind of setup more than once. I was confused by this line:

Code:


define command {
command_name Disk_Space
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c check_disk




Where are your arguments within this definition? At least you should have something like:

Code:


define command {
command_name Disk_Space
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c check_disk -a $ARG1$ $ARG2$ $ARG3$
}



Then you should be able to define the arguments for every service definition.
rouven
NagiosQL Developer
Posts: 255
graphgraph
User Offline Click here to see the profile of this user
47315142 Gender: Male NagiosQL Location: Hamburg, Germany Birthday: 03/19
The administrator has disabled public write access.
 
Go to topPage: 1