After Icinga2 is all setup.
- Install nagios via yum or apt get
apt-get install nagios-plugins
or
yum install nagios-plugins-http.x86_64
- Add the following
/etc/icinga2/conf.d/services.conf
apply Service "Check SSL certificate for " for (config in host.vars.ssl_domains) { check_command = "check_ssl" vars.hostname = config vars.critical = "15" vars.warning = "30" assign where host.vars.ssl_domains }
- Add the following to
/etc/icinga2/conf.d/commands.conf
object CheckCommand "check_ssl" { import "plugin-check-command" command = [PluginDir + "/check_http"] arguments = { "-H" = "$hostname$" "-C" = "$critical$" } }
- Edit the
/etc/icinga2/conf.d/hosts.conf
object Host "webhost.fqdn.com" { import "generic-host" address = "10.0.2.1" vars.disks["disk /"] = { disk_partitions = "/" } vars.os = "Linux" vars.remote_client = "webhost.fqdn.com" vars.users_wgreater = 10 vars.users_cgreater = 20 vars.ssl_domains = ["website.fqdn.com","websitetwo.fqdn.com"] vars.notification["mail"] = { groups = [ "icingaadmins" ] } }