Alerts

VOV issues an "alert" when an event requires attention. An alert can range from information that does not require action to an urgent fault that requires immediate action.

Depending on the event that occurs, an alert may require attention from a system administrator.

VOV supports four alert levels, which are defined in the table below.
INFO
Information only, no action required.
WARN
Warning, a limit is about to be reached.
ERROR
A fault in one of the subsytems. Example: a syntax error in one of the configuration files.
URGENT
A major fault that compromises the behavior of the system and requires immediate attention. Examples: a license violation or a disk full condition.

Alerts can be viewed on the browser or the command line interface (CLI). In addition, alerts are stored in log files.

For the administrator, VOV permits two actions with respect to an alert:
  • Acknowledge the alert.
  • Delete the alert from view.
Note: Every alert is stored in a log file; deleting an alert from viewing does not delete the record of the alert in the log file.

Maximum Number of Alerts

The vovserver keeps up to a defined maximum number of alerts in view. The maximum number is defined by the parameter alerts.max. The default value is 50. If the number of alerts exceeds the maximum, the oldest alert with the lowest level is deleted from the view.
Note: The record of the alert is not deleted from the log file.

Manage Alerts

For viewing alerts, the level of the most severe alert is visible in the title bar of the browser user interface and in the VOV GUI. The most recent alerts can be viewed from the command line interface with the following commands:
  • vsi for short format
  • vovshow -alerts for full format
The following is an example of alerts as shown by vsi:
Alerts:
URGENT           Imminent license violation: us      3   12d20h   12d20h
WARNING          License is expiring in less th   2613   12d20h    9d13h
ERROR            License is expiring in less th    558    9d13h    8d13h
URGENT           License has expired               270    8d13h    8d01h
URGENT           License violation                  24    8d13h    8d01h
WARNING          License violation: too many sl    336    8d13h    8d01h
The following example shows the same alerts as seen on the browser:


Figure 1.

If viewing the documentation from a live vovserver, refer to the Alerts page.

Alerts are also logged in the logs directory in files with names that are formatted as alert.YYYY.MM.DD.log. Old alert files are compressed.

Some alerts may not require immediate action. However, it is good practice to acknowledge the alert. The [ack] link on the alerts page can be used to indicate that the alert has been acknowledged. The login name of the person acknowledging the alert will be shown on the Alerts page.

Clear Alerts from View

An alert is automatically cleared from view about one day after the last occurrence that triggered the alert. A selected alert can be removed from view by using the [del] link from the browser UI.

All alerts can also be cleared from view with the following command:
% vovforget -alerts

Tcl API

There are two Tcl API procedures in vovsh that handle alerts:
  • vtk_generic_get alerts A - Get alert data into array A
  • vtk_alert_add sev title - Add an alert

To add an alert from the Tcl interface, use the command vtk_alert.

To get data for all alerts in Tcl, use the command
vtk_generic_get alerts array
The following code example shows how vsi formats the alerts:
# This is how the vsi cmd formats alerts
vtk_generic_get alerts alerts
if { $alerts(count) > 0 } { 
    append output "\nAlerts:\n"
    for { set i 0 } { $i < $alerts(count) } { incr i } { 
        append output [format "  %-10s %-10s %-30s" $alerts($i,level) 
                        [string range $alerts($i,module) 0  9] 
                        [string range $alerts($i,title)  0 29] ]
        if { $alerts($i,count) > 1 } { 
            append output [format "%7d %8s %8s" 
                            $alerts($i,count) 
                            [vtk_time_pp [expr $now - $alerts($i,first)]] 
                            [vtk_time_pp [expr $now - $alerts($i,last) ]] ]
        }
        append output "\n"
    }
    append output "\n"
}