!managing_services_about.gif|align=right,border=10,bordercolor=#FFFFFF! *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 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. h4. Creating a New Service and Managing Existing 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. h5. Step 1 - New Service # 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 !managing_services_1.jpg|border=1! h5. Step 2 - Service Detail # 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 !managing_services_2.jpg|border=1! h5. Step 3 - Service Check 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. {Note}* 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.{Note} Figure: Service Check !managing_services_3.jpg|border=1! h5. Step 4 - Managing Services - Apply Hosts 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. # +Double check+ 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 !managing_services_4.jpg|border=1! {anchor:DeletingMultipleHostServices} h4. Deleting Host Services 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 !managing_services_5.jpg|border=1!
|