Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  jeffatrackaid May 20 '13 at 18:04

2 Answers 2

up vote 1 down vote accepted

'*' 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

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.