Skip to main content
Skip table of contents

Rules

Feature

One way to customize Germain and benefits it provides, is to write a rule and let Germain run that rule 24x7.

Rules rely in MVEL. More details about MVEL here: http://mvel.documentnode.com.

Video overview: https://youtu.be/96S3S7G2f2o .

Configuration

This example shows the steps for adding a rule that is parsing for Errors in a Web Server Log file used by Siebel. You can follow the same logic for any rule.

Add new rule

Via Wizard

Go to Germain Workspace > Left Menu > Wizards > Rule

Manually

Go to Germain Workspace > Left Menu > Analytics > Rules

  • Enter your rule name. e.g. “custom-parser-siebel-web-drl”

  • Paste the contents of the drl file into the content field. 

  • Make any changes you wish to. There is an icon at the top right to expand the editing area for your convenience. Click the icon in the top right to exit the expanded view.

  • Once you are done editing, use the “Validate” button to highlight any issues.

  • When satisfied, Click “Finish”, then “Close”

  • You will now see you new rule in the list.

  • Go into components

  • Search for the component by it’s name, or the rule name you would like to swap out

  • Select your component

  • Make sure “Use Custom Rule?” is checked

  • Select your rule in the drop-down field “Custom Rule Name”

  • Click the “Save” button

  • Restart any engines that monitor SWSE

Execute a Command Inside a Rule

You can also execute nested commands from within a rule and handle the output within the same rule file as illustrated below.

Key things to note in this example:

  1. The command name in this example is “EC2 BurstBalance Instances“ (line 125)

  2. The command to be run is “aws” (line 126)

  3. Several command arguments are passed using cmd.arguments.add() (line 127 to 136)

  4. The output pattern regex is optional but can be passed to cmd.pattarn (line 137)

  5. The command that will be executed in this example is “aws cloudwatch list-metric --namespace AWS/EC2 --metric-name "EBSIOBalance%" --query Metrics[*].Dimensions[0].Value --output text“

  6. The command is executed by the method exec.executeCommand() (line 140)

  7. The rule to match and handle the command being executed must be created in this same rule file and given the same name as the command name (“EC2 BurstBalance Instances“ in this example) (line 144)

Component: Engine

Feature Availability: 8.6.0 or later

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.