Monitoring an HP-UX server with EMS

EMS (Event Monitoring Service) is a monitoring service that polls a system resource and sends messages when events occur. An event is something you want to know about. For example, you may want to be alerted when a disk goes down or when available filesystem space falls below a certain level. EMS allows you to configure what you consider an event for any given system resource (disk, filesystem space, network interfaces).

The advantage EMS has over built-in monitors is that requests can be made to send events to a wide variety of software using multiple protocols (opcmsg, SNMP, TCP, UDP).

Setting up EMS is quite easy, once you know how it works. First you need to configure a monitor:

/etc/opt/resmon/lbin/monconfig
============================================================================
==============      Monitoring Request Manager Main Menu      ==============
============================================================================

Note: Monitoring requests let you specify the events for monitors
      to report and the notification methods to use.

Select:
   (S)how monitoring requests configured via monconfig
   (C)heck detailed monitoring status
   (L)ist descriptions of available monitors
   (A)dd a monitoring request
   (D)elete a monitoring request
   (M)odify an existing monitoring request
   (E)nable Monitoring
   (K)ill (disable) monitoring
   (H)elp
   (Q)uit
   Enter selection: [s] 
Monitors to which this configuration can apply:
   1) /StorageAreaNetwork/events/SAN_Monitor
   2) /storage/events/disk_arrays/AutoRAID
   3) /storage/events/disks/default
   4) /adapters/events/FC_adapter
   5) /adapters/events/TL_adapter
   6) /system/events/core_hw
   7) /connectivity/events/hubs/FC_hub
   8) /connectivity/events/multiplexors/FC_SCSI_mux
   9) /connectivity/events/switches/FC_switch
  10) /system/events/memory
  11) /storage/events/enclosures/ses_enclosure
  12) /storage/events/tapes/SCSI_tape
  13) /system/events/ups
  14) /storage/events/disk_arrays/FC60
  15) /system/events/ipmi_fpl
  16) /storage/events/disk_arrays/FW_SCSI
  17) /storage/events/disk_arrays/High_Availability
  18) /system/events/cpu/lpmc
  19) /storage/events/disk_arrays/MSA1000
  20) /adapters/events/scsi123_em
  21) /system/events/system_status
   Enter monitor numbers separated by commas 
      {or (A)ll monitors, (Q)uit, (H)elp} [2,3,6] 

Criteria Thresholds:
   1) INFORMATION    2) MINOR WARNING    3) MAJOR WARNING
   4) SERIOUS        5) CRITICAL
   Enter selection {or (Q)uit,(H)elp} [1] 

Criteria Operator:
   1) <      2) <=      3) >      4) >=      5) =      6) !=
   Enter selection {or (Q)uit,(H)elp} [4] 

Notification Method:
   1) UDP        2) TCP        3) SNMP       4) TEXTLOG
   5) SYSLOG     6) EMAIL      7) CONSOLE
   Enter selection {or (Q)uit,(H)elp} [6] 

   Enter email address: [eventusr] 

User Comment:
   (C)lear   (A)dd
   Enter selection {or (Q)uit,(H)elp} [a] 

   Enter comment: [Event configured by James] 

Client Configuration File:
   (C)lear
   Use Clear to use the default file. 
   Enter selection {or (Q)uit,(H)elp} [c] 

After configuring and saving the monitor, you will then need to enable monitoring by pressing (E) in the main menu. If you make any changes to an existing monitor, you still need to enable monitoring. You can test if this works by using the following tool:

/etc/opt/resmon/lbin/send_test_event -a disk_em

All the config files are in the following directory:

/var/stm/config/tools/monitor