Руководство Пользователя для Cisco Cisco Security Manager 4.11
Cisco Security Manager 4.11 API Specification (Version 2.3)
Page 200
Figure 168: eventSubscription for ConfigChange XML Example
The above request will be sent by the client to register for events. The API only supports event notifications using
the syslog protocol (the format of the event data over syslog can be XML or syslog plainText which is described in
the table and subsequent sections).
the syslog protocol (the format of the event data over syslog can be XML or syslog plainText which is described in
the table and subsequent sections).
All event subscriptions are linked to the active logged in session. If the session (that initiated the subscription
request) is logged out or expires, then all subscriptions corresponding to the session are deleted. It is thus important
for the client to keep the session alive if it needs to receive event notifications.
request) is logged out or expires, then all subscriptions corresponding to the session are deleted. It is thus important
for the client to keep the session alive if it needs to receive event notifications.
The following events are supported:
1. Config Change Event
a. The event will be sent whenever a configuration change has been made and deployed on the
network device identified in the event (either via CSM or out-of-band).
2. Device Status Change Event:
a. This event will be sent whenever CSM detects a change in the device connectivity status, either
UP or DOWN.
Table 108: eventSubscription Request Elements and Attributes Descriptions
Element.
Attribute
Name
Definition
eventSubRequest
eventSubscription request allows the client to register a
events handler for one or more classes
events handler for one or more classes
eventSubRequest.op
The operation being performed which is one of the
enumerated list { add, delete }.
The add operation registers a new subscription for the event
handler.op
The delete operation deletes the subscription and the CSM
client will no longer receive any events for that subscription
ID.
enumerated list { add, delete }.
The add operation registers a new subscription for the event
handler.op
The delete operation deletes the subscription and the CSM
client will no longer receive any events for that subscription
ID.
URL:
https://hostname/nbi/eventservice/eventSubscription
XML Argument:
<?xml version=”1.0” encoding=”UTF-8”?>
<eventSubRequest>
https://hostname/nbi/eventservice/eventSubscription
XML Argument:
<?xml version=”1.0” encoding=”UTF-8”?>
<eventSubRequest>
<op>add</op>
<subscriptionId>123454</subscriptionId>
<subscriptionId>123454</subscriptionId>
<eventFilterItem>
<filterEventType>syslog</filterEventType>
<filterEventFormat>xml</filterEventFormat>
<filterEventCategory>configChange</filterEventCategory>
</eventFilterItem>
<syslogServer>
<port>514</port>
<destAddress>12.1.1.1</destAddress>
</syslogServer>
</eventSubRequest>