Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
nagios1_1
Posts: 14 Joined: Thu Jan 26, 2017 12:25 pm
Post
by nagios1_1 » Wed Mar 15, 2017 11:49 am
Hello, I wanted to ask you help.
I want using the plugin "check_http". I tried to use it with the following command:
./check_http -I 10.20.30.2 -p 80 -u
http://10.20.30.2/mywiki
and it works.
Now I don't use it inside "definition service"
I wrote this:
Code: Select all
define service {
host_name NAS
service_description Wiki (HTTP)
check_command check_http
max_check_attempts 5
check_period 24x7
#contacts admins
#contact_groups admins
notification_interval 30
notification_period 24x7
}
define command {
commnad_name check_http
command_line $USER1$/check_http -H $HOSTADDRESS$ ?????????????
}
I don't writing the command_line
Last edited by
nagios1_1 on Wed Mar 15, 2017 5:07 pm, edited 1 time in total.
tmcdonald
Posts: 9117 Joined: Mon Sep 23, 2013 8:40 am
Post
by tmcdonald » Wed Mar 15, 2017 12:39 pm
Code: Select all
define service {
host_name NAS
service_description Wiki (HTTP)
check_command check_http!80!http://10.20.30.2/mywiki
max_check_attempts 5
check_period 24x7
#contacts admins
#contact_groups admins
notification_interval 30
notification_period 24x7
}
define command {
commnad_name check_http
command_line $USER1$/check_http -I $HOSTADDRESS$ -p $ARG1$ -u $ARG2$
}
Former Nagios employee
nagios1_1
Posts: 14 Joined: Thu Jan 26, 2017 12:25 pm
Post
by nagios1_1 » Wed Mar 15, 2017 5:06 pm
tmcdonald wrote: Code: Select all
define service {
host_name NAS
service_description Wiki (HTTP)
check_command check_http!80!http://10.20.30.2/mywiki
max_check_attempts 5
check_period 24x7
#contacts admins
#contact_groups admins
notification_interval 30
notification_period 24x7
}
define command {
commnad_name check_http
command_line $USER1$/check_http -I $HOSTADDRESS$ -p $ARG1$ -u $ARG2$
}
Now I understand, thanks, It works.
I defined it in this way;
Code: Select all
define service {
host_name NAS
service_description Wiki
check_command check_http!80!http://10.10.10.11/wiki/
max_check_attempts 5
check_period 24x7
contact_groups admins
notification_interval 30
notification_period 24x7
}
cdienger
Support Tech
Posts: 5045 Joined: Tue Feb 07, 2017 11:26 am
Post
by cdienger » Thu Mar 16, 2017 9:07 am
Thanks for the update! Are we okay to close this?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new
Privacy Policy .