Issues

Select view

Select search mode

 
27 of 27

HostResourceSwRunMonitor: define the service-name parameter as a regular expression

Fixed

Description

It could be very useful to define the service-name parameter used by the HostResourceSwRunMonitor.java to be a regular expression when matching the software running in the remote machine, like

N[tT][rR][tT][Ss]can.exe

Also, If "match-all" is true, there can be an optional "min-services" and "max-services" parameters that can define a range. The service is up if:

a) services_count >= min-services and services_count <= max-services
b) either one is not defined, then only one has to pass.
c) neither are defined, the monitor acts just like it used to - checking

All instances to see if they are all running. It is assumed that all services would have to pass the minimum run state test, no matter what the count.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

PagerDuty

Created October 11, 2011 at 12:52 PM
Updated January 27, 2017 at 4:19 PM
Resolved October 11, 2011 at 1:00 PM

Activity

Show:

Alejandro GalueOctober 11, 2011 at 1:00 PM

I've committed the solution for both branches (1.8 and 1.10), on the following revisions:

1.8: 11d8298fb7ac3048e3234c5c560859a78a049d3d
1.10: ef830a77aa0af40514be4a3ab097ca2e697f48b6

For 1.8, I've also included some additional features already available on 1.10 for this particular monitor:

a) remove the extra quotes, and when no regex is defined
b) use "equalsIgnoreCase" instead of "equals" when comparing the service-name.

Here is an example usage:

The service GDM-SIMPLE will scan all the running software on the target machine where their name matches regex "^gdm-.*" (without the quotes), and will be available if the match count is greater or equal and 2 and less or equal than 5.