Configuration Guide SEM Configuration
# Configure a policy named "policy_a" and configure two events. The first event will
detect whether the log contains the content of "need reload", and the other event will
detect whether any card is inserted. The interval between both events must be less than
180 seconds.
Ruijie# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Ruijie(config)# smart manager applet policy_a
Ruijie(SEM-applet)# event tag event_a syslog pattern "need reload"
Ruijie(SEM-applet)# event tag event_b correlate and oir type plugin
Ruijie(SEM-applet)# trigger correlate-period 180
When configuring multiple events, SEM will automatically sequence events
according to the alphabetical order of "tag". It is suggested to use an orderly
naming rule, such as: 01_cli, 02_timer, 03_counter ...
Relation between events: combination of current event with all preceding
events. SEM will only check whether the policy shall be triggered after the
first event is triggered.
All events other than the first event shall be configured with parallel relation
("and" by default). The parallel relation configured for the first event will be
neglected.
Configure and use variables
Enter privileged EXEC mode
Ruijie# configure terminal
Enter global configuration mode
Ruijie# smart manager environment
variable-name string
Configure SEM global variable
Ruijie(config)# smart manager applet
applet-name [class class-options]
Enter SEM configuration mode.
applet-name is the specified policy name.
class parameter specifies the policy class.
Ruijie(SEM-applet)# action label set
variable-name variable-value
Configure SEM local variable
Ruijie(SEM-applet)# action label syslog
[priority priority-level] msg msg-text
[facility string]
Use SEM variable (Variables can be used in
multiple actions. Here we take Syslog as the
example. Please refer to "SEM Command
Reference" for details.)
Configuration example:
# Configure SEM global variable of "var_g"; configure a policy named "policy_a";
configure action "set" and set the SEM local variable of "var_1"; further configure action
"Syslog" and use "var_g" and "var_l" in the action.