Certain Hostgroups not working after Upgrade

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
brianbelden
Posts: 20
Joined: Thu Jul 20, 2017 2:48 pm

Certain Hostgroups not working after Upgrade

Post by brianbelden »

All,

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
}
The servicegroups_nagios3.cfg file has the following config:

Code: Select all

define servicegroup {
        servicegroup_name       DNS-google
        alias                   DNS-google
        }
define servicegroup {
        servicegroup_name       SMTP
        alias                   SMTP
        }

Our generic-service_icinga.cfg is the following:

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!
        }
In our hostgroups_icinga.cfg the following code is present:

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
        }
When I try to run the command from the command line I get the following output:

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
I cannot figure out why the SMTP hostgroup is working but the one checking DNS is not working at all. If I log into the Web interface for Icinga I see the hostgroup for DNS but it is empty without any checks. The hostgroup for SMTP is showing up and checking fine. I am not sure what is wrong here.

Thank you
brianbelden
Posts: 20
Joined: Thu Jul 20, 2017 2:48 pm

Re: Certain Hostgroups not working after Upgrade

Post by brianbelden »

False alarm I fixed my own issue.

So what happened was another user removed an entry from /etc/icinga/servers/blank.cloud9ortho.com.cfg, but they did not remove the associated hostgroups_icinga.cfg config for DNS checks. This apparently cause it to not work.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Certain Hostgroups not working after Upgrade

Post by benjaminsmith »

Hi Brian,

Thanks for the update. We'll close this out. Also, just to let you know, we do support Debian 8/9 on Nagios Core and Nagios XI.

https://support.nagios.com/kb/article.php?id=12
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked