Fix nagios checks
authorAlex Dehnert <alex@dehnerts.com>
Tue, 19 Jan 2016 05:48:12 +0000 (00:48 -0500)
committerAlex Dehnert <alex@dehnerts.com>
Tue, 19 Jan 2016 05:48:12 +0000 (00:48 -0500)
- HTTPS checks should use check_https_hostname, so that we use the hostname's
  vhost, not the IP address
- explicitly use .my.cnf for olinda's mysql check, rather than just setting the
  home dir (I don't know why that seems to have broken, but it has)

local.d/esp.cfg
local.d/olinda.cfg

index 9ee81075a2d1998bb934d1331ce12e275d0259a8..27b5596fc341788eed3b50447aa159f43a9cd7c1 100644 (file)
@@ -67,7 +67,7 @@ define service {
 define service {
        use                     generic-esp-service
         service_description    HTTPS
-       check_command           check_https
+       check_command           check_https_hostname!-H esp.mit.edu
        __CHECK_CERT_EXPIRY_DAYS        30
 }
 
index 9c185107a707a04fe7f65a17151421c1689a05e9..91f70e9101273fa6d94488fcf88e9a2ab307e624 100644 (file)
@@ -25,7 +25,7 @@ define service {
        name olinda-https
        use adehnert-service
        service_description HTTPS
-       check_command check_https
+       check_command check_https_hostname
        __check_cert_expiry_days 10
        host_name olinda
 }
@@ -64,7 +64,7 @@ define service {
 
 define command{
         command_name    check_mysql_home
-       command_line    env HOME=/var/lib/nagios/ /usr/lib/nagios/plugins/check_mysql -H '$HOSTADDRESS$'
+       command_line    /usr/lib/nagios/plugins/check_mysql -H '$HOSTADDRESS$' -f /var/lib/nagios/.my.cnf
 }
 
 define service {