Emailing Log Messages

This section contains the following topics:

     Overview of Email Logging

     Boolean Operators

     Configuring Email Log Settings

Overview of Email Logging

You can configure the ACOS device to email log messages, using email log filters. By default, emailing of log messages is dis­abled.

Log email filters consist of the following parameters:

     Filter ID – Filter number, 1-8.

     Conditions – One or more of the following:

     Severity – Severity levels of messages to send in email. If you do not specify a message level, messages of any sever­ity level match the filter and can be emailed.

     Software Module – Software modules for which to email messages. Messages are emailed only if they come from one of the specified software modules. If you do not specify a software module, messages from all modules match the filter and can be emailed.

     Regular Expression (Patterns and Operators) – Message text to match on. Standard regular expression syntax is sup­ported. Only messages that meet the criteria of the regular expression can be emailed. The regular expression can be a simple text string or a more complex expression using standard regular expression logic. If you do not specify a regular expression, messages with any text match the filter and can be emailed.

The operators (AND, OR, NOT) specify how the conditions should be compared. (See Boolean OperatorsBoolean OperatorsBoolean Operators”.)

     Trigger option – Specifies whether to buffer matching messages or send them immediately.

Boolean Operators

A logging email filter consists of a set of conditions joined by Boolean expressions (AND / OR / NOT).

The CLI Boolean expression syntax is based on Reverse Polish Notation (also called Postfix Notation), a notation method that places an operator (AND, OR, NOT) after all of its operands (in this case, the conditions list).

After listing all the conditions, specify the Boolean operator(s). The following operators are supported:

     AND – All conditions must match in order for a log message to be emailed.

     OR – Any one or more of the conditions must match in order for a log message to be emailed.

     NOT – A log message is emailed only if it does not match the conditions

(For more information about Reverse Polish Notation, see the following link: http://en.wikipedia.org/wiki/Reverse_Polish_no­tation.)

Configuring Email Log Settings

This section contains the following:

     Use the GUI to Configure Email Logging Settings

     Use the CLI to Configure Email Logging Settings

Use the GUI to Configure Email Logging Settings

To configure Email logging settings in the GUI:

1.     Hover over System in the navigation bar, and click Settings.

2.     Click Logging in the menu bar.

3.     In the Level field, select the log level you want to enable.

4.     The Buffer field contains two optional configuration choices:

a.     To change the maximum number of log messages to buffer before sending them in email, edit the number in the field on the left. You can specify 16-256 messages. The default is 50.

b.     To change the number of minutes the ACOS device waits before sending all buffered messages, edit the number in the field on the right. This option takes effect if the buffer does not reach the maximum number of messages allowed. You can specify 10-1440 minutes. The default is 10.

5.     In the Email Addresses field, specify the Email addresses to which the log files will be sent.

6.     In the Filters section:

a.     Specify a filter ID (1-8) and regular expression filter in the Filter section.

b.     To immediately send matching messages in an email instead of buffering them, select Trigger. Otherwise, matching messages are buffered until the message buffer becomes full or the send timer for emailed log messages expires.

c.     Click Save Filter.

d.     Repeat the process if you want to create multiple filters.

7.     When finished configuring log settings, click the OK button at the bottom of the page.

Use the CLI to Configure Email Logging Settings

This section contains CLI examples of Email logging configuration.

The following command configures the ACOS device to buffer log messages to be emailed. Messages will be emailed only when the buffer reaches 32 messages, or 30 minutes passes since the previous log message email, whichever happens first.

ACOS(config)# logging email buffer number 32 time 30

 

The following command resets the buffer settings to their default values.

ACOS(config)# no logging email buffer number time

 

The following command configures a filter that matches on log messages if they are information-level messages and contain the string “abc”. The trigger option is not used, so the messages will be buffered rather than emailed immediately.

ACOS(config)# logging email filter 1 level information pattern "abc" and

 

The following command reconfigures the filter to immediately email matching messages.

ACOS(config)# logging email filter 1 level information pattern "abc" and trigger

 

Table of Contents

Index

Glossary

-Search-

Back