Configuring Alert Destinations
The alert destination (facility) is
the program or process to which you send the message. You need to add a new alert
destination if you want to send alerts to another program. For example, if you have
software that sends messages to pagers, you need to add this program as a new alert
destination.
NFR includes several templates for common types of applications, including fax, e-mail,
and paging. The exact settings you need to use are dependent on your environment,
your software, and other software. You may need one configuration for your local
paging system and another for a national paging system that uses different options.
»To create alert destinations:
- Login as the NFR user.
- Make the NFR facility the current directory:
% cd $NFRHOME/etc/alertd/facilities
- Create a directory for your new facility:
% mkdir fax-sysadmin
- Copy the template files for the type of facility you are adding to your directory:
% cp -R templates/fax ./fax-sysadmin
If there is no template for your facility, use the generic template.
- Make your facility directory the current directory:
% cd fax-sysadmin
- Edit the queue configuration file (queue.cf) to reflect information about your facility.
% vi queue.cf
- Update the variables to reflect information about your facility. The queue.cf reference contains
information on field definitions. The options you need to use depend on your
application. You must modify the following variable:
- Exec_Path - Type the absolute path to the program to which NFR should
pass alert messages for delivery.
#queue.cf file to send fax to sysadmin
Exec_Path="/usr/contrib/bin/sendfax"
Exec_Args=-d "$Recipient@$FaxNum"
Flush_Time=60
Flush_Count=3
Flush_Method=POPEN
FaxNum=3015557946
Recipient=Systems Administration
- Edit the resource definition file:
% vi $NFRHOME/etc/resources/fac_res.src
In the facilities section, add your facility as a resource:
# Sample fac_res.src file
_facilities
{
NFR_FAC_CONSOLE "Console output";
NFR_FAC_NFRLOG "NFR Log facility";
NFR_FAC_ACK "NFR Acknowledgment system";
NFR_FAC_TRACE "NFR tracing only";
NFR_FAC_SYSLOG "syslog output";
# user defined facilities
fax-sysadmin "Send Fax to Sys Admin";
}
- Make the NFR directory your current directory:
% cd $NFRHOME
- Rebuild the resource files:
% ./bin/buildres
- Stop and restart the alert daemon:
% ./bin/stop_alertd
% ./bin/start_alertd
- NFR now recognizes your alert destination. When you use the GUI to configure
alerting for a backend or user alert messages, the GUI displays your destination as
another option. Remember that you must enable alerting to your facility before NFR will
actually send any can alerts.
»To delete alert destinations:
- Login as the NFR user.
- Edit the resource definition file:
% vi $NFRHOME/etc/resources/fac_res.src
- Remove or comment out the definition for your facility:
# user defined facilities
#fax-sysadmin "Send Fax to Sys Admin";
- Make the NFR directory your current directory:
% cd $NFRHOME
- Rebuild the resource files:
% ./bin/buildres
- Stop and restart the alert daemon:
% ./bin/stop_alertd
% ./bin/start_alertd
- If desired, remove the configuration files for the facility in
$NFRHOME/etc/alertd/facilities.
- Use the GUI to ensure that no alerts sources or backends are configured to send alerts
to this destination.
|