Sei sulla pagina 1di 3

12/20/13

SOL3667 - Configuring alerts to send email notifications

Print

SOL3667: Configuring alerts to send email


notifications
How-To
Original Publication Date: 05/16/2007
Updated Date: 10/01/2013

Purpose
You should consider using this procedure under the following condition:
You want to configure the BIG-IP system to send email notifications for
certain SNMP trap alerts.

Prerequisites
You must meet the following prerequisites to use this procedure:

Applies To:Hide Versions


BIG-IP LTM
11.4.1, 11.4.0, 11.3.0, 11.2.1,
11.2.0, 11.1.0, 11.0.0, 10.2.4,
10.2.3, 10.2.2, 10.2.1, 10.2.0,
10.1.0, 10.0.1, 10.0.0, 9.6.1,
9.6.0, 9.4.8, 9.4.7, 9.4.6, 9.4.5,
9.4.4, 9.4.3, 9.4.2, 9.4.1, 9.4.0,
9.3.1, 9.3.0, 9.2.5, 9.2.4, 9.2.3,
9.2.2, 9.2.0, 9.1.3, 9.1.2, 9.1.1,
9.1.0, 9.0.5, 9.0.4, 9.0.3, 9.0.2,
9.0.1, 9.0.0
BIG-IP AFM
11.4.1, 11.4.0, 11.3.0
BIG-IP APM
11.4.1, 11.4.0, 11.3.0, 11.2.1,
11.2.0, 11.1.0, 11.0.0, 10.2.4,
10.2.3, 10.2.2, 10.2.1, 10.2.0,
10.1.0

BIG-IP ASM
11.4.1, 11.4.0, 11.3.0, 11.2.1,
11.2.0, 11.1.0, 11.0.0, 10.2.4,
10.2.3, 10.2.2, 10.2.1, 10.2.0,
SOL13180: Configuring the BIG-IP system to deliver locally-generated
10.1.0, 10.0.1, 10.0.0, 9.4.8,
email messages (11.x)
9.4.7, 9.4.6, 9.4.5, 9.4.4, 9.4.3,
9.4.2, 9.4.1, 9.4.0, 9.3.1, 9.3.0,
SOL3664: Configuring the BIG-IP system to deliver locally-generated
9.2.5, 9.2.4, 9.2.3, 9.2.2, 9.2.0
email messages (9.x - 10.x)

You must configure the BIG-IP system to communicate with an SMTP


mail server using the method appropriate for your BIG-IP version:

You must have command line access to the BIG-IP system.


You must have familiarity with a Linux text editor.

Description
SNMP traps provide a means of notification through external network
management systems (NMS) when certain events occur on the BIG-IP
system. In addition to the external NMS notification system, you can also
configure the BIG-IP SNMP agent to send email messages directly.

BIG-IP GTM
11.4.1, 11.4.0, 11.3.0, 11.2.1,
11.2.0, 11.1.0, 11.0.0, 10.2.4,
10.2.3, 10.2.2, 10.2.1, 10.2.0,
10.1.0, 10.0.1, 10.0.0, 9.4.8,
9.4.7, 9.4.6, 9.4.5, 9.4.4, 9.4.3,
9.4.2, 9.4.1, 9.4.0, 9.3.1, 9.3.0,
9.2.5, 9.2.4, 9.2.3, 9.2.2

Configuring SNMP trap alerts to send an email notification

BIG-IP Link Controller


11.4.1, 11.4.0, 11.3.0, 11.2.1,
11.2.0, 11.1.0, 11.0.0, 10.2.4,
10.2.3, 10.2.2, 10.2.1, 10.2.0,
10.1.0, 10.0.1, 10.0.0, 9.4.8,
9.4.7, 9.4.6, 9.4.5, 9.4.4, 9.4.3,
9.4.2, 9.4.1, 9.4.0, 9.3.1, 9.3.0,
9.2.5, 9.2.4, 9.2.3, 9.2.2

Testing the SNMP trap alerts

BIG-IP PEM
11.4.1, 11.4.0, 11.3.0

Procedures

BIG-IP PSM
11.4.1, 11.4.0, 11.3.0, 11.2.1,
Configuring SNMP trap alerts to send an email notification
11.2.0, 11.1.0, 11.0.0, 10.2.4,
10.2.3, 10.2.2, 10.2.1, 10.2.0,
Impact of procedure: Performing the following procedure should not have a
10.1.0, 10.0.1, 10.0.0, 9.4.8,
negative impact on your system.
9.4.7, 9.4.6, 9.4.5

1. Log in to the command line.

BIG-IP WebAccelerator
11.3.0, 11.2.1, 11.2.0, 11.1.0,
2. Back up the /etc/alertd/alert.conf file by typing the following command:
11.0.0, 10.2.4, 10.2.3, 10.2.2,
10.2.1, 10.2.0, 10.1.0, 10.0.1,
cp /etc/alertd/alert.conf /etc/alertd/alert.conf.SOL3667
10.0.0, 9.4.8, 9.4.7, 9.4.6, 9.4.5,
9.4.4, 9.4.3, 9.4.2, 9.4.1, 9.4.0
https://support.f5.com/kb/en-us/solutions/public/3000/600/sol3667.print.html

1/3

12/20/13

SOL3667 - Configuring alerts to send email notifications

3. Modify the permissions on the alert.conf file to include write access by


typing the following command:
chmod 644 /etc/alertd/alert.conf

4. Using a text editor, edit the /etc/alertd/alert.conf file.


Note: Customizations to the alert.conf file are not saved in the UCS
archive. To ensure customized files are saved when creating a UCS
archive, refer to SOL4422: Viewing and modifying the files that are
configured for inclusion in a UCS archive.
Note: If you are configuring an email notification for custom alerts that
you created using SOL3727: Configuring custom SNMP traps, edit the
/config/user_alert.conf file instead of the /etc/alertd/alert.conf file.
This file consists of numerous alert definitions in the following format:

BIG-IP WOM
11.3.0, 11.2.1, 11.2.0, 11.1.0,
11.0.0, 10.2.4, 10.2.3, 10.2.2,
10.2.1, 10.2.0, 10.1.0, 10.0.1,
10.0.0
Enterprise Manager
3.1.1, 3.1.0, 3.0.0, 2.3.0, 2.2.0,
2.1.0, 2.0.0, 1.8.0, 1.7.0, 1.6.0,
1.4.1, 1.4.0, 1.2.2, 1.2.1, 1.2.0,
1.0.0
BIG-IP AAM
11.4.1, 11.4.0
BIG-IP Edge Gateway
11.3.0, 11.2.1, 11.2.0, 11.1.0,
11.0.0, 10.2.4, 10.2.3, 10.2.2,
10.2.1, 10.2.0, 10.1.0

alert <ALERT_NAME> {
snmptrap OID="<OID>"
}

The alert definitions may appear similar to the following example:


alert BIGIP_SHELL_BP_CONFIGURATION_LOADED {
snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.28"
}

For each alert definition for which you want to receive email notification, add a semicolon ( ; ) to the end of
the existing snmptrap line, and then add the following lines between the snmptrap line and the terminating
curly brace:
email toaddress=""
fromaddress=""
body=""

For example, the following modified alert sends an email notification using the configured email toaddress,
fromaddress, and body options:
alert BIGIP_SHELL_BP_CONFIGURATION_LOADED {
snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.28";
email toaddress="demo@askf5.com"
fromaddress="root"
body="The test of this Solution worked!"
}

Note: You can send the email notifications to multiple recipients by separating the email addresses
specified in the email toaddress option with a comma ( , ), as shown in the following example:
email toaddress="demo@askf5.com,demo2@askf5.com"

5. Save and exit the file.


6. Restore the permissions on the alert.conf file by typing the following command:
chmod 444 /etc/alertd/alert.conf

7. Restart the alertd process by typing the following command:


bigstart restart alertd

Testing the SNMP trap alerts


https://support.f5.com/kb/en-us/solutions/public/3000/600/sol3667.print.html

2/3

12/20/13

SOL3667 - Configuring alerts to send email notifications

Impact of procedure: Performing the following procedure should not have a negative impact on your system.
The alert example in this article is triggered when the BIG-IP system loads the configuration. If you have
customized this alert to send email notifications, you can trigger this alert to test whether the alertd process
will send you an email notification by entering the bigpipe load command to reload the configuration. For
more information about testing email alerts, refer to the following article that is appropriate for the BIG-IP
version you are running:
SOL11127: Testing SNMP traps on BIG-IP (9.4.x - 11.x)
SOL7165: Testing SNMP traps on BIG-IP (9.0.0 - 9.3.x)
When the alert is triggered, the BIG-IP system will send an email notification that appears similar to the
following example:
-----Original Message----From: root@bigip1.askf5.com
Sent: Monday, December 25, 2007 12:10 PM
To: demo@askf5.com
Subject: 010a0043:5: The configuration was successfully loaded.
The test of this Solution worked!
---END---

Note: The BIG-IP system appends the local host name to the configured fromaddress field to derive the
FQDN for inclusion in the From: address.

Supplemental Information
SOL4422: Viewing and modifying the files that are configured for inclusion in a UCS archive
SOL3727: Configuring custom SNMP traps

https://support.f5.com/kb/en-us/solutions/public/3000/600/sol3667.print.html

3/3

Potrebbero piacerti anche