2

to reach customer-es-prd-dobb1, the packets must traverse a (client based) vpn via the host "cust-client-vpn". The intermediary host has a check named "customer-prod-vpn" which monitors the health of the particular connection.

The goal is to make the hosts services in the customers network all depend on a specific service on the intermediary machine. I however get

Error: Could not expand dependent services specified in service dependency (config file '/usr/local/nagios/etc/conf.d/servicedependency/customer.cfg', starting on line 1)
Error processing object config files!

If I replace the wildcard with, for example, "cpu usage" (an existing check) it works.

Here's the related dependency block:

define servicedependency {
    dependent_host_name             customer-es-prd-dobb1
    dependent_service_description   *
    host_name                       cust-client-vpn
    service_description             customer-prod-vpn
    execution_failure_criteria      w,u,c
    notification_failure_criteria   w,u,c
}

The intermediary host config:

define host {
    host_name                       cust-client-vpn
    alias                           cust-client-vpn
    address                         ip_addr_was_here
    use                             nrpe-server,host-pnp
    hostgroups                      debian-servers, monit-servers
    _NRPESSL    -n
    contacts        operations
}

the intermediary host check which it all depends on

define service {
    use                             generic-service,srv-pnp
    host_name                       cust-client-vpn
    service_description             customer-prod-vpn
    check_command                   check_nrpe_1arg!check_customer_vpn_prod
    check_interval                  10
    max_check_attempts              1
}

And finally the status for "customer-prod-vpn" check in nagios:

customer-prod-vpn  OK   05-20-2013 16:21:15  0d 14h 50m 42s 1/1 OK - UP 

Any nagios ninjas out there to point out what the problem is?

1
  • Try setting also setting wildcard for "service_description" in your servicedependency definition. I remember some odd issue where I had to set both of these to * to get it to work. May 20, 2013 at 18:04

2 Answers 2

3

'' is only a valid wildcard when not using regex (use_regexp_matching=0). A wildcard in regex is at least .

I went with .* and use_regexp_matching=1

0

Looking at the time saving tips docs page... the description of using wildcards seems to indicate that your way should work, although they don't explicitly have an example of exactly what you're trying to do.

Given that your way isn't working, the only way I know of to do this is to use a service group.

Put all of the services on that host into a service group (perhaps using a template or a wildcard?), and use that servicegroup for the dependency. This definitely works; I do it this way.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .