Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

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

    Related Documentation

     

    Contents of an AI-Scripts Package

    The AI-Scripts package contains files with .sh and .slax extensions. The collection of these scripts forms the major content of an AI-Scripts package. Service Now uses standard Junos OS commands to determine the version of Junos OS installed on a device (that is, whether the Junos OS version is earlier than Junos OS Release 15.1 or Junos OS Release 15.1 and later) and installs the AI-Scripts package accordingly.

    The scripts in the AI-Scripts package perform the following functions:

    • Management: The scripts performing the management function execute for specific activities (often user requested) to control the general setup and behavior of AI-Scripts. These scripts are not executed as part of the JMB collection processes.

      The scripts in an AI-Scripts package manage the following:

      • Event Policy—For AI-Scripts to monitor a device, at least one event policy must be activated. The scripts for managing an event policy are used to set up the initial event policy for the device. The initial event policy has all events pertinent to the device type active when AI-Scripts is installed on the device. These scripts do not execute again unless a new event profile is created, or the Restricted Account Mode feature is enabled on the device.
      • AI-Scripts Configuration—The scripts to manage AI-Scripts configuration are invoked by Service Now to make changes to the AI-Scripts settings. For example, if you do not wish to collect request support information (RSI) data for each event JMB and select the option to not collect RSI in Service Now, the scripts for managing the AI-Scripts configuration is used to apply the changes to not collect RSI on the device. These settings in the AI-Scripts environment are not part of the Junos OS configuration.
      • Cleanup and Dampening—Among the checks AI-Scripts makes to avoid filling the local file system, the scripts to manage cleanup remove any file that is not ransferred to Service Now and deleted after three days. These scripts are executed hourly to look for any JMBs that are older than three days. The value of three days can be modified in the files for managing AI-Scripts configuration.

        The scripts to manage dampening reduces the chance of collecting duplicate, or near duplicated, information for events occurring at nearly the same time. If the same event occurs twice within the same dampening interval, it is unlikely to contain new information, and the full data collection process is skipped. The dampening interval has a default value of one hour. The default value can be changed in the scripts for managing AI-Scripts configuration.

      • Uninstallation—The uninstallation scripts are used only to uninstall AI-Scripts. The uninstallation process does not remove every file from the AI-Scripts installation as some files are referenced by the Junos OS configuration. Because AI-Scripts does not alter configuration, and because removing these referenced files would cause configuration commit errors, AI-Scripts replaces the referenced files with empty content.
      • Others—Some scripts such as ais_reboot_dampen.sh and ais_srxc_patch.slax perform very specific purposes.

        The ais_reboot_dampen.sh script executes after a routing engine reboots to restart the background processes needed to handle JMB creation. The ais_srxc_patch.slax script executes only during an SRX cluster installation as SRX clusters impose stricter limits on file system operations between Routing Engines in a cluster.

      For the list of scripts that perform management tasks, see Management Files.

    • Event Types: All AI-Scripts events fall into one of the following categories:
      • eJMB, triggered by a structured Junos OS log message
      • eJMB, triggered by an unstructured Junos OS log message
      • On-demand JMB, triggered by the user through Service Now
      • Product Health Data Check, triggered only if PHDC is enabled on a device through Service Now
      • BIOS Validation data collection, triggered only if BIOS Validation is enabled on a device through Service Now
      • User-defined events for structured logs
      • User-defined events for unstructured logs, and
      • On-demand JMB creation by a restricted user (reserved for future use)

      While there are numerous specific event profiles, they are managed in small set of categories, each with a unique collection script. Testing JMB collection from each of these categories fully tests the infrastructure of AI-Scripts for a device, but does not guarantee that all data collection commands are executed.

      For the list of event type files, see Event Type Files

    • Event Generation: AI-Scripts versions 5.0R1 and later process all event policies through a common set of files. Even if hundreds of event policies are active on a device, all are processed by a small number of files handling the common infrastructure, and code specific to a device family. The event generation scripts perform the following functions:
      • Event Initiation—After event profiles are registered with Junos OS, a single script, ais_shell.sh, is left in the waiting state until it is notified by eventd to begin processing an event. Because core file copying requires additional work, there are separate event handlers for events with and without associated core files.
      • Event Data Collection Management—These are the primary tools for conducting and coordinating the activities of JMB collection. They are executed for every JMB type.
      • Event Data Collection—The exact data collected is a combination of general information (for example, Junos OS version and host name) and device-specific information. Many scripts in this category are specific to a device family, and execute only on the appropriate device type.
      • Core File Management—Core file permissions under Junos OS are more restricted than the other data files AI-Scripts generates. The scripts in this category are invoked only if core file management is necessary.
      • Event Completion and Cleanup—At the completion of every event type, the scripts in this category ensure Service Now is notified that the event is complete, local cleanup is performed, and errors, if any, are recorded in system logs and in the JMB’s status messages file.
      • Utility Functions—All JMB creation leverages a set of utility functions to perform common operations. The scripts in this category are used during eJMB creation.

      For the complete list of AI-Scripts used for event generation, see Event Generation Scripts.

    • Event Policy: In AI-Scripts version 5.0R1 and later, the files in this section do not contain any executable script code. The .slax extension is a legacy from earlier versions. The files classified under this section contain static structures defining particular event policies, such as the log signature, threshold conditions, and the list of event attributes to be passed to the associated event script. All these structured information is read by the executable scripts listed under the Event Generation section. The list of commands, contained within an event database file provided by Service Now is executed by the same infrastructure files listed under Event Generation. However, the exact list of Junos OS commands used to collect data in each policy may be different.

      For the complete list of event policies, see Event Policies.

    • iJMB Generation: The weekly iJMB generation is a separate process from other event types. Most of the scripts classified under this section define the data collection set for a particular device family.

      Executing a single iJMB generation is sufficient to test these scripts for a particular platform family. For the complete list of scripts used for generating iJMBs, see iJMB Generation Files.

    • Others: The remainder of files in an AI-Scripts package are used under conditions that are rarely or never encountered in deployment. Some of them are legacy files and no longer used. Files in the other category perform the following functions:
      • Troubleshooting—Automatically generates health report when AI-Scripts detects a problem during its execution.
      • Internal use—Files used only for development within Juniper Networks.
      • Unused—Some files in this category are now obsolete in new AI-Scripts releases, but have not been removed from the package. There are also event policies deemed not suitable for general use, but have not been removed from the package. For the complete list of other scripts, see Other Files.
     

    Related Documentation

     

    Modified: 2017-02-01