This command adds a new rule for sending email notifications.
Table 12–2 Arguments and Result for the rule.add Command
Argument/Result |
Syntax |
Description |
|
---|---|---|---|
n |
[R] |
String |
The rule name |
d |
[O] |
String |
The rule description |
tf |
[O] |
CriteriaShorthand |
The rule event type filter |
mf |
[O] |
String |
The rule message filter |
haf |
[O] |
HostIDArray |
The rule hosts filter |
hsf |
[O] |
HostSetID |
The rule host set filter |
sf |
[O] |
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 |
[R] |
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 12–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 |