Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Advanced Insight Scripts (AI-Scripts) Frequently Asked Questions

    This document provides answers to frequently asked questions about the AI-Scripts, JUNOS event scripts used to enable automatic detection and packaging of reactive events and proactive intelligence information on Juniper Networks routing platforms to ensure maximum uptime.

    AI-Scripts are a basic component of the Service Automation Solution, a Juniper Networks J-Care Technical Services product that provides several levels of technical support for devices on the network. AI-Scripts send reactive events and proactive intelligence information (eJMBs and iJMBs) to archive locations from which Service Now, a gateway application, detects them and provides a user interface to monitor them to open cases for resolution and to receive key knowledge based information from Juniper Support Systems (JSS) engineers.

    Note: Please see the latest AI-Scripts Release Notes for a list of the supported platforms.

    AI-Scripts Overview

    What are AI-Scripts?

    AI-Scripts are specialized Juniper Networks operational and event scripts that detect events and provide information for analysis, to periodically collect intelligence information, and to package all incident and intelligence event data into a structured format called a Juniper Message Bundle (JMB) and send it to a remote archive location so that it can be collected and displayed by Service Now. AI-Scripts are written in XSLT and are bundled, signed, and packaged like other JUNOS software bundles. AI-Script bundles are downloaded from the Juniper Networks software download Web site, and are installed on Juniper Networks routing platforms (devices) running JUNOS Release 9.0 or later.

    Service Now can be configured to send event data to Juniper Support Systems (JSS), the third component in the AIS system. JSS collects incident and intelligence information from Service Now and sends intelligence information back to Service Now specifically for your network.

    What do AI-Scripts do?


    • React to specific incident events that occur on devices and provide relevant information about the problems for analysis
    • Periodically collect data on events that can be used to predict and prevent risks in the future.
    • Package all incident and intelligence event data into a structured format called a Juniper Message Bundle (JMB) and send it to a remote archive location so that it can be collected and displayed by the second component in the AIS system, Service Now gateway application.

    What is the AI-Scripts data flow?

    • AI-Scripts installed on Juniper Networks devices detect events or intelligence information.
    • AI-Scripts analyze event and intelligence information.
    • AI-Scripts package and send a JMB to an archive location (either a local directory on the same system as Service Now or a directory mounted from another system onto the system running Service Now).
    • Service Now connects to its archive location, retrieves, then displays the JMB information in Incident Manager for reactive services and Intelligence Manager for proactive services. For reactive services, Service Now submits a case for resolution by JSS. For proactive services, JSS analyzes intelligence information, then sends Service Now pertinent information to prevent problem events from occurring in the future.

    What is inside a JMB?

    • Manifest—basic router and event data
    • Trend data—device counters, statistics, and settings
    • Attachments—show command output for the incident event

    What are the two AI-Scripts operation modes?

    • Reactive (incident-driven)—A trigger event occurs and is detected on a device. An AI-Script is executed. An AI-Script builds a Juniper Message Bundle (JMB) with event and router data, and sends it to a designated archive location. Each AI-Script corresponds to a specific device event. The list of device events that can be detected and reported will evolve over time. For the latest device events supported by AI-Scripts, see Advanced Insight Scripts (AI-Scripts).
    • Proactive (intelligence-driven)—AI-Scripts monitor device system resources for fluctuations that could signal a future problem. AI-Scripts collect intelligence data for analysis. A tailored AI-Script builds a JMB with intelligence data, and sends it to a designated remote archive location.

    What events are detected by AI-Scripts in a release?

    • Common software events, including daemon and Packet Forwarding Engine crashes
    • Common hardware events, such as PIC alarms
    • Hardware platform-specific events, such ASIC issues
    • Errors resulting from resource congestion

    For a complete list of the AI-Scripts added and the events detected, supported by AI-Scripts, see Advanced Insight Scripts (AI-Scripts).

    How often are AI-Scripts packages released?

    Juniper Networks release AI-Scripts twice a quarter.

    What metrics are collected by AI-Scripts for intelligence information sent to Service Now?

    • System buffers (show system buffers)
    • System processes (show system processes extensive)
    • Memory-related metrics (show heap, show jtree 0 memory, show task memory)

    For a complete list, consult Juniper Support Systems at http:/juniper/support/.

    What scripts are included in an AI-Scripts release?

    For a complete list of the AI-Scripts added and the events detected, see the latest AI-Scripts Release Notes located at Advanced Insight Scripts (AI-Scripts).

    How do AI-Scripts detect events in JUNOS?

    AI-Scripts event scripts are activated and stored in a table in the eventd process. The eventd process monitors all of the log messages generated by all system processes. When eventd detects an event script event trigger, it executes the associated event script.

    Can AI-Scripts detect potential hardware failures (for example, Routing Engine or hard disk)?

    Yes, but it also depends on the failure. If the failure is one of the problems that the AI-Scripts supports for that release, then it will be captured.

    Can you see the information that is contained in the eJMB and iJMB?

    Yes. You can view eJMBs in Service Now Incident Manager and iJMBs in Service Now Intelligence Manager. For more information about Service Now Incident and Intelligence Managers, see Advanced Insight Scripts (AI-Scripts).

    Is it possible to review the historical data (JMBs and iJMBs) sent to Juniper Networks by Service Now?

    Yes. View the historical data can be viewed in Service Now Incident Manager and Intelligence Manager. For more information about AIM Incident Manager and Intelligence Manager, see Advanced Insight Scripts (AI-Scripts).

    Can AI-Scripts detect network-level incidents such as protocol flaps, routing loops, or traffic blackholes?

    It depends on the event. If there are trigger-points, indicators such as log messages, it can but if traffic is lost silently, it cannot.

    Can AI-Scripts detect interface-level problems such as packets drops?

    No, AI-Scripts cannot detect interface problems, and it cannot be triggered off such activities, but AI-Scripts can collect such values and make decisions based on such activities.

    Can you selectively disable some AI-Scripts, to avoid receiving incidents detected by those scripts?

    No. AI-Scripts are designed to capture serious problems that can severely impact the normal operation of network devices. AI-Scripts are available as a single package and cannot be selectively enabled or disabled.

    How does Juniper Networks determine which incidents will be included in future AI-Scripts releases?

    New AI-Scripts are developed based on input from customers, partners, and the Juniper Networks Support and Engineering teams.

    Is there any other way for AIS to collect information from devices besides AI-Scripts?

    Yes. Starting in AIS 1.2, AIS can monitor devices that do not run AI-Script files. These devices are JUNOS versions between 8.0 and 9.0, JUNOSe devices, and ScreenOS devices. A new Service Now module, which is called JDC (Juniper Data Collector), collects information from these devices. JDC uses specific instructions called "directives" to collect data from target devices and to form iJMBs that are sent into the host application Service Now. This method ensures that JDC can support new data elements or platforms with addition of new directives.

    Juniper Message Bundles (JMBs)

    What is a Juniper Message Bundle (JMB)?

    A JMB is an XML-based information envelope that consists of two sections; manifest and payload. The manifest is the header of the JMB that carries information such as Problem Description, Synopsis, Priority, Severity, and Device Name. Payload carries specific information such as logs, command outputs, and configuration file. Incident JMBs have different data elements in the payload depending on the problem type. Intelligence JMBs always have the same structure and data elements to ensure consistency and processing for proactive analysis. You can see JMB files by using View JMB feature with Service Now.

    What is an incident-based JMB (eJMB)?

    An incident-based JMB (eJMB) is the JMB file that is generated by AI-Scripts as a result of an event.

    What is an intelligence-based JMB (iJMB)?

    An intelligence-based JMB (iJMB) is the JMB file that is generated by AI-Scripts or by JDC Directives as a result of a timer that triggers proactive data collection.

    What types of events trigger eJMBs?

    • Serious, potentially service-impacting
    • Events that are difficult to detect or diagnose
    • Events that do not result from routine maintenance or related activities, such as reboots, restarts, configuration changes, interface changes, and hardware changes:
    • Software failures
    • Hardware failures
    • Resource exhaustion

    What communication protocols are used to transfer JMBs between JUNOS devices and Service Now?

    JMBs can be transferred between elements and Service Now using SCP, FTPS or FTP. We recommend the encrypted protocols.

    How frequently do devices report iJMBs to Service Now?

    In AIS 1.1 release and later, intelligence iJMBs are collected and reported every 7 days. That frequency is considered to be sufficient to collect the inertial trend data for further analysis by Juniper Support Services.

    Is it possible to configure the frequency of the data collection for the iJMB?

    Although it is technically possible to modify the AI-Scripts and change the frequency of the periodic data collection, we do not recommend that you make any change to the AI-Scripts provided by Juniper Networks. Frequency has a direct effect on volume of collected and processed data, especially on JSS.

    What information is collected by the intelligence AI-Scripts into the intelligence iJMB?

    • Hardware inventory
    • Operating system version details
    • Device configuration file (if specified by the user)
    • Trend values

    How big is a JMB?

    The size of a JMB depends mainly on the large attachment files it carries, such as logs and/or a device configuration file.

    How big is an iJMB?

    The iJMB carries no logs. Its size is determined mostly by the device configuration file.


    How do AI-Scripts affect JUNOS system resource utilization?

    The impact of AI-Scripts on JUNOS system resources is almost none. Event-based scripts are executed only if a particular event is observed and the executed script is specific to the event. Scripts do not scan for logs or engage in other lengthy tasks. They execute specific commands and complete execution in a minute or so. Proactive scripts operate very similarly based on a timer rather than the specific event.

    Installing AI-Scripts

    What are the AI-Scripts installation system requirements?

    Please see the latest AI-Scripts Release Notes for a list of the supported platforms.

    Ensure that all devices on which you install AI-Scripts are running JUNOS Release 9.0 or later.

    What versions of JUNOS does an AI-Script installation package support?

    Each AI-Script install package supports at least 3 previous years of JUNOS software releases.

    When do you install AI-Scripts in the AIS setup?

    It does not matter whether AI-Scripts or Service Now is installed first. However, for both, it is necessary to know the archive location (archive-site destination) used for devices to send incident and intelligence JMBs and for Service Now to retrieve this data. You can add the archive location to the device JUNOS configuration for both AI-Scripts and Service Now after the initial installation, but the components are not usable until the archive location is configured.

    How can you install AI-Scripts?

    There are two ways to install AI-Scripts:

    • Automatically (recommended), using the JUNOScope Script Management feature to automatically install AI-Scripts to multiple devices at once.
    • Manually by installing and configuring AI-Scripts to run on one device at time.

    How are AI-Scripts versioned?

    AI-Script install packages are versioned as follows:


    For example: jais-1.0R1.5-signed.tgz

    m.n is two integers that represent the software release number; m denotes the major release number; n the minor.

    Z is a capital letter that indicates the type of software release. In most cases, it is an R, to indicate that this is released software. If you are involved in testing prereleased software, this letter might be a B (for beta-level software).

    x.x is the software build number and spin number.

    From where do you download AI-Script installation packages?

    Using a Web browser, go to the following location:

    Log in to the Juniper Networks authentication system using the username and password supplied by Juniper Networks. To download the software, you must have a service contract and an access account. If you do not have an access account, complete the registration form at the Juniper Networks Web site,

    Where do you move AI-Script installation packages on the device?

    Download the AI-Scripts install package.

    If you are installing an AI-Scripts install package manually, move the package to the /var/sw/pkg directory on the device. If you do not move the AI-Scripts install package to the device, you have to use FTP or SCP in conjunction with the request system scripts add command.

    If you will use the JUNOScope software to automatically install a package to a group of devices at once, download the AI-Scripts install package to the same server as Service Now.

    Where are AI-Scripts installed on a device?

    AI-Scripts are installed on a device hard disk in the following location: /var/db/scripts/

    AI-Scripts are installed on a device flash drive in the following location: /config/scripts

    Note: If you configure the load-scripts-from-flash option, the system reads event-scripts from the /config/scripts/ directory. Otherwise the system reads AI-Scripts from the /var/db/scripts/ directory. The /var/run/scripts directory will always point to the right scripts directory.

    Automatic AI-Scripts Installation Using JUNOScope 9.0 or Later Software and Service Now

    How do you install AI-Scripts automatically using JUNOScope software?

    For the latest AI-Scripts installation information, see Advanced Insight Scripts (AI-Scripts).

    Does Service Now need JUNOScope?

    No, Service Now does not need JUNOScope. However, you can optionally install AI-Scripts on JUNOS 9.0 or later devices that are managed by JUNOScope, then import these devices into AIM using JUNOScope Settings.

    Manual AI-Scripts Installation

    AI-Scripts can be installed on Junos OS devices manually using CLI mode. For manual installation of AI-Scripts on devices, you require the same login credentials that you use to discover devices in Junos Space.

    To install AI-Scripts manually:

    1. Copy the AI-Scripts install package (example: jais-2.1R2.0-signed.tgz) to the Junos OS device using SCP or FTP.
    2. From configuration mode, execute the following commands:
      set groups juniper-ais system scripts commit allow-transients
      set groups juniper-ais system scripts commit file jais-activate-scripts.slax optional
      set groups juniper-ais event-options destinations juniper-aim archive-sites /var/tmp/
    3. Install the AI-Scripts bundle install package in CLI mode using the command
      request system scripts add <full-path>/jais-2.1R2.0-signed.tgz.

      The AI-Scripts install package is installed on the device.

    Note: When you install AI-Scripts in the Juniper Networks QFX3000 device, ensure that you install the events scripts only on the controller. The controller installs AI-Scripts on the node devices and enables all the events.

    On a router with dual Routing Engines, should AI-Scripts be installed on both Routing Engines?

    Yes, install the AI-Scripts on each Routing Engine.

    How do you verify that AI-Scripts are activated?

    Use the show configuration groups juniper-ais|display commit-scripts command:

    user@host# show configuration groups juniper-ais | display commit-scripts
    system {
    scripts {
    commit {
    file jais-activate-scripts.slax {
    event-options {
    event-script {
    file problem-event-pfecrash.slax;
    file problem-event-dcrash.slax;
    file intelligence-event-main.slax;
    file RPD_TASK_FORK.slax;
    . . . }
    destinations {
    juniper-junoscope {
    archive-sites {

    The event-options/event-script section should have a long list of *.slax files if the AI-Scripts are activated correctly.

    After installing AI-Scripts, how do you test the JMB flow from the network device to AIM?

    Check the following:

    • The router log for the string transfer-file, for example:
      user@host> show log messages | match transfer
      Sep 20 00:50:13 ex-vc-1 root: transfer-file: Transferred
    • The archive-site directory to see whether the file was received. The archive-site directory is the directory configured in juniper-ais configuration group
      user@host> show configuration groups juniper-ais event-options destinations
      juniper-aim {
      archive-sites {

      or the directory configured in AIM setting under Organizations >> Device Group >> Local Location.

    • The AIM AIManagerJMB.log file to see whether AIM processed the file. AIM logs are located in the /opt/aim/data/logs/ subdirectory where you installed AIM.

    How soon after AI-Scripts installation is an intelligence iJMB generated?

    An iJMB is generated within 5 minutes after AI-Scripts installation.

    How can you tell what version of AI-Scripts is installed on a device?

    The show version CLI operational command displays the version of the AI-Script install package that is installed on a device.

    The JMB contains the output of the show version CLI command to indicate the version of the AI-Script install package installed on a device. You can view the JMB in AIM Incident Manager or Intelligence Manager.

    Upgrading AI-Scripts

    How do I ensure that my AI-Script bundles are updated?

    Check which version of AI-Scripts is running on the device by using the following command. Then compare that release with the latest release posted on the AIS software download site:

    user@host> show version
    Hostname: host-re0
    Model: mx480
    JUNOS Base OS boot [9.3-20081005.0]
    JUNOS Base OS Software Suite [9.3-20081005.0]
    JUNOS Kernel Software Suite [9.3-20081005.0]
    JUNOS Crypto Software Suite [9.3-20081005.0]
    JUNOS Packet Forwarding Engine Support (M/T Common) [9.3-20081005.0]
    JUNOS Packet Forwarding Engine Support (MX Common) [9.3-20081005.0]
    JUNOS Online Documentation [9.3-20081005.0]
    JUNOS Routing Software Suite [9.3-20081005.0]
    JUNOS AIS Script Suite [1.2R1.0]

    How do you upgrade AI-Scripts?

    1. Install the newer version of the AI-Scripts using the request system add < package name > CLI command.
    2. Verify that the AI-Scripts are activated:
      user@host# show configuration groups juniper-ais | display commit-scripts

    Does AI-Scripts or AIM have to be upgraded when you upgrade JUNOS?

    Generally, AIS releases will be backward and forward compatible with JUNOS. If you upgrade JUNOS it will not break AIS unless otherwise noted in the release notes. Best practice, however, is to upgrade AIM along with JUNOS. AIS is not on the same release schedule as JUNOS- in fact this illustrates that AIM and JUNOS releases are not interdependent.

    Note: If you upgrade JUNOS using the jinstallpackage, you must reinstall the AI-Scripts package.

    Do you have to upgrade JUNOS software whenever AI-Scripts is upgraded?

    No, unless stated otherwise in the AI-Scripts Release Notes located at see Advanced Insight Scripts (AI-Scripts).

    Do you have to upgrade AIM software whenever AI-Scripts is upgraded?

    No, unless stated otherwise in the AI-Scripts Release Notes located at see Advanced Insight Scripts (AI-Scripts).

    AI-Scripts Commands

    How do you install an AI-Script on a device?

    The request system scripts add < package-name > CLI command installs AI-Script (jais) packages on Juniper Networks devices.

    You can use the following optional keywords:

    • no-copy—Don't save a copy of the jais package file
    • unlink—Remove the package after successful installation

    How do you delete an AI-Script from a device?

    user@host> request system scripts delete

    How do you roll back an AI-Script on a device?

    After the deletion of an AI-Script jais package, you can roll back to the last installed jais package by using the following command:

    user@host> request system scripts rollback

    Note: If you use the no-copy option during the jais installation, the jais package cannot be rolled back.

    How do you not save a copy of AI-Scripts package files during installation?

    To prevent the installer from saving copies of AI-Script jais package files during installation, use the following command:

    user@host> request system scripts add no-copy < package-name >

    Note: If you use the no-copy option during the jais installation, the jais package cannot be rolled back.

    How do you remove an AI-Script installation package after installation?

    user@host> request system scripts add unlink < package-name >

    Published: 2013-08-29