This command adds a new rule for sending email notifications.
Table 13–2 Arguments and Result for the rule.add Command|
Argument/Result |
Syntax |
Description |
|
|---|---|---|---|
|
n |
Required |
String |
The rule name |
|
d |
Optional |
String |
The rule description |
|
tf |
Optional |
CriteriaShorthand |
The rule event type filter |
|
mf |
Optional |
String |
The rule message filter |
|
haf |
Optional |
HostIDArray |
The rule hosts filter |
|
hsf |
Optional |
HostSetID |
The rule host set filter |
|
sf |
Optional |
String |
The rule severity filter. Possible values are INFO, WARNING, and ERROR. In addition, the severity may end with +, which means this severity or greater. For example, WARNING+ corresponds to events with severity WARNING or ERROR. |
|
ea |
Required |
String |
The email address to notify |
|
result |
RuleMetaData |
The new rule |
|
The following table lists the keywords you can pass with the -tf argument to specify the type of event a rule applies to.
Table 13–3 CriteriaShorthand for the -tf Argument|
Criteria Shorthand |
Event |
|---|---|
|
any |
Any event |
|
planStart |
A plan starts |
|
planEndAbnormal |
A plan ends abnormally |
|
planEndNormal |
A plan completes normally |
|
cmpStart |
A comparison starts |
|
cmpEndAbnormal |
A comparison ends abnormally |
|
cmpEndNormal |
A comparison completes normally |
|
system |
Any system event |
|
admin |
Any administrative event |
|
custom |
Any custom events |