Using Automatic Event Notification

You can set up automatic event notification for two types of library events:



To Set Up Threshold-Based Notification

LibMON allows you to set various thresholds for each device within the library. When the device exceeds a set threshold, LibMON automatically notifies the library contact by sending an email message and/or executing a user-defined command. This feature is intended to provide notification of conditions that could eventually cause a library component to become unavailable.


Note - No single set of threshold values is appropriate for all libraries and drives. Select thresholds that are appropriate for the library and drives you are using.

You set threshold values through the Library Property Book Page.

  1. On the LibMON Home Page, select the library for which you want to set threshold values.

  2. On the Selected menu, click Properties.

    LibMON opens the Library Property Book Page for the selected library.

  3. On the left side of the page, click Device Names.

    The page displays the Device Names section. This section displays the device names for the robot and each tape drive within the library. To the right of each device name field is a Set Threshold button.

  4. Click the Set Threshold button that corresponds to the device for which you want to set threshold values.

    LibMON opens the Set Threshold dialog box for the device.


Note - The parameters displayed in the Set Threshold dialog box depend on the type and model of the device monitored; therefore, the dialog box displayed on your system will probably appear somewhat different from the one shown above.
    The Threshold table (at the bottom of the dialog box) displays the parameters for which you can set thresholds, and the current threshold values.

    TABLE 5 describes each of the library parameters. The parameters displayed vary depending on the type of library you are using.

TABLE 5 Library Parameters
Parameter
Description
Barcode scan retries
The number of barcode scan retries.
Cartridge seated
Whether the cartridge is seated.
Door closed
Whether the door is closed.
Drive handle moves
The number of attempted drive handle moves.
Drive handle retries
The number of drive handle retries.
Drive load retries
The number of drive load retries.
Drum home
Whether the drum is home.
Extension axis moves
The number of individual extension axis moves.
Extension correction steps
The number of extension correction steps.
Extension moves
The number of individual extension moves.
Extension retries
The number of extension retries.
Gripper home
Whether the gripper is home.
Gripper moves
The number of individual gripper moves.
Gripper retries
The number of gripper retries.
Horizontal correction steps
The number of horizontal correction steps.
Horizontal moves
The number of individual horizontal moves.
Horizontal retries
The number of horizontal retries.
Key locked
Whether the key is locked.
Moves from a bin
The number of attempted moves from a bin.
Moves from a drive
The number of attempted moves from a drive. The recommended value for this parameter is 100,000.
Moves from a load port
The number of attempted moves from the load port.
Moves to a bin
The number of attempted moves to a bin.
Moves to a drive
The number of attempted moves to a drive. The recommended value for this parameter is 100,000.
Moves to a load port
The number of attempted moves to the load port.
Partial grip retries
The number of partially gripped cartridge retries.
Pick from drive retries
The number of pick from drive retries.
Place into drive retries
The number of place into drive retries.
Rotary moves
The number of attempted rotary axis moves.
Rotary retries
The number of rotary axis retries.
Time powered on
The number of seconds the system has been powered on.
Time processing commands
The number of seconds spent processing commands.
Total number of moves
The total number of moves.
Total number of pick retries
The total number of pick retries.
Total number of put retries
The total number of put retries.
Total number of scan failures
The total number of scan failures.
Total number of scan retries
The total number of scan retries.
Total number of scans
The total number of scans.
Vertical correction steps
The number of vertical correction steps.
Vertical moves
The number of individual vertical moves.
Vertical retries
The number of vertical retries.


    TABLE 6 describes each of the tape drive parameters. The parameters displayed vary depending on the type of tape drive installed.

TABLE 6 Tape Drive Parameters
Parameter
Description
Read compression ratio
The read compression ratio.
Read corrected errors
The number of read errors that have been corrected.
Read hard errors
The number of read errors that have not been corrected.
Total re-reads
The number of rereads.
Total re-writes
The number of rewrites.
Write compression ratio
The write compression ratio
Write corrected errors
The number of write errors that have been corrected
Write hard errors
The number of write errors that have not been corrected


  1. To set a threshold for a parameter, click the Parameter Name in the table.

    LibMON displays the Parameter Name in the Selected Threshold field near the top of the dialog box.

  2. In the Threshold Value field, enter the desired numeric value for the threshold.


Note - This value must be numeric, and must be greater than the value displayed in the Current Value column of the Thresholds table.
    As you enter the value, it appears in the Threshold Value column.

  1. To select email notification, turn the Email option On.

  2. To select user-defined notification, turn the User-Defined option On, and then select the desired action from the Action list box.

    The Action list box lists the commands for which you have created command definition files. To create a command definition file to be used for User-Defined notification, see To Create a Command Definition File.

  3. Repeat steps 5 through 8 for each threshold value you wish to set.

    To return the currently selected threshold to its previously saved setting, click Reset. To return all the threshold settings to their previous values, click Reset All.

  4. Click OK to save your threshold settings and exit the Set Threshold dialog box.


Note - If you move to another LibMON page without clicking OK, your new threshold settings will be lost.
    To exit the dialog box without saving any settings, click Cancel.


To Set Up Library Availability-Based Notification

You can configure LibMON to notify you automatically when the library transitions between available and unavailable states. You do this through the Library Property Book Page.

  1. On the LibMON Home Page, select the library.

  2. On the Selected menu, click Properties.

    LibMON displays the Library Property Book Page for the library you selected.

  3. On the left side of the page, click Actions.

    The right side of the page displays the Actions section. This section consists of two subsections: Library Available Actions and Library Unavailable Actions:



  4. To select email notification, turn the Email option On.

  5. To select user-defined notification, turn the User-Defined option On, and then select the desired action from the Action list box.

    The Action list box lists the commands for which you have created command definition files. To create a command definition file to be used for User-Defined notification, see To Create a Command Definition File.

  6. Click Apply to save your changes.


Note - If you move to another LibMON page without clicking Apply, your new settings will be lost.
    To return to the previously saved settings, click Reset.


To Create a Command Definition File

Command definition files specify what actions will be executed when a library event occurs that triggers user-defined notification. Each command definition file must be located in the /SUNWlmon/command/user directory, and have the extension .des. For your assistance, the /SUNWlmon/command/user directory contains a template file, template.des.

Each line of the command definition file should contain one of the following:



The following table describes the keywords that must appear in the command definition file.

TABLE 7 Command Definition File Keywords
Keyword
Description
PATH
The full path where the command to be executed is located.
The default path of /opt/SUNWlmon/command/user will be used if you do not specify a path.
NAME1
The name of the executable file or script to be executed.
TITLE
This is the title that will be listed in the Action box (in the Actions section of the Library Property Book Page). If you do not specify a title, the Action box will display the name of the executable file.
ARGUMENTS
The command line arguments for the executable or script. Arguments preceded with the percent sign are LibMON predefined arguments that will be substituted with appropriate values when the action is initiated. Arguments can all be on one line or can span multiple lines.
DESCRIPTION
Provides a more lengthy description of the command to be executed.
1 You must specify values for these keywords. All other values are optional.


The following table lists the LibMON predefined arguments.


Note - The availability of some arguments depends on the type of trigger that initiates the command: a library availability-based trigger or a threshold-based trigger.

TABLE 8 LibMON Predefined Arguments
Argument Name
Description
Library
Availability
Trigger
Threshold
Trigger
CONTACT_EMAIL
The email address(es) for the contact assigned to the originating library, if defined.
X
X
CONTACT_FAX
The fax number for the contact assigned to the originating library, if defined.
X
X
CONTACT_NAME
The name of contact assigned to the originating library, if defined.
X
X
CONTACT_PAGE
The page number for the contact assigned to the originating library, if defined
X
X
CONTACT_PHONE
The phone number for the contact assigned to the originating library, if defined.
X
X
DEVICE_NAME
The device name on which the trigger is based.

X
EVENT_DESCRIPTION
A description of the event.
X
X
EVENT_ORIGINATOR
The event originator.
X
X
EVENT_RECOVERY_MESSAGE
The recovery message associated with the event.
X
X
EVENT_SEVERITY
The event severity level.
X
X
EVENT_TIMESTAMP
The string representation of the date using the local convention.
X
X
EVENT_TITLE
The event title.
X
X
EVENT_TYPESPECIFICDATA
Specific data related to the event type.
X
X
HOST_NAME
The hostname of the server.
X
X
LIBRARY_AVAILABILITY
The status of the library: available or unavailable.
X
X
LIBRARY_LOCATION
The location of the library, if defined.
X
X
LIBRARY_NAME
The name of the library, if defined.
X
X
PARAMETER_NAME
The parameter name for the trigger.

X
PARAMETER_VALUE
The parameter value for the trigger.

X
THRESHOLD_VALUE
The threshold to which the parameter value is being compared.

X


The following is a sample command definition file.

PATH
/export/LibMON/bin

NAME
buildEvent.sh

TITLE
Display Event Information

ARGUMENTS
%LIBRARY_NAME %HOST_NAME %LIBRARY_LOCATION %EVENT_TIMESTAMP
%EVENT_TITLE %EVENT_DESCRIPTION %EVENT_TYPESPECIFICDATA
%EVENT_RECOVERY_MESSAGE

DESCRIPTION
Display event information in an xterm and ring a bell


The sample file above defines a command with the title "Display Event Information." When an action associated with this command definition is initiated, the buildEvent.sh command in the /export/LibMON/bin directory is executed.

When building command definition files, use the CHECK-USER-COMMANDS script in the /opt/SUNWlmon directory to verify correct syntax usage. When you are sure the command definition file is correct, either restart the LibMON server or select the Refresh option on the LibMON Home Page. This causes the server to recognize the new command definition.