Way to select file of Service Names for ServiceCheck ? ---Ig


Ignore this post, found what I needed.

Is there a way to select a file name for a check_nt ServiceCheck?

For example, I’d like to group similar service names (like Exchange Services) into a file (let’s call it Exchange_Services) and then have the entry in the services.cfg be able to reference it.

Like this:

Exchange Services definition

define service{
use generic-service
e template to use

    hostgroup_name                  Exchange-servers
    service_description             Exchange services
    is_volatile                     0
    check_period                    24x7
    max_check_attempts              3
    normal_check_interval           3
    retry_check_interval            1
    contact_groups                  network-admins
    notification_interval           120
    notification_period             24x7
    notification_options            w,u,c,r
    check_command                   check_exchange_services!Exchange_Services

I know I can write a customized:

define command{
command_name check_exchange_services
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v SERVICESTATE -l $ARG1$

and then my Exchange_Services has:
Microsoft Exchange Event
Microsoft Exchange IMAP4
Microsoft Exchange Information Store
…etc etc

Or, is there no way to do this and I must just add each Exchange Service I want to check in the services.cfg?
Edited ]


Nevermind, I’ll just use my above customized checkcommand using the service names in the service.cfg. That is of course if “spaces” are allowed in the service definition, like this:
check_command check_nt_exch!Information Store


yes spaces are allowed.