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.
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
Go to Germain Workspace > Left Menu > Wizards > Rule
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:
The command name in this example is “EC2 BurstBalance Instances“ (line 125)
The command to be run is “aws” (line 126)
Several command arguments are passed using cmd.arguments.add() (line 127 to 136)
The output pattern regex is optional but can be passed to cmd.pattarn (line 137)
The command that will be executed in this example is “aws cloudwatch list-metric --namespace AWS/EC2 --metric-name "EBSIOBalance%" --query Metrics[*].Dimensions.Value --output text“
The command is executed by the method exec.executeCommand() (line 140)
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)
Feature Availability: 8.6.0 or later