N1 Service Provisioning System 4.1 Reference Guide

rule.add

This command adds a new rule for sending email notifications.

Table 14–2 Arguments and Result for the rule.add Command

Argument/Result 

Syntax 

Description 

[R] 

String 

The rule name 

[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 

ea 

[R] 

String 

The email address to notify 

result 

RuleMetaData 

The new rule 

Table 14–3 lists the keywords you can pass with the -tf argument to specify the type of event a rule applies to.

Table 14–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