help with check_http
Posted: Wed Oct 10, 2012 5:30 am
Hi,
I am new to Nagios but have so far managed to get it to work and I’m monitoring some simple pings and a windows server fine with no problems.
I now want to set up something to monitor if a website is up or not.
I have created a .cfg file called “URL” in /usr/local/nagios/etc/objects which looks like this:-
define host{
use generic-host
host_name Google
alias Google
address 209.85.225.99
}
define service{
use generic-service
host_name Google
service_description http
check_command check_http
}
I have pointed it to the .cfg in /usr/local/nagios/etc/nagios.cfg like this -:
# Definitions for monitoring a URL
cfg_file=/usr/local/nagios/etc/objects/url.cfg
When I go to check it with /usr/local/nagios/bin/nagios –v /usr/local/etc/nagios.cfg I get this error.
processing object config file "/usr/local/nagios/etc/objects/url.cfg"...
Error: Invalid max_check_attemps value for host "Google"
Error: Could not register host (config file "/usr/local/nagios/etc/objects/url.cfg" , starting on line 2)
Error processing object config files!
Can anyone help please. Thanks.
I am new to Nagios but have so far managed to get it to work and I’m monitoring some simple pings and a windows server fine with no problems.
I now want to set up something to monitor if a website is up or not.
I have created a .cfg file called “URL” in /usr/local/nagios/etc/objects which looks like this:-
define host{
use generic-host
host_name Google
alias Google
address 209.85.225.99
}
define service{
use generic-service
host_name Google
service_description http
check_command check_http
}
I have pointed it to the .cfg in /usr/local/nagios/etc/nagios.cfg like this -:
# Definitions for monitoring a URL
cfg_file=/usr/local/nagios/etc/objects/url.cfg
When I go to check it with /usr/local/nagios/bin/nagios –v /usr/local/etc/nagios.cfg I get this error.
processing object config file "/usr/local/nagios/etc/objects/url.cfg"...
Error: Invalid max_check_attemps value for host "Google"
Error: Could not register host (config file "/usr/local/nagios/etc/objects/url.cfg" , starting on line 2)
Error processing object config files!
Can anyone help please. Thanks.