How Do I Define a New Service?
Step 1 will cover how to set up a new Service. When naming the Service you should use a standard naming convention to make it easier to tell what is going on later (e.g. ssh_disk_/). You will also need to select a Service Template to be associated with the new 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. Then in Step 2, you will have the opportunity in the Service Detail screen to use (Set Inheritance) the selected template default attributes or you can uncheck each attribute which enables you to set individual attributes for the new Service and not inherit the default setting from the selected template. Next, you can continue with Step 3 to configure the Service Check.
See Chapter 5 Advanced Configuration - Configuring Profiles to learn about grouping Services into Service Profiles.
Step 1 - New Service
- Select Services from the Configuration menu options.
- Select New service.
- In the New Service screen, enter the properties (see Table 5.3.1a. below).
- Select Add to go to the Manage Service screen.
Figure 5.3.1a. New Service
Table 5.3.1a. New Service
Name |
[Required] Name of the new Service. Example: check-disk-sda1. Note: Monarch and GroundWork Monitor do not support backslashes in Host and Service names. |
Service Template |
[Required] This option sets the default template for the Service name definitions. Example: generic-service. |
Step 2 - Service Detail
The Manage Service screen incorporates five tabs including Service Detail, Service Check, Service Dependencies, Services Profiles, Service Externals (optional), and Apply Hosts. Each of these tabs will be covered within this chapter.
- In the Service Detail tab, enter the properties (see Table 5.3.1b. below).
- Select Save to add the new Service. You will be prompted in the next screen that the Service has been save. Select Close. Delete removes the current Service, Rename is used to change the name of the current Service, and Close is used to exit the current Service without saving.
Figure 5.3.1b. Service Detail
Table 5.3.1b. Service Detail
Name |
Name of the Service entered on the previous screen. |
Service Template |
[Required] The Service Template most suitable for this Service, selected on the previous screen. You may re-select it here. |
Inherit All Values from Template |
[Optional] Checked sets all directive to inherit values from the selected template. Unchecked, directives below will override template values. |
Is Volatile |
[Required] This directive is used to denote whether the Service is Volatile. Services are normally not volatile. Unchecked Service is not volatile; Checked Service is volatile. |
Check Period |
[Required] This directive is used to specify the sort name of the time period during which active checks of this Service can be made. |
Max Check Attempts |
[Required] This directive is used to define the number of time that Nagios will retry the Service check command if it returns any state other than an OK state. Setting this value to 1 will cause Nagios to generate an alert without retrying the Service check again. |
Normal Check Interval |
[Required] This directive is used to define the number of time units to wait before scheduling the next regular check of the Service. Regular checks are those that occur when the Service is in an OK state or when the Service is in a non-OK state, but has already been rechecked max_attempts number of times. Unless the interval_length directive has been changed from the default value of 60, this number will mean minutes. |
Retry Check Interval |
[Required] This directive is used to define the number of time units to wait before scheduling a re-check of the Service. Services are rescheduled at the retry interval when they have changed to a non-OK state. Once the Service has been retried max_attempts times without a change in its status, it will revert to being scheduled at its normal rate as defined by the check_interval value. Unless you've changed the interval_length directive from the default value of 60, this number will mean minutes. |
Active Checks Enabled |
[Optional] This directive is used to determine whether or not active checks of this Service are enabled. Unchecked Disable Active Service Checks, Checked Enable Active Service Checks. |
Passive Checks Enabled |
Optional] This directive is use to determine whether or not passive checks of this Service are enabled. Unchecked Disable Passive Service Checks, Checked Enable Passive Service Checks. |
Parallelize Check |
[Optional] This directive is used to determine whether or not the Service check can be parallelized. By default, all Service checks are parallelized. Disabling parallel checks of Services can result in serious performance problems. Unchecked Service check cannot be parallelized (use with caution), Checked Service check can be parallelized. |
Obsess Over Service |
This value determines whether or not Nagios will obsess over Service checks results and run the obsessive compulsive Service processor command you define. This option is useful for performing distributed monitoring. If you're not doing distributed monitoring, don't enable this option. |
Check Freshness |
[Optional] This directive is used to determine whether or not freshness checks are enabled for this Service. Unchecked disable freshness checks, Checked enable freshness checks. |
Freshness Threshold |
[Optional] This directive is used to specify the freshness threshold (in seconds) for this Service. If you set this directive to a value of 0, Nagios will determine a freshness threshold to use automatically. |
Notifications Enabled |
[Optional] This directive is used to determine whether or not notifications for this Service are enabled. Unchecked Disable Service Notifications, Checked Enable Service Notifications. |
Notification Interval |
[Required] This directive is used to define the number of time units to wait before re-notifying a contact that this Service is still in a non-OK state. Unless you've changed the interval_length directive from the default value of 60, this number will mean minutes. If you set this value to 0, Nagios will not re-notify contacts about problems for this Service - only one problem notification will be sent out, unless there has been a state change. |
Notification Period |
[Required] This directive is used to specify the short name of the time period during which notifications of events for this Service can be sent out to contacts. No Service Notifications will be sent out during times which are not covered by the time period. |
Notification Options |
[Required] This directive is used to determine when Notifications for the Service should be sent out. Valid options are a combination of one or more of the following: If checked Unknown send notifications on an UNKNOWN state, Critical send notification on a CRITICAL state, Warning = send notifications on a WARNING state, Recovery send notifications on recoveries in OK state. If you specify None as an option, no Service notifications will be sent out. |
Event Handler Enabled |
[Optional] This directive is used to determine whether or not the event handler for this Service is enabled. Unchecked Disables Service Event Handler, Checked Enables Service Event Handler. |
Event Handler |
[Optional] This directive is used to specify the short name of the command that should be run whenever a change in the state of the Host is detected (i.e. whenever it goes down or recovers). The maximum amount of time that the event handler command can run is controlled by the event_handler_timeout option. |
Flap Detection Enabled |
[Optional] This directive is used to determine whether or not flap detection is enabled for this Service. Unchecked Disable Service Flap Detection, checked Enable Service Flap Detection. |
Low Flap Threshold |
[Optional] This directive is used to specify the low state change threshold used in flap detection for this Service. If you set this directive to a value of 0, the program-wide value specified by the low_service_flap_threshold directive will be used. |
High Flap Threshold |
[Optional] This directive is used to specify the high state change threshold used in flap detection for this Service. If you set this directive to a value of 0, the program-wide value specified by the high_service_flap_threshold directive will be used. |
Process Perf Data |
[Optional] This directive is used to determine whether or not the processing of performance data is enabled for Services using this template. Uncheckeddisables performance data processing, Checked enables performance data processing. |
Retain status information |
[Optional] This directive is used to determine whether or not status-related information about the Service is retained across program restarts. This is only useful if you have enabled state retention using the retain_state_information directive. Unchecked disables status information retention, Checked enables status information retention. |
Retain Non-status Information |
[Optional] This directive is used to determine whether or not non-status information about the Service is retained across program restarts. This is only useful if you have enable state retention using the retain_state_information directive. Unchecked disables non-status information retention, Checked enables non-status information retention. |
Contact Groups |
Select the contact groups to be notified for this Service. |
Extended Info Template |
[Optional] Defines extended Service information for this Service name. The template controls the icon and URL link as seen in Nagios for Hosts assigned this Service definition.) |
Escalation Tree |
[Optional] Select an escalation tree appropriate for this Service. To avoid amplified notification (i.e. multiple notifications for the same event), a Service Escalation assigned to a Service should not be assigned to the Host or the Host Group. |
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 preconfigured.
- Select the Service Check tab.
- De-select the Inherit check from template box which enables you to define a specific Check Command for this Service. Select the command (e.g. check_by_ssh_disk) from the drop-down list. GroundWork Monitor comes with a lot of standard commands already defined for you.
- 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.
Figure 5.3.1c. Service Check
OTHER SERVICE MANANGEMENT OPTIONS
Service Dependencies
Service Dependencies are optional and allow you to suppress Notifications and active checks of Services based on the status of one or more other Services. After defining the Service Detail and the Service Check attributes, you can select the Service Dependencies to add or remove service dependencies.
- Select Hosts from the Configuration menu options.
- Select the dependent host by using Search host. Or expand the Hosts navigation tree.
- Select a Host Group to expand the list of Hosts.
- Select the dependent Host to expand the navigation tree.
- From the navigation tree select a Service to get bring up the Manage Host Service screen.
- Select the Service Dependencies tab.
- Select the desired Dependency and then choose the Parent Host from the list.
- Click Add Dependency to create the new Service Dependency.
Figure 5.3.1d. Service Dependencies through Manage Host Service
The template you select defines a Parent Service relationship on a given Host. Monarch will create a Service Dependency relationship on a Host assigned to this Service name. To define a dependency from a Service running on a different Host use Hosts>Modify>Services>Service Dependency and select the Parent Host. Be careful to ensure that the Parent Service is assigned to the Parent Host definition and is included in the relevant Service Profiles.
To add a dependency, select from the dependency list and after the screen refreshes, choose the appropriate Host, or select same Host if the dependency is for Services on the same Host.
To configure a new, copy, or modify a Service Dependency Template go to Configuration>Services>Service Dependency Template where you can specify the Service, and specific execution failure criteria and notification failure criteria. These templates will then show up in the Manage Service, Service Dependencies screen. See Service Dependencies in this chapter.
Figure 5.3.1e. Service Dependencies
Service Profiles
A Service Profile is a collection of multiple Services. Once you have a Service Profile you can combine this with a Host Template and create a Host Profile. With GroundWork Monitor Professional, you get a preloaded set of Service Checks for multiple types of servers, devices, etc. that you can use out of the box. Service Profiles encapsulate a set of standard Services with Plugins and best practices that can be applied toward monitoring specific devices or protocols. The advantages of using a Service Profile is that it is pre-integrated. Using profiles, you can quickly configure GroundWork Monitor Professional to monitor groups of devices the same way. To define a Service Profile see Section 5 Configuration, Chapter 5 Advanced Configuration - Configuring Profiles.
- Here we will add or remove Service Profiles using this Service. Adding or removing a Service Profile here has no effect on the Service Profile's member Hosts until the apply tab is used on the Service Profile (or Host Profile), or the Profile is applied on the individual Hosts.
- Select Save to save the selected Service Profiles using this Service.
Figure 5.3.1f. Service Profiles
Service Externals
The Externals feature enables you to add your own configuration data that is not related to Nagios but can be useful when integrating other tools. When Externals are enabled, you can add this data to Host and Service Profiles, which can then be applied to instantiated Host and Service definitions. You can then execute the Run Externals command, which will call a user written program in MonarchExternals.pm. The user program can process the Externals data associated with the Host and Service definitions in Monarch. For example, the Externals data can be used to generate a configuration update for another monitoring tool based on Monarch changes. This is an advanced feature that requires some knowledge of Perl to modify MonarchExternals.pm.
- To enable Externals within GroundWork Monitor Professional, select Control from the Configuration tab, then Setup and click the Enable Externals box, and Save. You are then able to define, add, and execute Externals using the Services, Profiles, and Hosts configuration tabs.
Figure 5.3.1g. Enabling Externals

- To create a Service External, select Services from the Configuration tab options.
- Select Service Externals.
- Select New service.
- Enter a Name, and Details for the Service External.
- Select Add and Continue, you will then see the new external listed under Modify.
Figure 5.3.1h. Defining Service Externals

- You can then add Service and Host Externals within the Services, Profiles, and Host configuration options.
Figure 5.3.1i. Adding Externals

- To execute the externals select Control from the Configuration tab options, and Run Externals, which will execute your code in MonarchExternals.pm.
Figure 5.3.1j. Executing Code in MonarchExternals.pm

Apply Hosts
In the Apply Hosts tab you will need to select the options you want to apply to the listed Hosts. The listed Hosts are Hosts that have this Service assigned to it within the Host configuration tab. The options for applying Hosts are detailed here:
Apply Service Check - Check this if you want to apply the Service Check defined in the Service Check tab to this Host.
Apply Contact Groups - Check this if you want to apply the Service Contact properties to the listed Hosts.
Apply Service Extended Info - Check this if you want to apply the Service Extended Info properties to the listed Hosts.
Apply Service Escalation - Check this if you want to apply the Service Escalation properties to the listed Hosts.
Apply Dependencies - Check this if you want to apply the Service Dependencies to the listed Hosts.
Replace existing Service properties (force inheritance) - This refers to the properties selected on the Service Detail page and forces the inheritance of the Service Template.
Merge existing Services properties (preserve overrides) - This refers to the properties selected on the Service Detail page and preserves the indicated check box overrides for the listed Hosts.
Figure 5.3.1j. Apply Hosts
|