Alarms¶
NETCONF alarms can be configured on Virtual Service Router. Those alarms are triggered when an event occurs on the system, for instance when a configured service or interface goes down.
When an alarm is triggered or cleared, a NETCONF notification is sent, and the alarm status change is stored. Then, when the problem is resolved, the alarm will clear itself.
The alarms are enabled by default.
System alarms¶
Here is a configuration that will ensure that only the last four status changes are stored, and that all state changes are notified.
vsr running config# system alarm
vsr running alarm# max-alarm-status-changes 4
vsr running alarm# notify-status-changes all-state-changes
vsr running alarm# commit
Configuration committed.
To show the list of available alarms, use show alarm inventory
or show state
system alarm alarm-inventory
.
vsr running alarm# show alarm inventory
show-alarm-inventory
alarm-type vrouter-alarm:service-alarm fast-path
will-clear true
severity-level major
description "Monitor the fast-path service status. A service is monitored only if configured."
..
(...)
To show the list of alarms that have been triggered on the system, use show
alarm list
or show state system alarm alarm-list
.
dut-vm running alarm# show alarm list
show-alarm-list
number-of-alarms 1
last-changed 2022-10-05T13:40:40.746371+00:00
alarm /system/license/enabled vrouter-alarm:service-alarm license
time-created 2022-10-05T13:40:31.959338+00:00
is-cleared true
last-raised 2022-10-05T13:40:40.672655+00:00
last-changed 2022-10-05T13:40:40.746371+00:00
perceived-severity major
alarm-text "The license service is up as configured."
status-change 2022-10-05T13:40:40.746371+00:00
perceived-severity cleared
alarm-text "The license service is up as configured."
..
status-change 2022-10-05T13:40:40.672655+00:00
perceived-severity major
alarm-text "The license service is down when configured up."
..
status-change 2022-10-05T13:40:32.016648+00:00
perceived-severity cleared
alarm-text "The license service is up as configured."
..
status-change 2022-10-05T13:40:31.959330+00:00
perceived-severity major
alarm-text "The license service is down when configured up."
..
..
To show a summary of the alarm state, use show alarm summary
, or show state
system alarm summary
.
vsr running alarm# show alarm summary
show-alarm-summary
alarm-summary indeterminate
total 0
not-cleared 0
cleared 0
..
alarm-summary warning
total 0
not-cleared 0
cleared 0
..
alarm-summary minor
total 0
not-cleared 0
cleared 0
..
alarm-summary major
total 1
not-cleared 0
cleared 1
..
alarm-summary critical
total 0
not-cleared 0
cleared 0
..
..
The alarms can be compressed (i.e. only the last status change is kept) using
the cmd compress-alarm
command. They can be removed using the flush alarm
command.
See also
The Automation section of the User Guide to learn how to subscribe to notifications.
Note
The alarms are purged after a reboot or a restart of the management system.
The same configuration can be made using this NETCONF XML configuration:
vsr running config# show config xml absolute system alarm
<config xmlns="urn:6wind:vrouter">
<system xmlns="urn:6wind:vrouter/system">
<alarm xmlns="urn:6wind:vrouter/alarm">
<enabled>true</enabled>
<max-alarm-status-changes>4</max-alarm-status-changes>
<notify-status-changes>all-state-changes</notify-status-changes>
</alarm>
</system>
</config>
User alarms¶
As mentioned above, static alarms are automatically generated at startup. With user alarms, it is possible to manually configure alarms offering enhanced customization and flexibility in alert management.
In this example, an alarm is triggered when an ICMP tracker named ICMP-TRACKER goes down.
First, create a loopback interface with its tracker as well as the alarm configuration:
vsr running config# / vrf main interface loopback lo1 ipv4 address 1.1.1.1/24
vsr running config# / tracker icmp ICMP-TRACKER address 1.1.1.1 vrf main
vsr running config# / system alarm alarm-inventory alarm-type user-alarm icmp-tracker-down description "Alarm raising when the ICMP tracker ICPM-TRACKER goes down."
vsr running config# / system alarm alarm-inventory alarm-type user-alarm icmp-tracker-down resource "/tracker/icmp[name='ICMP-TRACKER']/state"
vsr running config# / system alarm alarm-inventory alarm-type user-alarm icmp-tracker-down severity-level-trigger critical text "Tracker ICMP-TRACKER {value}, alarm {name}"
vsr running config# / system alarm alarm-inventory alarm-type user-alarm icmp-tracker-down severity-level-trigger critical equal down
vsr running config# / system alarm alarm-inventory alarm-type user-alarm icmp-tracker-down severity-level-trigger cleared text "Tracker ICMP-TRACKER {value}"
vsr running config# commit
vsr running config# show state / system alarm alarm-inventory alarm-type user-alarm
alarm-type user-alarm icmp-tracker-down
severity-level-trigger critical
text "Tracker ICMP-TRACKER {value}, alarm {name}"
equal down
..
severity-level-trigger cleared
text "Tracker ICMP-TRACKER {value}"
..
resource "/tracker/icmp[name='ICMP-TRACKER']/state"
description "Alarm raising when the ICMP tracker ICPM-TRACKER goes down."
will-clear true
severity-level critical
..
Note
The path to the resource must contain outer quotes if it contains any inside as in our example. Otherwise, the inner quotes will be deleted by nc-cli and the path will become incorrect.
Then, disable the interface to trigger the alarm:
vsr running config# / vrf main interface loopback lo1 enabled false
vsr running config# commit
vsr running config# show alarm list
show-alarm-list
number-of-alarms 2
last-changed 2024-03-22T09:53:01.539218+01:00
alarm "/vrf[name=\"main\"]/interface/loopback[name=\"lo1\"]/enabled" link-alarm loopback
time-created 2024-03-22T09:51:41.194625+01:00
is-cleared true
last-raised 2024-03-22T09:53:01.501389+01:00
last-changed 2024-03-22T09:53:01.523470+01:00
perceived-severity major
alarm-text "The lo1 loopback is down as configured in vrf main."
status-change 2024-03-22T09:53:01.523470+01:00
perceived-severity cleared
alarm-text "The lo1 loopback is down as configured in vrf main."
..
status-change 2024-03-22T09:53:01.501389+01:00
perceived-severity major
alarm-text "The lo1 loopback is up when configured down in vrf main."
..
status-change 2024-03-22T09:51:41.295482+01:00
perceived-severity cleared
alarm-text "The lo1 loopback is up as configured in vrf main."
..
status-change 2024-03-22T09:51:41.194620+01:00
perceived-severity major
alarm-text "The lo1 loopback is unknown when configured up in vrf main."
..
..
alarm "/vrouter:state/vrouter-tracker:tracker/vrouter-pm:icmp[name='ICMP-TRACKER']/state" user-alarm icmp-tracker-down
time-created 2024-03-22T09:53:01.539223+01:00
is-cleared false
last-raised 2024-03-22T09:53:01.539218+01:00
last-changed 2024-03-22T09:53:01.539218+01:00
perceived-severity critical
alarm-text "Tracker ICMP-TRACKER down, alarm icmp-tracker-down"
status-change 2024-03-22T09:53:01.539218+01:00
perceived-severity critical
alarm-text "Tracker ICMP-TRACKER down, alarm icmp-tracker-down"
..
..
..
And finally, reenable the interface to clear the alarm:
vsr running config# / vrf main interface loopback lo1 enabled true
vsr running config# commit
vsr running config# show alarm list
show-alarm-list
number-of-alarms 2
last-changed 2024-03-22T09:53:58.055813+01:00
alarm "/vrf[name=\"main\"]/interface/loopback[name=\"lo1\"]/enabled" link-alarm loopback
time-created 2024-03-22T09:51:41.194625+01:00
is-cleared true
last-raised 2024-03-22T09:53:58.017216+01:00
last-changed 2024-03-22T09:53:58.039948+01:00
perceived-severity major
alarm-text "The lo1 loopback is up as configured in vrf main."
status-change 2024-03-22T09:53:58.039948+01:00
perceived-severity cleared
alarm-text "The lo1 loopback is up as configured in vrf main."
..
status-change 2024-03-22T09:53:58.017216+01:00
perceived-severity major
alarm-text "The lo1 loopback is down when configured up in vrf main."
..
status-change 2024-03-22T09:53:01.523470+01:00
perceived-severity cleared
alarm-text "The lo1 loopback is down as configured in vrf main."
..
status-change 2024-03-22T09:53:01.501389+01:00
perceived-severity major
alarm-text "The lo1 loopback is up when configured down in vrf main."
..
status-change 2024-03-22T09:51:41.295482+01:00
perceived-severity cleared
alarm-text "The lo1 loopback is up as configured in vrf main."
..
status-change 2024-03-22T09:51:41.194620+01:00
perceived-severity major
alarm-text "The lo1 loopback is unknown when configured up in vrf main."
..
..
alarm "/vrouter:state/vrouter-tracker:tracker/vrouter-pm:icmp[name='ICMP-TRACKER']/state" user-alarm icmp-tracker-down
time-created 2024-03-22T09:53:01.539223+01:00
is-cleared true
last-raised 2024-03-22T09:53:01.539218+01:00
last-changed 2024-03-22T09:53:58.055813+01:00
perceived-severity critical
alarm-text "Tracker ICMP-TRACKER up"
status-change 2024-03-22T09:53:58.055813+01:00
perceived-severity cleared
alarm-text "Tracker ICMP-TRACKER up"
..
status-change 2024-03-22T09:53:01.539218+01:00
perceived-severity critical
alarm-text "Tracker ICMP-TRACKER down, alarm icmp-tracker-down"
..
..
..
The same configuration can be made using this NETCONF XML configuration:
vsr running# show config xml absolute / system alarm
<config xmlns="urn:6wind:vrouter">
<system xmlns="urn:6wind:vrouter/system">
<alarm xmlns="urn:6wind:vrouter/alarm">
<enabled>true</enabled>
<max-alarm-status-changes>32</max-alarm-status-changes>
<notify-status-changes>all-state-changes</notify-status-changes>
<alarm-inventory>
<alarm-type>
<alarm-type-id>user-alarm</alarm-type-id>
<alarm-type-qualifier>icmp-tracker-down</alarm-type-qualifier>
<severity-level-trigger>
<severity-level-id>critical</severity-level-id>
<text>Tracker ICMP-TRACKER down, alarm {name}</text>
<equal>down</equal>
</severity-level-trigger>
<severity-level-trigger>
<severity-level-id>cleared</severity-level-id>
<text>Tracker ICMP-TRACKER up</text>
</severity-level-trigger>
<resource>/tracker/icmp[name='ICMP-TRACKER']/state</resource>
<description>Alarm raising when the ICMP tracker ICPM-TRACKER goes down.</description>
</alarm-type>
</alarm-inventory>
</alarm>
</system>
</config>
See also
The command reference for details.