WAS THIS PAGE HELPFUL? Leave Feedback
Hosts are used to define a physical server, workstation, device, etc. that resides on your network. Services are the logical entities that hosts provide. A service definition stores its Name _along with a required _Service Template definition and optional service object directives. The bulleted items below describe the various service components.
- Services - A definition is used to identify a service that runs on a host. A service can be an actual service that runs on the host (POP, SMTP, HTTP, etc.) or some other type of metric associated with the host (response to a ping, number of logged in users, free disk space, etc.). A service incorporates multiple definitions (service template, check command, command line, service dependencies, service extended info, and service groups. This section will take you through the process of defining a new service, cloning an existing service, searching existing services, and viewing a list of available services. You will need to start with any listed prerequisites. The figure shows how a service and other related components tie together.
- Service Groups - A definition is used to group one or more services together for the purposes of simplifying notifications. When a service goes down, becomes unreachable, or recovers, Nagios will find which service group(s) the service is a member of, get the contact group for each of those service groups, and notify all contacts associated with those contact groups.
- Service Templates - This template incorporates multiple service detail directives and service check definitions. A service template is useful when you have common attributes for multiple services. For example, in a service template e.g., generic-win-disk-c, the check command check_nt_disk has a command line of $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v USEDDISKSPACE -l $ARG1$ -w $ARG2$ -c $ARG3$ where the values are set to check_nt_disk!C!85!95, which becomes the default command line value for a service check_disk_c. Now, if you want to create a service check_disk_d, you can select the service template generic-win-disk-c, uncheck Inherit all values from template, and replace the C parameter with a D.
- Service Dependencies - These allow you to suppress notifications and active checks of services based on the status of one or more other services.
- Service Extended Info - These templates are basically used to make the output from the status and extinfo CGIs look good. They have no effect on monitoring and are completely optional.
Here we'll cover how to setup a new service, including selecting a service template or specific attributes, and configuring the service check. Additionally, we'll review how to select actions to apply to the listed hosts.
- Select Configuration > Services.
- Select New service, (you could also copy an existing service into a new service by selecting Clone service).
- In the New Service screen, enter a required Service Name (e.g., ssh_disk). When naming the service you should use a standard naming convention to make it easier to tell what is going on later. GroundWork Monitor do not support back-slashes in host and service names.
- Next, select a required Service Template (e.g., generic-service). A service template is useful when you have common attributes for multiple services. A service template incorporates multiple service detail directives and service check definitions.
- Select Add to go to the next screen, Manage Service. The Manage Service screen incorporates five tabs including Service Detail, Service Check, Service Dependencies, Service Profiles, Service Externals (optional), and Apply Hosts.
Figure: New Service
- In the Service Detail tab, you have the option to accept all the inherited properties from the previously selected template or to individually uncheck a directive to override the template values.
- Select Save to add the new service. You will be prompted in the next screen that the service has been save.
- Select Close. Selecting Delete removes the current service and Rename is used to change the name of the current service.
Figure: Service Detail
Here we will configure the service check for the new service. You can create as many services as you like. If you want to use some of the other options on the plugins, you'll need to create new commands that set those options, and use them to create your services. GroundWork Monitor comes loaded with many of the commonly used Services already pre-configured.
- Select the Service Check tab.
- If you are satisfied with the check as inherited from the template, do nothing on this page. Otherwise uncheck the Inherit checkbox and make the necessary changes. Use the Test button to check the argument values, but bear in mind that the check command is run under the web servers account, so there may be issues with certain checks.
- Next, the ARG1!ARG2!ARG3 in the command line should be filled in to reflect the arguments to pass to the plugin. To run an example, use 20%!10%! to check the partition and give a warning when less than 20% is free, and a critical alert when less than 10% is free.
- You can then test the service against any host from within this service check screen.
- Select Save to save the service check with the new service.
- When making changes you must select Save for each tab. If you do not select Save and go to another tab you will lose your changes.
- Use the Apply Hosts tab to push the service changes to hosts that have this service. See Managing Services below.
Figure: Service Check
This step is used when managing services that have been assigned to hosts. Services can be assigned to host(s), using the Configuration > Hosts > Host wizard, or Configuration > Hosts > Clone host, or Configuration > Hosts > Hosts menu options. Once a service has been assigned to a host(s), that becomes a stable copy separate from the original generic service definition. If you modify the generic service definition (under Configuration > Services) and want to have those changes reflected in the host-service copies of the service, the service changes will need to be pushed to these assigned host(s).
By selecting an existing service name in Configuration > Services you have access to manage the service detail, service check, dependencies, and profiles. After making any service changes you will need to use the Apply Hosts tab to indicate the Service properties action(s) and Host services action to be taken. The Hosts drop-down box, in the Apply Host tab, lists all hosts that have this service. The checked service properties actions will be applied to the host-service on all of these hosts.
- Check Service properties action(s) to apply.
- Check Host services action to apply.
- your service changes, the set of hosts that are assigned this service, the service properties you have checked to apply, and how you want to modify the existing host-services.
- When you're ready, select Apply.
Figure: Apply Hosts
There is an easy way to delete one, many, or all host services. The Delete Host Services option is used to delete services that are no longer in use. Services can be removed from one or many hosts.
- Select Configuration > Hosts.
- Select Delete host services.
- The Delete Host Services screen allows you to select a service from a drop-down menu.
- Once a service is selected all its associated hosts will be listed. Select the check box next to each host you want the selected service removed.
- Select Delete. To remove the selected service from all hosts choose Check All and then Delete.
Figure: Delete Host Services