From OpenNMS
Contents |
Feature Description
The OpenNMS Map application will be improved to make the icon itself indicative rather that the current status bubble.
Status on Maps Just now
The SVG mapElements have what we have called a semaphore. The semaphore is an SVG circle object filled with a color.
The color displayed depends on the view you choose:
You can choose view by: status, severity and availability.
Status and severity depends on the active alarm list. Availability depends on the ICMP availability of the node.
You can configure the statutes, severity and availability in map.properties.
Statutes in map.properties
To define a status in map.property you need to set 4 properties:
a) the id of the status
b) the uei of the event that identify the status
c) the color that is displayed on the mapElement semaphore (or icon)
d) The text to display in Map Element Info
The uei identify the status in the alarm list and if are more alarms for the same node then the alarm with higher severity is returned: If this alarm matches any uei property then the map set the status to a known status, otherwise it will display an undefined status
Here follow the default statutes defined in map.properties:
###########################################################################
## N O D E S T A T U S
###########################################################################
# A comma-separated list of statutes keys. A status.{KEY}.id
# status.{KEY}.uei and
# status.{KEY}.color
# status.{KEY}.text property must be set for each key in this property.
# Statuses must be ordered from worst to best (i.e.: nodedown.id < nodeup.id, etc.)
statuses=nodeup,nodedown,interfacedown,servicedown,linkdown,undefined
status.nodedown.id=0
status.nodedown.color=red
status.nodedown.uei=uei.opennms.org/nodes/nodeDown
status.nodedown.text=NodeDown
status.interfacedown.id=1
status.interfacedown.uei=uei.opennms.org/nodes/interfaceDown
status.interfacedown.color=orange
status.interfacedown.text=InterfaceDown
status.linkdown.id=2
status.linkdown.uei=uei.opennms.org/generic/traps/SNMP_Link_Down
status.linkdown.color=orange
status.linkdown.text=SNMPLinkDown
status.servicedown.id=3
status.servicedown.uei=uei.opennms.org/nodes/nodeLostService
status.servicedown.color=yellow
status.servicedown.text=NodeLostService
status.undefined.id=4
status.undefined.uei=MATCH_ALL_EVENTS
status.undefined.color=grey
status.undefined.text=SeeEventDetails
status.nodeup.id=5
status.nodeup.uei=uei.opennms.org/nodes/nodeUp
status.nodeup.color=green
status.nodeup.text=NodeUp
// status.default and status.unknown.uei are required values
// they should be equals to defined statuses
status.default=nodeup
status.unknown.uei=undefined
It is possible to define as many statutes as you want based on uei and then define the appropriate color for the specified status.
The color assigned to the status is completely independent from the severity of the original event, infact for example the default severity for nodeDown is Major. In the map the color is "red" when usually this is reserved only for alarms with Critical severity.
Severities in map.properties
The map severities map 1 to 1 to opennms severity.
To identify a severity you need to define 4 property: a) the id of the severity
b) the label of the severity ( this identify the severity in the opennms alarm)
c) the color that is displayed on the mapElement semaphore (or icon)
d) The flash property that allows the semaphore to blink/flash
Here follow the severities defined in map.properties:
###########################################################################
## S E V E R I T I E S
###########################################################################
# A comma-separated list of severities. A severity.{KEY}.id,
# severity.{KEY}.color,
# severity.{KEY}.label,
# severity.{KEY}.flash default false
# property must be set for each key in this property.
# properties severity.default and severity.indeterminate are mandatory
# Severities must be ordered from worst to best (i.e.: critical.id < minor.id < normal.id, etc.)
# and must be a continous sequence of interger
#
severities=critical,major,minor,warning,normal,cleared,indeterminate
severity.critical.id=0
severity.critical.label=Critical
severity.critical.color=red
severity.critical.flash=true
severity.major.id=1
severity.major.label=Major
severity.major.color=orange
severity.minor.id=2
severity.minor.label=Minor
severity.minor.color=yellow
severity.warning.id=3
severity.warning.label=Warning
severity.warning.color=cyan
severity.normal.id=4
severity.normal.label=Normal
severity.normal.color=green
severity.cleared.id=5
severity.cleared.label=Cleared
severity.cleared.color=white
severity.indeterminate.id=6
severity.indeterminate.label=Indeterminate
severity.indeterminate.color=lightblue
severity.default=normal
severity.indeterminate=indeterminate
The color assigned to the severity is in line of principle completely independent from the severity of the original event.
More it is possible to define a strategy to identify the map severity (except from map.properties):
# Also, you can define the way to calculate severity for (sub)Maps. # property 'severity.map' may be # -'worst': gets the worst severity of the elements of the map # -'avg': calculates the severity of the map as the average severity of all the elements of the map # -'best': gets the best severity of the elements of the map # default value='avg' severity.map=worst
This means that:
a) if you choose worst the worst severity of active alarms on a mapElement is selected
b) if you choose best the best severity of active alarms on a mapElement is selected
c) if you choose average then the severity of the mapElement is an average among the severities of active alarms on a map. The average is made using the severity.id property, the returned value is the nearest integer (corresponding to a severity.id) to the average value.
Availabilities in map.properties
Checking availability view it is possible to set the color based on the "ICMP" availability of the mapElements.
To define an availability in map.properties you need to set 4 properties:
a) The id
b) the min avail, this is used to match the availability with the returned by opennms
c) the color that is displayed on the mapElement semaphore (or icon)
d) The flash property that allows the semaphore to blink/flash
###########################################################################
## A V A I L
###########################################################################
# A comma-separated list of avails keys.
# avail.{KEY}.id
# avail.{KEY}.min
# avail.{KEY}.color
# avail.{KEY}.flash default false
#
# avail.undefined is mandatory
availabilities=normal,warning,critical,undefined
avail.normal.id=0
avail.normal.min=99
avail.normal.color=green
avail.warning.id=1
avail.warning.min=97
avail.warning.color=yellow
avail.critical.id=2
avail.critical.min=0
avail.critical.color=red
avail.critical.flash=true
# avail.undefined is mandatory
avail.undefined.id=3
avail.undefined.min=-1
avail.undefined.color=grey
# default is true
# setting to false speed up open and refresh map
avail.enable=true
#this field is mandatory
avail.enable.false.id=3
In the default availabilities in map.properties you got "green" if the returned value on an element is greter then 99(%).
In some cases the availability view can be very slow so it is possible to disable this view setting avail.enable to false.
Use cases
Display the color that represents the status|severity|availability of the map element in the icon
Strategy
- Add a new Property use.semaphore=true|falsein map.properties to switch in the original mode. If use.semaphor=true then only the little circle is displayed otherwise the icon will get the color of the status.
- Enhance the MapElement and Semaphore SVG Objects to display the status in both mode, with the circle and with the inline color.
- Enhance the Link and SLink SVG object to work on the the enhanced MapElement.
- Add a menu item to View Menu to switch from semaphore to inline color
- Standardize the icon's size
The mapElement SVG Object
The mapElement will be changed in his layout to better support the new semaphore layout.
The semaphore SVG Object
The main task is to change the semaphore object in such a way that support both the typology of rendering the status.
So it can be the little circle positioned on the right of the icon or can be a circle that is all around the icon filled with the color of the status of the mapElement.
The Link and SummaryLink SVG Object
The new MapElement SVG object moves from a Square/Rectangular paradigm to a circle paradigm. The links are displayed using a simple algoritm than links the object from the center of the icon. It should be enhanced the SVG object to draw the links between the mapElement Circle.
The Icon size
The mapElement is an SVG object that is made of three geometrical objects:
a) The icon image
b) The semaphore (that can be inline or just a circle on the bottom right side of the icon image)
c) The label
In the process of creating default map object the icon files should be of the following size in pixel: 100X120.
All the icons where updated to be of this size.
If you want to add your own icon you should address this suggestion. A general review of the png icons will be made based on the SVG icons.
The Switch Menu Item on View Menu
The use.semaphore property define the default status layout of the mapelements. Therefore when you access the map application you will get elements with a layout (semaphore or inline color) that is determined by the value of this property.
It is possible to switch from inline to semaphore and viceversa just selecting the "Switch..." Item in View menu.
The user is able to switch beetween the two visualization layout.
Acceptance Criteria
To be done






