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.
I have a really annoying issue with check_http that I can't figure out for the life of me.
I want to use check_http to check a string but I can't get it to work when I define the string in the host file. It only works when I define it in the commands.cfg file which is super frustrating for me.
I hope somebody can tell me what i'm doing wrong because i can't figure it out.
define service{
use generic-service ; Name of service template to use
host_name snapgeek.com
service_description check_http_test
check_command check_http_test
notifications_enabled 0
}
define service{
use generic-service ; Name of service template to use
host_name snapgeek.com
service_description check_http_content3
check_command check_http_content3! -u /meet-matt -R Iowa
notifications_enabled 0
}
define service{
use generic-service ; Name of service template to use
host_name snapgeek.com
service_description check_http_content3
check_command check_http_content3! -H snapgeek.com -u /meet-matt -R Iowa
notifications_enabled 0
}
define service{
use generic-service ; Name of service template to use
host_name snapgeek.com
service_description check_http_content3
check_command check_http_content3! -H snapgeek.com -R 2017
notifications_enabled 0
}
define service{
use generic-service ; Name of service template to use
host_name snapgeek.com
service_description check_http_content3
check_command check_http_content3! -R 2017
notifications_enabled 0
}
Also if I leave off the ! in "check_http_content3!" then the check config throws errors..
define service{
use generic-service ; Name of service template to use
host_name snapgeek.com
service_description URL Check
check_command check_http_content! -u /meet-matt -R Iowa
notifications_enabled 1
}
Guess I'll try the 1st example and see if I have better luck.
define service{
use generic-service ; Name of service template to use
host_name snapgeek.com
service_description URL test
check_command check_http_test -H snapgeek.com -u /meet-matt/ -r !Iowa
notifications_enabled 0
}
Error: Service check command 'check_http_test -H snapgeek.com -u /meet-matt/ -r !Iowa' specified in service 'URL test' for host 'snapgeek.com' not defined anywhere!
This fails with the error at the bottom of this page.
define service{
use generic-service ; Name of service template to use
host_name snapgeek.com
service_description URL test
check_command check_http_test! -u /meet-matt/ -r !Iowa
notifications_enabled 0
}