espnotify(1)

espnotify - a generic command line notification utility for SGI Embedded Support Partner

As shipped in IRIX 6.5.19. Last changed in IRIX 6.5.19.

NAME
     espnotify - a generic command line notification utility for SGI Embedded
     Support Partner

SYNOPSIS
     /usr/bin/espnotify [-n priority -d]  -E <e-mail addresses> [-F <Sender address>]
                        { -f <filename> | -m <message> }
                        [-o <processing options>] [-s <subject>]

     /usr/bin/espnotify [-n priority -d]  -c <message> [-a] [-D <Display>] [-g <geometry>]
                        [-i <icon image>] [-t <title>]

     /usr/bin/espnotify [-n priority -d] -C <message> -p <pagers> [-S <paging service>]
                        [-Q <qpage server>]

     /usr/bin/espnotify [-n priority -d] -A <message>

DESCRIPTION
     espnotify is a generic command line utility that is packaged with SGI
     Embedded Support Partner (see esp(5) for more details).  It is used to
     perform various types of notifications.

     espnotify can post a given message to e-mail addresses, can display a
     message on local/remote X display, can post a message to a paging service
     to be delivered to a pager or can display the message on the system
     console.

     espnotify supports various command line options for various types of
     notifications.  These options are discussed in detail later in this man
     page.  More than one type of notification can be specified at a time.
     There are some general options that are applicable to all types of
     notifications.  These general options are :

     -d   This causes espnotify to display debug information.

     -n range from 1 to 7
          Provide a numeric priority for the message (defaults to 7).  The
          priorities are decoded as follows :
                    1 and 2   Critical Message
                    3         Error Message
                    4         Warning Message
                    5 to 7    Informational Message


E-MAIL NOTIFICATION
     The first synopsis is for posting a message to specified e-mail
     addresses.  espnotify invokes /usr/lib/sendmail to deliver message to the
     e-mail addresses specified with -E option. -F option can be used to
     specify the e-mail sender address.

     The options for e-mail notification include:

     -E e-mail addresses
          Comma separated list of e-mail addresses for use in e-mail
          notifications.  This option must be specified for e-mail
          notification to work.

     -F Sender Email address
          This is to override  ESP Customer Profile user-defined Sender Email
          Address value which is actually passed to espnotify as an
          environment variable ESP_MAIL_FROM.  If none of them are defined(or
          empty), the sender is set to the current executing username.

     -f filename
          This specifies a text file content of which is used for e-mail
          notification.  A binary file may be sent if the -o option is used.

     -m message
          This option is used when the content for an email notification is to
          be a string.  All strings must be enclosed in double quotes.  Please
          note that -m and -f options are mutually exclusive. The message may
          contain special Message Format Code.

     -o processing options
          Processing options for the message.  Supported options are COMP
          (compress and uuencode the message) and ENCO (uuencode the message).
          Processing options are valid only with -f option.

     -s subject
          Subject for the message.  In case no subject is given, a default
          subject is provided by espnotify. The format of the default subject
          is as follows :

              [HOSTNAME]: <text>

              where,
              HOSTNAME is the name of the host
              <text> can be "Critical System Error" or "System Error" or
                     "System Warning" or "System Information" depending
                     on priority.

          If both subject and priority are specified, the subject specified
          with -s overrides the default subject.  If neither a subject or
          priority is specified, the subject will default to "[HOSTNAME]:
          System Information".

GRAPHICAL NOTIFICATION
     The second synopsis is for displaying a message (graphical notification)
     to a local/remote X display.

     The options for graphical notification include:

     -a   This option specifies that audio should be used along with graphical
          notification.  Audio notification cannot be run without graphical
          notification.  Audio is played via the /usr/sbin/ssplay command on
          which host it is executed.  It is not possible to play audio on a
          remote host. NOTE: this is not supported on Linux.

     -c message
          A text string for use as GUI notification content.  Text must be
          contained within double quotes if spaces are needed in the string.
          This option must be specified to perform a graphical notification.
          The message may contain special Message Format Code.

     -D Display
          Specifies an alternate display host on which to display a graphical
          notification.  The default is to display on the host specified in
          the $DISPLAY environment variable.

     -g geometry
          X compatible geometry string in the form WIDTHxHEIGHT+XOFF+YOFF
          where WIDTH, HEIGHT, XOFF, and YOFF are numbers) for specifying a
          preferred size and location for this application's main window.

     -i icon image
          This option specifies the icon to display within graphical
          notifications.

          There are four options:

               Critical
               Error
               Warning
               Info

          If a priority is set with the -n option, the icon is set
          accordingly.  If neither priority or icon_image is specified, the
          "Info" icon will be defaulted to. NOTE: On Linux, this option is
          deprecated. However, option -n will be used instead and a color of
          Red will be assigned for values of n up to 3, Yellow for 4, nothing
          otherwise.

     Caveats:
          On Linux xmessage is used. On Linux, xmessage is used instead.

     -t title
          This specifies the title of the graphical notification.  If a
          numeric notification priority is set with -n, title defaults to:

               Priority 1 - "Critical System Error"
               Priority 2 - "System Error"
               Priority 3 - "System Warning"
               Priority 4 - "System Information"

          If neither a title nor priority are specified the title will default
          to:  "System information"   If a priority is specified, a custom
          title can still be specified.

PAGER NOTIFICATION
     The third synopsis is for sending a message to a specified pager.
     espnotify uses qpage (see QuickPage(1m) for more details) to deliver the
     message. The QuickPage daemon must be running on the machine that
     delivers the page.  This daemon is started during system startup if
     chkconfig variable, quickpage is turned on. (NOTE: this may not be true
     for Linux.)

     NOTE: The Linux version of ESP do not install qpage but ESP will honor it
     if it is installed in /usr/local/bin directory.

     The configuration of the daemon can be done via SGI Embedded Support
     Partner User Interface.  Please refer to the SGI Embedded Support Partner
     User's Guide for more details.

     The options for paging notification include:

     -C message
          Specifies a text string for use as alphanumeric page content.  Text
          must be contained within double quotes if spaces are needed in the
          string. This option must be specified for paging notification to
          work. The message may contain special Message Format Code


     -p pagers
          Comma separated list of pager or pager-ids that are to receive a
          notification.  One or more  of each can be specified on the command
          line.  Pager specifications are stored in /etc/qpage.cf file on the
          server that is delivering the page.  The pagers can be set from the
          SGI Embedded Support Partner User Interface.


     -S paging service
          This options allows the specification of an alternate paging
          service.  Service specifications are stored in /etc/qpage.cf file on
          the server that is delivering the page.  These services can be set
          from the SGI Embedded Support Partner User Interface.  If no service
          is specified then the service with name set as 'default' is used to
          deliver the page.


     -Q qpage server
          This option allows the specification of an alternate server on which
          the QuickPage daemon is running.  If this option is not specified a
          connection to the local Qpage daemon will be tried.

CONSOLE NOTIFICATION
     The fourth synopsis is to display message on the terminal/system console.
     The message specified with -A is displayed on the standard output of the
     terminal if open.  Otherwise, the message is displayed on the system
     console. The message may contain special Message Format Code.


MESSAGE FORMAT CODES
     Any message can contain format codes that has  special meaning when ESP
     execute the action.  Just specify  event information to be included in
     the notification message.  You can include any of the following format
     codes:

          %H = host name where the event originated (default)
          %D = event data (this is the data received with the event) (default)
          %z = Event time stamp (in mm/dd/yyyy hh:mm:ss format) (default)
          %c = event class description
          %C = event class ID
          %e = event type description
          %T = event type ID
          %O = event ID (as registered by ESP)
          %F = forwarder hostname (in case of SGM)
          %I = system ID

          NOTE: Message code are for general usage , ie. for use with other ESP actions
                         scripts.


EXAMPLES
     Send a prioritized GUI notification.

     % espnotify -n 2 -c "Widget 25 failure"

     Send a prioritized e-mail notification with string content along with a
     page.  In this example we are using a "pager" definiton defined in
     /etc/qpage.cf as the argument for the -p parameter.

     % espnotify -n 2 -E john@xyz.com -m "System disk is nearing capacity" -p
     johndoe -C "System disk is nearing capacity"

     Send a page to "johndoe".  Use an alternate Qpage server along with an
     alternate paging service.  "johndoe" along with the alternate paging
     service name must exist in /etc/qpage.cf configuration file on the
     alternate QuickPage Server.

     % espnotify -C "System temperature too high" -Q pager.server.com -S
     airtouch -p johndoe

     % espnotify -E esp_users@xyz.com -m "On %H at %z : %D(%T)"

     Send a non-prioritized e-mail message notification with string content
     made of the host (%H) where the event originated. Date(%z), event
     description(%D) and ESP event number(%T) are also supplied.

SEE ALSO
     Mail(1), QuickPage(1m), esp(5).

REFERENCES
     SGI Embedded Support Partner Documentation.