Rules (Advanced Automated Analytics)
Feature
The most advanced way to custom-build your own automated analytics in GermainUX is by creating a rule. Once created, you can deploy it within one of GermainUX's components and let it run on your schedule—or 24/7.
Rules are powered by MVEL. For more details about MVEL, visit: http://mvel.documentnode.com.
Watch a video overview here: https://youtu.be/96S3S7G2f2o .
Configuration
This example demonstrates the steps for adding a rule to parse for errors in a web server log file used by a CRM application called Siebel. The same logic can be applied to any rule or application.
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:
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[0].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)
Component: Engine
Feature Availability: 8.6.0 or later