Subscribing to monitoring events

# Copy the following message to the client to complete the subscription:

<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="100" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<create-subscription xmlns ='urn:ietf:params:xml:ns:netconf:notification:1.0'>
  <stream>NETCONF_MONITOR_EXTENSION</stream>
  <filter>
    <NetconfMonitor xmlns='http://www.hp.com/netconf/monitor:1.0'>
      <XPath>XPath</XPath>
      <Interval>interval</Interval>
      <ColumnConditions>
        <ColumnCondition>
          <ColumnName>ColumnName</ColumnName>
          <ColumnValue>ColumnValue</ColumnValue>
          <ColumnCondition>ColumnCondition</ColumnCondition> 
        </ColumnCondition>
      </ColumnConditions>
      <MustIncludeResultColumns>
        <ColumnName>columnName</ColumnName>
      </MustIncludeResultColumns>
    </NetconfMonitor>
  </filter>
<startTime>start-time</startTime>
<stopTime>stop-time</stopTime>
</create-subscription>
</rpc>

The <stream> parameter represents the event stream. The name for the monitoring event stream is NETCONF_MONITOR_EXTENSION.

NetconfMonitor represents the filtering information for the monitoring event.

The <XPath> parameter represents the path of a monitoring event in the format of ModuleName[/SubmoduleName]/TableName.

The <interval> parameter represents the interval for the device to obtain information that matches the subscription condition. The value range is 1 to 4294967 seconds. The default value is 300 seconds.

The <ColumnName> parameter represents the name of the monitoring column in the format of [GroupName.]ColumnName.

The <ColumnValue> parameter represents the baseline value.

The <ColumnCondition> parameter represents the filter condition. Table 11 displays the options. Choose the filter condition according to the type of the baseline value.

Table 11: Filter condition options

Operation

Remarks

more

More than the specified filter value.

less

Less than the specified baseline value.

notLess

Not less than the specified baseline value.

notMore

Not more than the specified baseline value.

equal

Equal to the specified baseline value.

notEqual

Not equal to the specified baseline value.

include

Including the specified baseline value.

exclude

Excluding the specified baseline value.

startWith

Starting with the specified baseline value.

endWith

Ending with the specified baseline value.

The <start-time> parameter represents the start time of the subscription.

The <stop-time> parameter represents the end time of the subscription.

After receiving the subscription request from the client, the device returns a response in the following format if the subscription is successful:

<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="100" xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0">
    <ok/>
</rpc-reply>