We recently upgraded our system which we ran Nagios3 on from Debian 7.11 to Debian 9.9. I know that Nagios3 is not supported in Debian 9, so I have to use Icinga instead. But Icinga is a drop in replacement of Nagios3. I have gone through this a couple time with different Monitoring servers we have, but this one is creating some strange issues.
In /etc/icinga/servers we have configuration files for many websites in our environment that are being check via DNS checks.
The services_icinga.cfg file has some lines of config like the ones below:
Code: Select all
define service {
hostgroup_name DNS-google
service_description DNS-google
servicegroups DNS-google
check_command check_dns_google
use generic-service
check_interval 15
notification_interval 0 ; set > 0 if you want to be renotified
}
define service {
hostgroup_name smtp-servers
service_description SMTP
servicegroups SMTP
check_command check_smtp
use generic-service
notification_interval 0; set > 0 if you want to be renotified
}
Code: Select all
define servicegroup {
servicegroup_name DNS-google
alias DNS-google
}
define servicegroup {
servicegroup_name SMTP
alias SMTP
}
Code: Select all
define service{
name generic-service ; The 'name' of this service template
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_interval 0 ; Only send notifications on status change by default.
is_volatile 0
check_period 24x7
normal_check_interval 5
retry_check_interval 1
max_check_attempts 4
notification_period 24x7
notification_options w,u,c,r
contact_groups admins
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
Code: Select all
define hostgroup {
hostgroup_name smtp-servers
alias SMTP servers
members aspmx.l.google.com
}
define hostgroup {
hostgroup_name DNS-google
alias DNS
members demo.cloud9ortho.com
}
Code: Select all
/usr/lib/nagios/plugins/check_dns -s 8.8.8.8 -H demo.cloud9ortho.com -a 209.10.146.119
DNS OK: 0.025 seconds response time. demo.cloud9ortho.com returns 209.10.146.119|time=0.024592s;;;0.000000
Thank you