Service Dependency Management

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mcleodc
Posts: 59
Joined: Thu Jan 28, 2010 1:26 pm

Service Dependency Management

Post by mcleodc »

Hi,

I have created a service config file named windows_server_services.cfg (via Nagios xi core config manager) in this file I will add services that I want all windows hosts to have monitored - nsclient for instance.

I have added the nsclient service to two host groups (location1_win_servers and location2_win_servers) I have added windows servers to their relevant host group. I am now able to add services to the windows_server_services.cfg file and add them to the location1_win_servers and location2_win_servers host groups and all the members of the host groups begin monitoring the service.

The problem is when I try to create dependencies I select one of the windows hosts but the nsclient service doesn't show up in the services list. Is this a bug with the Nagios XI config manager or am I going something wrong?

I am running R1.2

Thanks

Chris
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Service Dependency Management

Post by mguthrie »

I'm going to have to refer this one up a level among our tech team. In the meantime I'll post the link to our Nagios Core documentation, which gets into more details with manual configs and dependencies, and the Core Config Manager is still based on Nagios Core. That might have what you're looking for.

http://nagios.sourceforge.net/docs/3_0/ ... ncies.html

General Nagios Core Documentation:
http://nagios.sourceforge.net/docs/3_0/toc.html
mcleodc
Posts: 59
Joined: Thu Jan 28, 2010 1:26 pm

Re: Service Dependency Management

Post by mcleodc »

Hi,

Thanks I will have a look at that. Hopefully your team can clarify this issue.


Thanks
Chris
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Service Dependency Management

Post by mmestnik »

The term file here is used loosely? As in file folder VS a directory of files.

You did all your edits using the CCM and applied the changes first, I think dependencies have to exist in nodb(nagios core).
mcleodc
Posts: 59
Joined: Thu Jan 28, 2010 1:26 pm

Re: Service Dependency Management

Post by mcleodc »

Hi,

Hopefully this will explain:

I created a new service named NSClient and gave it a config name of windows_server_services.cfg. All this was done by entering Nagios Core config manager => monitoring => services and clicking add new. After applying the config the file /usr/local/nagios/etc/services/windows_server_services.cfg was created.

If I specify member hostnames I can create dependencies:

Code: Select all

define service {
        host_name            host1
        service_description             NSClient
        use                             xiwizard_windowsserver_nsclient_service
        check_command                   check_xi_service_nsclient!wagtale!SERVICESTATE!-l NSClientpp -d SHOWALL!!!!!
        max_check_attempts              5
        check_interval                  5
        retry_interval                  1
        notification_interval           60
        contact_groups                  admins
        _xiwizard                       windowsserver
        register                        1
        }

###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
But if from within the config manager i select member host groups i cannot create dependencies see generated file below:

Code: Select all

define service {
        hostgroup_name            hostgroup1
        service_description             NSClient
        use                             xiwizard_windowsserver_nsclient_service
        check_command                   check_xi_service_nsclient!wagtale!SERVICESTATE!-l NSClientpp -d SHOWALL!!!!!
        max_check_attempts              5
        check_interval                  5
        retry_interval                  1
        notification_interval           60
        contact_groups                  admins
        _xiwizard                       windowsserver
        register                        1
        }

###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
Thanks
Chris
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Service Dependency Management

Post by mmestnik »

What dependencies?
Take a step backwards and explain what you are attempting to accomplish from a high level overview. You are doing a great job of explaining what you are doing just prior to the error message you are getting, though I don't follow why.
mcleodc
Posts: 59
Joined: Thu Jan 28, 2010 1:26 pm

Re: Service Dependency Management

Post by mcleodc »

Hi,

I want to be able to add a new monitored service to all my windows boxes by making the service a member of the host group windows_servers. This works, I am able to add a new service to monitor the NSClient service then make it a member of the windows_servers group. Any windows server I add to the group windows_servers now monitors the NSClient service. This allows me to quickly add a new service to all windows servers; I plan to start doing the same for my Cisco switches etc.

I also want to create the following dependencies via Nagios Core config manager => advanced => service dependencies

Host = WinServ1
Service = ping,nsclient

Dependent Host = WinSrv1
Dependent service = C drive, d drive, DNS , DHCP

This configuration would make the services C drive, d drive, DNS , DHCP dependent on the NSClient service being started and the server being pingable.

The issue is after selecting the host Winserv1 the NSClient service doesn’t appear in the services list. If I remove the NSClient service from the host group windows_servers and instead just select hosts I can create the dependency.

Hope this helps.


Thanks

Chris
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Service Dependency Management

Post by mmestnik »

Ahh, well a service is a single service and each service cna be attached to a host or host group. If you attach two single services to hostgroupA and then try and set dependencies on that service for just a single hostA it will(or should) fail. You can set the dependence against the host group.

I'm not sure of the semantics, but I do remember that if you look at the objects.dat file the service is not copied for each instance, like it is in the other status files. That should be what dictates what flexibility you can have.

Let me know how these interoperate and if I'm still correct about the semantics here... or if I'd need to setup a test and play with this myself.
Locked