Control rules

Control rules for monitoring

Within ConnectPlaza Control you can define rules to monitor your ConnectPlaza Environment. These rules are used within the ConnectPlaza Monitor to give you a way to proactive monitor your ConnectAgents.

Per default, there are some rules available. When you first enter ConnectPlaza Control, open your ConnectAgent and check the menu option All rules to see them.

You see the following information on this grid:

Column Description
Location This is the location the rule applies to. A location is a part of the ConnectAgent you want to check.
Check Interval This is the CRON expression to set the interval for the monitor to check this location.
Type

Type of then rule, this can be one of the following types:

  • Single metric
  • Stationary metric
  • Timed trigger metric
  • Changed metric
  • One time stationary metric
Level

This applies to the seriousness of the issue. If a metric is activated you can set the message given as:

  • Ok
  • INFO
  • WARN
  • ERROR

The ConnectPlaza Monitor will react accordingly to this state.

Message The message returned by the ConnectPlaza Monitor
Open the rule set to modify this rule.

Creating and modifying rules

When you open one the rule editor via one of the or buttons in the ConnectPlaza Control application you will be presented with the following screen:

If you have selected a property with a rule in place, you will see the rule in this screen. Above example has no rules attached yet.

The first step to create rule is to define the Check interval. This is a cron definition you can create with the Cron editor. Use the button to open the Cron editor.

If you have selected the right interval, select the Set button to use the selected cron definition.

Select one of the rule templates, via the buttons at the bottom of the dialog. For instance Single metric. This will look like this.

Now you can modify the values on this screen and save the rule.

You can add multiple rule templates for one metric. They will be executed at the selected interval.

Rule templates

The template determines which validation is done with a metric to decide whether or not to send a notification.

The following rule templates are available:

Type Description
Single metric Test the value of the metric against the given (static) value with the given condition. If true, a notification will be send
Stationary metric Test the value of the metric over time. If the value is not changed in the given time period, a notification will be send.
Timed trigger metric Delays the notification when the trigger occurs, forgetting about it when the trigger doesn't happen anymore before the and of delay. Sends one notification, and another when the trigger doesn't happen anymore.
Changed metric Test the value of the metric over time. If the value is changed a notification is send.
One trigger stationary metric Test the value of the metric overtime. If the value is not changed in the given time period a notification will be send once. When the metric is changed afterwards, a resolved message and level are send.

Single metric

Purpose: Test the value of the metric against the given (static) value with the given condition. If true, a notification will be send.

Field overview:

Fieldname Description
Active Is this rule active of inactive. You can select the button to change the value. Active (orange) is default.
Notification level

This applies to the seriousness of the issue. If a metric is activated you can set the message given as:

  • OK
  • INFO
  • WARNING
  • ERROR

The ConnectPlaza Monitor will react accordingly to this state.

Message Message to return to the client
Rule priority

Number between 1 and 99. When more than one metric notification is defined on one metric for this template, this defines the priority of the rule.

Trigger condition

Test the value of the property against the value of the rule based on the condition. The following conditions may be applied:

  • ==        -- Equal to
  • >          -- Greater than
  • >=        -- Greater or equal to
  • <          -- Less than
  • <=        -- Less or equal to
  • !=         -- Not equal to
Trigger value Given static value to test against.

Stationary metric

Purpose: Test the value of the metric over time. If the value is not changed in the given time period, a notification will be send.

Field overview:

Fieldname Description
Active Is this rule active of inactive. You can select the button to change the value. Active (orange) is default.
Notification level

This applies to the seriousness of the issue. If a metric is activated you can set the message given as:

  • OK
  • INFO
  • WARNING
  • ERROR

The ConnectPlaza Monitor will react accordingly to this state.

Message Message to return to the client
Rule priority Number between 1 and 99. When more than one metric notification is defined on one metric for this template, this defines the priority of the rule.
Trigger delay period in seconds Time period in seconds

Timed trigger metric

Purpose: Delays the notification when the trigger occurs, forgetting about it when the trigger doesn't happen anymore before the end of delay. Sends one notification, and another when the trigger doesn't happen anymore.

Field overview:

Fieldname Description
Active Is this rule active of inactive. You can select the button to change the value. Active (orange) is default.
Notification level

This applies to the seriousness of the issue. If a metric is activated you can set the message given as:

  • OK
  • INFO
  • WARNING
  • ERROR

The ConnectPlaza Monitor will react accordingly to this state.

Message Message to return to the client
Notification resolved message The notification message when the trigger is resolved. Only send when message was send earlier.
Rule priority Number between 1 and 99. When more than one metric notification is defined on one metric for this template, this defines the priority of the rule.
Trigger condition

Test the value of the property against the value of the rule based on the condition. The following conditions may be applied:

  • ==        -- Equal to
  • >          -- Greater than
  • >=        -- Greater or equal to
  • <          -- Less than
  • <=        -- Less or equal to
  • !=         -- Not equal to
Trigger delay time in seconds Time to delay the notification.
Trigger value Given static value to test against.
Notification level for resolved message Here you can set the level at which the resolved message should be sent.

Changed metric

Field overview:

Fieldname Description
Active Is this rule active of inactive. You can select the button to change the value. Active (orange) is default.
Notification level

This applies to the seriousness of the issue. If a metric is activated you can set the message given as:

  • OK
  • INFO
  • WARNING
  • ERROR

The ConnectPlaza Monitor will react accordingly to this state.

Message Message to return to the client
Delta value Difference with previous value for notification to be send.
Rule priority Number between 1 and 99. When more than one metric notification is defined on one metric for this template, this defines the priority of the rule.

 

One trigger stationary metric

Field overview:

Fieldname Description
Active Is this rule active of inactive. You can select the button to change the value. Active (orange) is default.
Notification level

This applies to the seriousness of the issue. If a metric is activated you can set the message given as:

  • OK
  • INFO
  • WARNING
  • ERROR

The ConnectPlaza Monitor will react accordingly to this state.

Message Message to return to the client
Notification level for
resolved message

The level for the Notification Resolved Message. Levels are :

  • OK
  • INFO
  • WARNING
  • ERROR
Notification resolved
message

The notification message when the trigger is resolved. Only send when message was send earlier.

Rule priority Number between 1 and 99. When more than one metric notification is defined on one metric for this template, this defines the priority of the rule.
Trigger delay period
(sec)                        
Time period in seconds

 

 

 

 

Using properties to enrich your notifications

The notification messages that can be configured for the various Rule templates can be provided with 'enriched' information. This information consists, for example, of the value or timestamp of the metric at the time of generating the metric or with the set trigger value of the rule. These types of values ​​can be included in the messages using a property placeholder. The placeholder consists of the name of the attribute and is preceded and closed with a double underscore. A notification message could look like this, for example:

Percentage of memory storage on ActiveMQ exceeds __triggervalue__% for more then __seconds__ seconds. Current: __value__%

When generating the notification, the system will replace the placeholders with the current values. Each Rule template has a number of shared and a number of private properties.

Shared properties

(values are with 2 underscores at the beginning and 2 at the end!)

Property Description
__address__ The location the metric resides. Like <adapter>.<flow>
__name__ The name of the metric. Like totalReceived
__value__ The last received value of the metric. (For the stationary templates the value is the passed time in milliseconds)
__userId__ The Id of the user who has set this rule
__agentId__ The agent licence number
__level__ The level of the notification
__timestamp__ The timestamp in milliseconds of the generation of the notification
__valueType__ The class type of the value. (like java.lang.Long)
__connectMessageId__ The connectMesageId if the notification was triggered by an exception message
__correlationId__ The correlationId if the notification was triggered by an exception message
__analyzeMessageId__

The analyzeMesageId if the notification was triggered by an exception message

Template specific properties

Template Property Description
changedMetric __deltavalue__ The configured deltavalue in de rule
oneTriggerStationaryMetric __seconds__ The configured number of seconds in the rule
singleMetric __triggervalue__ The configured value to trigger the rule in combination with the condition
  __condition__ The configured condition to trigger the rule in combination with the triggervalue
stationaryMetric __seconds__ The configured number of seconds in the rule
timedTriggerMetric __triggervalue__ The configured value to trigger the rule in combination with the condition and seconds
  __condition__ The configured condition to trigger the rule in combination with the triggervalue and seconds
  __seconds__ The configured number of seconds the combination of triggervalue and condition should be true to cause the notification

It is possible to do calculations within the notification messages with the property placeholder values. For example, to display the number of minutes instead of seconds in a message, the __value__ of a stationary should be divided by 60. This can be done by using the following construction in the notification message:

${__value__/60}

Everything between ${ and } is evaluated as a restricted javascript set. The possible operations are + - * / and ( ). In addition, it is possible to use the Math.round function :

${Math.round(__value__/60)}