| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 1M: System Administration Commands Oracle Solaris 11 Information Library |
- email notification daemon for software events
/usr/lib/fm/notify/smtp-notify
smtp-notify is a daemon that subscribes to software events and Fault Managementlifecycle events and produces email notifications based on a set of notificationpreferences that are stored in the SMF service configuration repository.
Email notification preferences are set usingsvccfg(1M).
smtp-notify is managed by the service management facility,smf(5), under the serviceFMRI:
svc:/system/fm/smtp-notify:default
Administrative actions on this service, such as enabling, disabling, or requesting restart,can be performed usingsvcadm(1M). The service's status can be queried using thesvcs(1) command.
The following service properties can be set:
This is anastring property that defaults to/. When set, the specified root directory will be used for all pathnames evaluated bysmtp-notify.
By default, the body of the email event notification will be basedon a set of localized message templates that are delivered with theOracle Solaris operating system.smtp-notify will lookup the appropriate template (based onthe event class) and fill in the template using elements from the eventpayload.
A user-supplied message body template can be substituted by specifying themsg_templatenotification preference. Refer tosvccfg(1M) for more information about setting notification preferences ona per-service or per-event-class basis.
The message body template can contain the expansion macros listed below. Thesemacros will be expanded bysmtp-notify before sending the message.
Macro Description----- -----------%% expands to a literal % character%<HOSTNAME> expands to the hostname on which the event occurred%<URL> expands to the URL of the knowledge article associated with this event%<CLASS> expands to the event class%<UUID> expands to the UUID of the event%<CODE> expands to the knowledge article message ID%<SEVERITY> expands to the severity of the event
For SMF service state transition events, the following additional macros can bespecified in a message template:
%<FMRI> expands to FMRI of the affected service%<FROM-STATE> expands to the previous state of the service%<TO-STATE> expands to the new state of the service
To facilitate email filtering,smtp-notify will create X-headers for the following componentsof the event payload for all event classes:
Header name Value----------- -----X-FMEV-HOSTNAME the name of the host on which the event occurredX-FMEV-CLASS the event classX-FMEV-CODE the Knowledge article message IDX-FMEV-SEVERITY the severity of the eventX-FMEV-UUID the UUID of the event
SMF service state transition events will also include the following additional X-headers:
Header name Value----------- -----X-FMEV-FMRI the FMRI of the affected SMF serviceX-FMEV-FROM-STATE the previous state of the serviceX-FMEV-TO-STATE the new state of the service
Example 1 Configuring Notification Preferences
The following command configures notification preferences for SMF service state transition events.
#svccfg -s svc:/system/svc/global:default setnotify -g \from-online,to-maintenance mailto:admin@somehost.com
Example 2 Enabling Email Notifications
The following command enables email notifications for Fault Management problem diagnosis events.
#svccfg setnotify problem-diagnosed mailto:admin@somehost.com
Example 3 Listing Notification Settings
The following command lists all notification settings for Fault Management problem diagnosisevents.
#svccfg listnotify problem-diagnosed
Seeattributes(5) for descriptions of the following attributes:
|
svcs(1),svcadm(1M),svccfg(1M),syslogd(1M),attributes(5),smf(5)
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |