< Home

Querying the Alarms That Are Not Cleared on the Switch

This section provides a sample of querying the alarms that are not cleared on the switch using the rpc method.

Table 1 Querying the alarms that are not cleared on the switch
Operation XPATH
rpc
  • /huawei-system-alarm:fetch-alarm-records/input/device-identifier/id
  • /huawei-system-alarm:fetch-alarm-records/input/alarm-status

Data Requirements

Item Data Description
ESN of a switch 2102351MQJ12xxxxxxxx -
Alarm status not-cleared -

Request Example

<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <hw-sys-alarm:fetch-alarm-records xmlns:hw-sys-alarm="urn:huawei:params:xml:ns:yang:huawei-system-alarm">
    <hw-sys-alarm:device-identifier>
      <hw-sys-alarm:id>2102351MQJ12xxxxxxxx</hw-sys-alarm:id>
    </hw-sys-alarm:device-identifier>
    <hw-sys-alarm:alarm-status>not-cleared</hw-sys-alarm:alarm-status>
  </hw-sys-alarm:fetch-alarm-records>
</rpc>

Response Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <fetch-alarm-records xmlns="urn:huawei:params:xml:ns:yang:huawei-system-alarm">
    <device-identifier>
      <id>2102351MQJ12xxxxxxxx</id>
    </device-identifier>
    <need-refetch>
      <flag>false</flag>
    </need-refetch>
    <alarm-records>
      <alarm-type-id>equipmentAlarm</alarm-type-id>
      <alarm-type-qualifier>hwLldpLocManIPAddrChange</alarm-type-qualifier>
      <resource>OID=1.3.6.1.4.1.2011.5.25.134.2.5 index=0</resource>
      <alt-resource>1</alt-resource>
      <status-change>
        <event-time>2018-01-22T23:30:08Z</event-time>
        <perceived-severity>4</perceived-severity>
        <alarm-text>Local management address is changed. (LocManAddr=000b-09cf-bb88)</alarm-text>
      </status-change>
    </alarm-records>
  </fetch-alarm-records>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic