Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Install an Event Profile on a Device

 

An event profile is a set of event scripts that are selected from an AI-Script bundle. When you install an event profile on Juniper Networks devices, the event scripts are installed on the devices and provide the information needed to automatically detect and report problem (incident) and information events, thus ensuring maximum network uptime. Service Now uses Device Management Interface (DMI) to install and uninstall AI-Scripts on devices. DMI is an extension to the NETCONF network management protocol.

Use this API to install an event profile on a device.

Note

For information about behavior of AI-Scripts when installed on specific product families, see https://kb.juniper.net/InfoCenter/index?page=content&id=KB29188

Best Practice

For an SRX chassis cluster, you should not install and activate AI-Scripts on the nodes through Service Now at the same time. This is because configuration of SRX chassis cluster nodes is synchronized with each other and installing AI-Scripts on the nodes at the same time would lead to contention.

URI

https://[host] /api/juniper/servicenow/device-management/devices/ {id} /installEventProfile?queue=http://[host]/api/hornet-q/queues/jms.queue.[QueueName] (HTTP method = POST)

URI Parameters

Parameter

Type

Required

Description

id

Integer

Yes

ID of the device on which the event profile must be installed

QueueName

String

Yes

Name of the install event profile job queue

Consumes

  • application/vnd.juniper.servicenow.device-management.installeventprofile+xml;version=2; charset=UTF-8

  • application/vnd.juniper.servicenow.device-management.installeventprofile+json;version=2; charset=UTF-8

Request Elements

Element

Type

Description

eventprofile

eventprofile

Event profile to be installed

href

String

Link to the event profile

neverStoreScriptBundle

Boolean

Flag to store the script bundle on the device

  • true—A copy of the script bundle is not stored on the device

  • false—A copy of the script bundle is stored on the device

removeScriptBundle

Boolean

Flag to remove script bundle from the device after the event profile is installed

  • true—Script bundle is removed from the device after the event profile is installed

  • false—Script bundle is retained on the device after the event profile is installed

alterDeviceConfig

Boolean

Flag to modify the device configuration while committing the event profile on the device

  • true—Device configuration is modified while committing the event profile

  • false—Device configuration is not modified while committing the event profile

Note: This element is applicable only while installing AI-Scripts 5.0 and later on a device for the first time.

commitComment

String

Comment provided while installing an event profile on a device

Maximum number characters allowed is 255.

Produces

  • application/vnd.juniper.servicenow.device-management.device+xml;version=2

  • application/vnd.juniper.servicenow.device-management.device+json;version=2

Response Elements

Element

Type

Description

task

task

Install event profile job

href

String

Link to the install event profile job

id

Integer

Device unique identifier

Sample Input

Example XML Input

Example JSON Input

Sample Output

Example XML Output

Example JSON Output

Response Status Code

Message

Description

404 Not Found

Invalid address group ID.

SN-1007

Address type is not valid.

SN-1000

Invalid devices.