A rule is defined as a conditional or threshold value which, when exceeded, a notification must be sent. In a typical work flow inside AppPerfect Agentless Monitor, the monitors extract data from the monitored device and send it to the rules engine. The rules engine evaluates the data to ensure no rule is violated and then sends it to the view manager. However, if a rule is violated, a message is immediately sent to the notification server to alert the user about the rule violation.

Managing rules

You can define rules for the monitor you are creating by reaching the 'Define Rules' tab from the 'Add' monitor wizard. You can edit or delete these rules by clicking the 'Rules' tab in the main Monitor window. You can also add rules here.

Available Rules

To view the list of currently defined rules in the system, click the "Rules" tab in the AppPerfect Monitor Console. Each rule is uniquely identified with a Rule ID.

Modifying a rule

For modifying a rule's properties, you need to click that rule's name in the rule list. A page similar to the add rule page will be shown and all the properties of the rule can be modified from here. The valid values for the settings are shown above. Once you have entered the information click the Update button and the rule's properties will be updated. The syntax of the expression is validated before adding the rule to the database and if the updation is successful there will be a message displayed at the top of the rules list page saying that the rule has been successfully modified.

Deleting rules

For deleting rules, you need to select the check box against the rule name of the rule(s) you want to delete and then click the Delete button. In the delete confirmation dialog that comes up click OK and the rule(s) will be deleted. If Cancel is clicked no action will be taken. The alerts generated prior to the rule being deleted will be retained in the database but the evaluation of the rule will cease as soon as the rule is deleted.

Structure of a rule

A rule essentially is an expression that evaluates to either true or false. For example: you may want to know if CPU usage on server A has been more than 90%, so all you do is create a rule that will raise an alert if such a condition is met on server A.

A list of such expressions ('cpu_Total_cpu_usage') are listed in the Expressions text area. These expressions are relevant to the monitor that is being defined or that has been selected from the Monitor ID drop-down.

Creating a rule

You can add a new rule in two ways:

  1. While defining a new monitor, from the 'Define Rules' tab under Add Rules
  2. By clicking on the Rules tab.

You will see the following screen:

The fields marked with an asterisk are compulsory attributes and need to be entered for a new rule to be created. A brief description of each of the settings is given below :

  1. Rule ID: A unique Rule ID.
  2. Monitor ID: Select the monitor whose attribute will be used for building the rule.
  3. Severity: Select whether the rule is at a 'Warning' or an 'Error' level of severity.
  4. Notification: Specify the subject and message that you want to receive when a rule violated or comes out of violation in appropriate fields. Select the checkbox Include details in message if you want to receive details like rule id/name in the message.
  5. Expression: This field lists the expressions that can be used to trigger alerts by defining acceptable or not acceptable values for them. Select the expression you want to define the rule for and click 'Add'.

    You will see a new row added to the following fields:

    Field Description
    Column Name The full name of the expression is listed under this field.
    Condition Here you can select the condition for the selected expression. Click on the drop-down box to choose from either 'Over', 'Under', 'Equals' or 'Not Equals'.
    Value Enter a valid integer value here. This value should be chosen carefully, as it is what defines the rule's threshold, 'Over', 'Under', 'Equals' or 'Not Equals' (as selected by you in the previous column) which the alert is generated.
    Start Time This is the date and time on which you want to start monitoring the rule to raise an alert.
    End Time This is the date and time on which you want to stop monitoring the rule to raise an alert.
    Duration This is the duration for which the condition should be true after which the alert will be raised.
    Remove From here, you can delete the rule.

Once all the details are entered click the Add button and the rule will be created and you will be taken to the rule list page. By default the syntax of the expression is validated before adding the rule to the database. If there is some error in entering the data there will be a message shown asking you to correct the data.