Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Monitoring AI-Scripts Behavior by Using the AI-Scripts Event Simulator

 

With the AI-Scripts event simulator, you can generate error messages to monitor AI-Scripts behavior.

When the event simulator generates and enters an error message in the system logs of the device, the AI-Script pertaining to the event that caused the error message is triggered to generate a JMB for the event.

The event simulator is packaged with an AI-Scripts bundle starting from AI-Scripts Release 3.2R1.

To use the AI-Scripts event simulator for monitoring AI-Scripts behavior:

  1. Log in to the device running Junos OS.
  2. Verify that AI-Scripts Release 3.2R1 or later is installed on the device.

    To verify that an AI-Scripts bundle is installed on the device, see Troubleshooting AI-Scripts Installation Issues.

    If not already installed, create an event profile by using AI-Scripts Release 3.2R1 or later and install the event profile on the device. To create and install an event profile, see Adding an Event Profile to Junos Space Service Now in the Service Automation User Guide.

  3. On the device running Junos OS, run shell.
  4. Navigate to the directory where the event simulator is located:

    cd /var/db/scripts/op/.

  5. Run the event simulator:

    sh AIS_event_sim.sh

    A menu of event types is displayed, as shown in the following sample:

  6. From the menu, select an event type and enter its number at the command prompt. For example, type 3 to generate error messages for a resource exhaustion failure event on the device.

    A menu listing the events for the selected event type appears. The following menu appears when you type 3.

  7. Select an event from the menu and type its number at the command prompt.

    The event simulator enters the error message in the system logs for the event that you select from this list.

  8. Type the highest number on the menu to exit the program. For example, 15 in this case.

    The CLI prompt appears.

  9. Execute the following command to monitor the execution of the cscript process to verify that a JMB is created for the event.

    show system processes extensive | match csc

  10. Log in to the Junos Space GUI and navigate to Service Now > Service Central > Incidents.

    An incident is generated in Service Now for the event that you generated using the event simulator. The incident is usually generated in Service Now within a few minutes after the event is generated on the device.