There are two ways to install AI-Scripts:
AI-Scripts run on Juniper Networks J-series, M-series, MX-series, T-series, EX-series, and SRX devices. Ensure that all devices on which you install AI-Scripts are running JUNOS Release 9.0 or later. For the latest AI-Scripts information, see the Advanced Insight Scripts (AI-Scripts) Release Notes.
AI-Scripts are released in AI-Scripts install packages. AI-Scripts install packages are available for download from the AIS download site. Download also the AI-Scripts Release Notes.
To download an AI-Scripts install package, follow these steps:
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 Advanced Insight Manager (AIM).
AI-Script install packages are versioned as follows:
For example:
The AI-Script files that in the install package are compressed into a tgz tarball file.
Each AI-Script install package supports up to 3 previous years of JUNOS software releases.
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.
Refer to the AI-Script Release Notes for current release information.
AI-Scripts are installed on a device hard disk in the following location:
AI-Scripts are installed on a device flash drive in the following location:
![]() |
Note: If you configure the load-scripts-from-flash option, the system reads event-scripts from /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. |
You can optionally use AIM to install AI-Script bundles (also known as AI-Script install packages) on devices as long as there is a JUNOScope software installation. AIM communicates with JUNOScope to install AI-Script bundles on JUNOS devices managed by JUNOScope. See Figure 11.
Figure 11: Automatic Installation of AI-Script Install Packages Using JUNOScope

To configure auto installation of AI-Script bundles to devices, follow these steps:
If you do not want to use AIM to install AI-Script bundles, you can manually configure and install AI-Script bundles to each device separately. To install AI-Script bundles manually, see Manually Configuring and Installing AI-Scripts on Devices.
Within AIM, devices that are configured for AIS manually will automatically be added to the device group that is associated with the AIM archive location to which the JMB was sent. When the AIM detects a JMB for a device that is not managed by JUNOScope Script Management, it will note it.
Figure 12 shows the basic steps you must perform to manually configure and install AI-Scripts to devices.
Figure 12: Basic Steps to Manually Configure and Install AI-Scripts on Devices

To manually configure and install AI-Scripts on Devices, follow these steps:
This configuration determines the AIS archive location where JMBs are deposited for a device.
The AI-Script installer creates this script to activate AI-Scripts on the device.
Transient changes are configuration changes made by commit scripts that do NOT appear in the committed configuration (except with a special command).
This configuration applies the configuration group juniper-ais.
![]() |
Note: If you configure the load-scripts-from-flashoption, the system reads AI-Scripts from /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. |
groups {
juniper-ais {
system {
scripts {
commit {
allow-transients;
file jais-activate-scripts.slax {
optional;
}
}
load-scripts-from-flash;
}
}
event-options {
destinations {
juniper-junoscope {
archive-sites {
"ftp://anonymous@10.7.0.124/aimdemo";
}
. . .
system {
scripts {
commit {
allow-transients;
file jais-activate-scripts.slax {
optional;
}
}
}
}
event-options {
event-script {
file problem-event-pfecrash.slax;
file problem-event-dcrash.slax;
file intelligence-event-main.slax;
file SPD_EVLIB_CREATE_FAILURE.slax;
file SPD_DAEMONIZE_FAILED.slax;
file RPD_TASK_FORK.slax;
. . . }
destinations {
juniper-junoscope {
archive-sites {
"ftp://anonymous@10.7.0.124/aimdemo";
}
}
}
}
This section describes the basic commands you perform to install, delete, or roll back AI-Scripts.
To install an AI-Script package to a router, use the following command:
To delete an AI-Script from a router, use the following command:
After the deletion of an AI-Script jais package, you can roll back to the last installed jais package by using the following command:
To prevent the installer from saving copies of AI-Script jais package files during installation, use the following command:
![]() |
Note: If you use the no-copy option during the jais installation, the jaispackage cannot be rolled back. |
You can specify the no-copy option in AIM Device Group settings by selecting the no-copy check box.
To remove the AI-Script jais bundle after successful installation, use the following command:
You can specify the unlink option in AIM Device Group settings by selecting the unlink check box.