Configuration Guide Vol. 1


21.1.2 Examples of Advanced Script Applications

<Structure of this section>

(1) Error detection

The following figure shows an example of using a script to notify the operator and automatically collect analysis information when an error (warning) is detected. In this diagram, operation messages are monitored, and operation messages of the level E7 are detected, and then mail sending and operation commands are executed from the scripts.

Figure 21-2: Sending mail and executing operation commands by monitoring operation messages

[Figure Data]

  1. Registers an operation message monitoring event and waits for the event to occur.

  2. Notifies you of an event when you detect an operation message for a level-level E7.

  3. Receive events.

  4. When an event is received, the scripting sends an email to the operator using Python standard library.

  5. Execute related operation commands to collect analysis information when an event occurs.

(2) Periodic command execution

The following figure shows an example of using a script to periodically execute a command. In this figure, timer monitoring is performed, configuration commands and operation commands are executed, and then operation messages are output.

Figure 21-3: Execution of commands and output of operation messages by timer monitoring

[Figure Data]

Register the timer monitoring event that occurs at 5:00 a.m. and the script file that is started when the event occurs in the configuration in advance.

  1. At 5:00 a.m., an event occurs and the script starts.

  2. Execute the configuration command.

  3. Executes an operation command that can be used to check the result of importing the configuration.

  4. 3. Check the health of the operation command by analyzing the output results of the operation command as a character string.

  5. Outputs an operation message that contains the result of reflecting the configuration and notifies the operator.