Example For Subscribing To Event Notifications - HPE FlexNetwork 5510 HI Series Network Management And Monitoring Configuration Manual

Hide thumbs Also See for FlexNetwork 5510 HI Series:
Table of Contents

Advertisement

For more information about error messages, see RFC 4741.

Example for subscribing to event notifications

Network requirements
Configure a client to subscribe to all events with no time limitation. After the subscription is
successful, all events on the device are sent to the client before the session between the device and
client is terminated.
Configuration procedure
# Enter XML view.
<Sysname> xml
# Exchange capabilities.
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>
</capability>
</capabilities>
</hello>
# Subscribe to all events with no time limitation.
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<create-subscription xmlns ="urn:ietf:params:xml:ns:netconf:notification:1.0">
<stream>NETCONF</stream>
</create-subscription>
</rpc>
Verifying the configuration
# If the client receives the following response, the subscription is successful:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<ok/>
</rpc-reply>
# If fan 1 on the device encounters problems, the device sends the following text to the client that has
subscribed to all events:
<?xml version="1.0" encoding="UTF-8"?>
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2011-01-04T12:30:46</eventTime>
<event xmlns="http://www.hp.com/netconf/event:1.0">
<Group>DEV</Group>
<Code>FAN_DIRECTION_NOT_PREFERRED</Code>
<Slot>6</Slot>
<Severity>Alert</Severity>
<context>Fan 1 airflow direction is not preferred on slot 6, please check
it.</context>
</event>
</notification>
urn:ietf:params:netconf:base:1.0
251

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents