3.14 GeneralCounter

Use the GeneralCounter Knowledge Script to monitor a user-specified performance monitor counter on a Cisco Unified Communications server. You can monitor both the current value of the counter as well as the delta value (current value minus the previous value). This script raises an event if the value of the monitored counter exceeds the threshold and if the counter you want to monitor is not accessible.

This script generates data streams for current and delta counter values.

The GeneralCounter Knowledge Script has three configuration parameters: Object, Counter and Instance. Not all counters require an instance; however, many counters do. When GeneralCounter runs without an instance specified, it collects only the “no instance” version of the counter.

When monitoring by regular expression, the GeneralCounter Knowledge Script collects a list of all known instances of the specified Counter from the server. It then applies the regular expression provided against the instance list and selects only those instances. If no names match, an error event is raised stating that the regular expression did not find any instances, and providing a list of the instances which were found but not matched. If any instances are matched, the job will check against that list of counters on each subsequent iteration, as if the specific counter names had been entered by hand in the “Name of the instance to monitor” parameter.

Pattern matching is done using Perl syntax regular expression as provided by the 1.32.0 Boost library described at Boost.org.

The following table shows a few examples of Boost regular expressions:

To search for:

Expression

Example

All Instances

.*

Calls rejected due to ICT throttling for all gateways.

To limit your search to a specific object and counter, you can enter the object and counter name. For example:

Object= Cisco H323 Counter= CallsRejectedDueToICTCallThrottling Instance= .*

Everything on a specific device

^devicename::.*

  • Calls completed for all ports on gateway Cisco MGCP FXS Device netiqrtp-tl0-r1-555.netiq.com

    Object= Cisco MGCP FXS Device Counter=CallsCompleted Instance=^netiqrtp-tl0-r1-555\.netiq\.com::.*

  • Video calls for gateways within subnet 10.52.0.0

    Object= Cisco H323 Counter= VideoCallsActive Instance= ^10\.52\..*

All things to, from, and within a named location

(.*->)*(locationName)(->.*)*

Calls completed for all ports on gateway Cisco MGCP FXS Device netiqrtp-tl0-r1-555.netiq.com

Object= Cisco MGCP FXS Device Counter=CallsCompleted Instance=^netiqrtp-tl0-r1-555\.netiq\.com::.*

3.14.1 Resource Object

CiscoUCM_CMServer

3.14.2 Default Schedule

By default, this script runs every five minutes.

3.14.3 Setting Parameter Values

Set the following parameters on the Values tab as needed:

Parameter

How to Set It

General Settings

Job Failure Notification

Event severity when job fails

Set the event severity level, from 1 to 40, to indicate the importance of the failure of the GeneralCounter job. The default is 5.

Counter Specifications

Name of the object to monitor

Type the name of the performance object you want to monitor. An object is any resource, program, or service for which performance data can be collected. The default object name is System.

Name of the counter to monitor

Type the name of the performance counter you want to monitor. A counter represents the data associated with aspects of an object. The default counter name is TotalThreads.

Instance Specification

Name of the instance(s) to monitor

Type the name(s) of the performance instance you want to monitor. An instance distinguishes between multiple objects of the same type on a single computer. You can type multiple instance names, separated by commas.

Not all counters or objects require or have an instance.

Evaluate instance as regular expression?

Select the Yes check box to evaluate and monitor the instance names that you entered in the “Name of the instance(s) to monitor” field, as a regular expression. The default is unselected.

NOTE:

  • If the check box is unselected, and the “Name of the instance to monitor” field contains at least one entry, CiscoUCM evaluates the instance(s) as a comma-separated values (CSV) list.

  • If the check box is unselected, and the “Name of the instance to monitor” field is blank, CiscoUCM monitor the counter without specifying an instance.

Number of iterations between re-evaluation of instance names. (Enter 0 to never re-evaluate)

Set the number of iterations, from 0 to 8192, to re-evaluate between attempts to evaluate instance(s) for regular expressions. The default is 288.

Raise event if counter/instance found?

Select Yes to raise an event if this script evaluates a regular expression and finds a match is for one or more counter instances. The default is No.

Event severity when counter/instance not found

Set the event severity level, from 1 to 40, to indicate the importance of an event in which this script finds a match is for one or more counter after evaluating a regular expression. The default is 25.

Raise event if counter/instance not found?

Select Yes to raise an event if this script cannot find the counter or instance you specify. The default is Yes.

Event severity when counter/instance not found

Set the event severity level, from 1 to 40, to indicate the importance of an event in which this script cannot find the counter or instance you specify. The default is 25.

Monitor Current Value

Event Notification

Raise event if current value exceeds threshold?

Select Yes to raise an event if the current value of the counter exceeds the threshold you set. The default is Yes.

Threshold - Maximum current value

Specify the maximum current value the counter can attain before an event is raised. The default is 500.

Event severity when current value exceeds threshold

Set the event severity, from 1 to 40, to indicate the importance of an event in which the current value of the counter exceeds the threshold you set. The default is 10.

Data Collection

Collect data for current value?

Select Yes to collect data for charts and reports. If enabled, data collection returns the current value of the counter at each script iteration. The default is unselected.

Monitor Delta Value

Event Notification

Raise event if delta value exceeds threshold

Select Yes to raise an event if the delta value (the difference between the current value and the previous value) of the counter exceeds the threshold you set. The default is Yes.

Threshold - Maximum delta value

Specify the maximum delta value the counter can attain before an event is raised. The default is 100.

Event severity when delta value exceeds threshold

Set the event severity, from 1 to 40, to indicate the importance of an event in which the delta value of the counter exceeds the threshold you set. The default is 10.

Data Collection

Collect data for delta value?

Select Yes to collect data for charts and reports. If enabled, data collection returns the delta value of the counter as measured during the monitoring period. The default is unselected.