Comment 8 for bug 1531487

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This didn't work. I got these files in /var/lib/nagios/export in the neutron-api/0 unit, for example:
host__juju-machine-1-lxc-1.cfg
service__region1-neutron-api-0_check_apache2.cfg
service__region1-neutron-api-0_check_haproxy.cfg
service__region1-neutron-api-0_check_haproxy_queue.cfg
service__region1-neutron-api-0_check_haproxy_servers.cfg
service__region1-neutron-api-0_check_neutron-server.cfg

The host one has these contents:
define host {
    address 10.245.201.104
    host_name juju-machine-1-lxc-1
    use server
    hostgroups machines,
}

The service ones, though, don't use that host_name. For example, service__region1-neutron-api-0_check_neutron-server.cfg:
define service {
    use active-service
    host_name region1-neutron-api-0
    service_description region1-neutron-api-0[neutron-server] process check {neutron-api/0}
    check_command check_nrpe!check_neutron-server
    servicegroups region1
}

So service startup is still failing on the master:
Processing object config file '/etc/nagios3/cloud.d/service__region1-neutron-api-0_check_haproxy_servers.cfg'...
Error: Could not find any host matching 'region1-neutron-api-0' (config file '/etc/nagios3/cloud.d/service__region1-neutron-api-0_check_haproxy_servers.cfg', starting on line 5)
Error: Could not expand hostgroups and/or hosts specified in service (config file '/etc/nagios3/cloud.d/service__region1-neutron-api-0_check_haproxy_servers.cfg', starting on line 5)
   Error processing object config files!