- Go to your nagios top level directory, /usr/local/nagios.
- Use the check_http command line tool and make sure it works: ./libexec/check_http -H your.server.hostname -p 8443 -S Here the port is 8443. -S is the option to use SSL.
- Add a command, "check_https", to your etc/objects/commands.cfg file:
# 'check_https' command definitiondefine command{command_name check_httpscommand_line $USER1$/check_http -I $ARG1$ -p $ARG2$ -S}
- Add the host to be checked to the appropriate config file (see my previous post for an example, or see below).
- Make sure your don't have any typos: /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
- Reload nagios: /etc/rc.d/init.d/nagios reload
define host{
use linux-server ; Name of host template to use
host_name some-host ; The name we're giving to this host
alias Some Host to Check ; A longer name associated with the host
address 123.456.789 ; IP address of the host
hostgroups linux-servers ; Host groups this host is associated with
}
define service{
use local-service ; Name of service template to use
host_name some-host
service_description HTTP
check_command check_https!your.server.hostname!8443
notifications_enabled 1
}
1 comment:
Hi,
You should look at Shinken, it’s a enhanced Nagios reimplementation in Python that allow you to have a quick and easy distributed and high availability monitoring environment, and of course with Nagios configuration and plugins compatibility :)
It's available (Open Source with a AGPL licence) at http://www.shinken-monitoring.org with even a demo virtual machine to test it in 5minutes :)
Jean gabès, Shinken developper
Post a Comment