- Table of Contents
-
- 09-Network Management Configuration Guide
- 00-Preface
- 01-System Maintenance and Debugging Configuration
- 02-NQA Configuration
- 03-NTP Configuration
- 04-IPC Configuration
- 05-SNMP Configuration
- 06-RMON Configuration
- 07-Mirroring Configuration
- 08-Information Center Configuration
- 09-sFlow Configuration
- 10-Flow Log Configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
08-Information Center Configuration | 161.42 KB |
Configuring the information center
Classification of system information
Output channels and destinations
Default output rules of system information
Information center configuration task list
Outputting system information to the console
Outputting system information to the monitor terminal
Outputting system information to a log host
Outputting system information to the trap buffer
Outputting system information to the log buffer
Outputting system information to the SNMP module
Outputting system information to the Web interface
Saving system information to the log file
Enabling synchronous information output
Disabling a port from generating link up or link down logs
Filtering system information by using regular expression
Displaying and maintaining information center
Information center configuration examples
Outputting log information to the console
Outputting log information to a UNIX log host
Outputting log information to a Linux log host
Configuring the information center
The information center on a device classifies and manages system information for all modules so that network administrators can monitor network performance and troubleshoot network problems.
Overview
The information center receives system information generated by source modules and outputs the information to different destinations according to user-defined output rules. You can classify, filter, and output system information based on source modules. To view the supported source modules, use info-center source ?.
Figure 1 Information center diagram
By default, the information center is enabled. It affects system performance to some degree when processing large amounts of information. If the system resources are insufficient, disable the information center to save resources.
Classification of system information
System information falls into the following types:
· Log information—Describes user operations and interface state changes.
· Trap information—Describes device faults such as authentication and network failures.
· Debug information—Displays device running status for troubleshooting.
Source modules refer to protocol modules, board drivers, and configuration modules which generate system information. You can classify, filter, and output system information based on source modules. To view the supported source modules, use the info-center source ? command.
System information levels
System information is classified into eight severity levels, from 0 through 7 in descending order. The device outputs the system information with a severity level that is higher than or equal to the specified level. For example, if you configure an output rule with a severity level of 6 (informational), information that has a severity level from 0 to 6 is output.
Table 1 System information levels
Severity |
Severity value |
Description |
Corresponding keyword in commands |
Emergency |
0 |
The system is unusable. For example, the system authorization has expired. |
emergencies |
Alert |
1 |
Action must be taken immediately to solve a serious problem. For example, traffic on an interface exceeds the upper limit. |
alerts |
Critical |
2 |
Critical condition. For example, the device temperature exceeds the upper limit, the power module fails or the fan tray fails. |
critical |
Error |
3 |
Error condition. For example, the link state changes or a storage card is unplugged. |
errors |
Warning |
4 |
Warning condition. For example, an interface is disconnected, or the memory resources are used up. |
warnings |
Notification |
5 |
Normal but significant condition. For example, a terminal logs in to the device, or the device reboots. |
notifications |
Informational |
6 |
Informational message. For example, a command or a ping operation is executed. |
informational |
Debug |
7 |
Debugging message. |
debugging |
Output channels and destinations
Table 2 shows the output channels and destinations.
The system supports ten channels. By default, channels 0 through 6, and channel 9 are configured with channel names and output destinations. You can change these default settings as needed. You can also configure channels 7 and 8 and associate them with specific output destinations as needed.
You can use the info-center channel name command to change the name of an information channel.
Each output destination receives information from only one information channel, but each information channel can output information to multiple output destinations.
Table 2 Default information channels and output destinations
Channel number |
Default channel name |
Default output destination |
System information received by default |
0 |
console |
Console |
Log, trap, and debug information |
1 |
monitor |
Monitor terminal |
Log, trap, and debug information |
2 |
loghost |
Log host |
Log, trap, and debug information |
3 |
trapbuffer |
Trap buffer |
Trap information |
4 |
logbuffer |
Log buffer |
Log information |
5 |
snmpagent |
SNMP module |
Trap information |
6 |
channel6 |
Web interface |
Log information |
7 |
channel7 |
Not specified |
Log, trap, and debug information |
8 |
channel8 |
Not specified |
Log, trap, and debug information |
9 |
channel9 |
Log file |
Log, trap, and debug information |
Default output rules of system information
A default output rule specifies the system information source modules, information type, and severity levels for an output destination. Table 3 shows the default output rules.
Destination |
Source modules |
Log |
Trap |
Debug |
|||
Status |
Severity |
Status |
Severity |
Status |
Severity |
||
Console |
All supported modules |
Enabled |
Informational |
Enabled |
Debug |
Enabled |
Debug |
Monitor terminal |
All supported modules |
Enabled |
Informational |
Enabled |
Debug |
Enabled |
Debug |
Log host |
All supported modules |
Enabled |
Informational |
Enabled |
Debug |
Disabled |
Debug |
Trap buffer |
All supported modules |
Disabled |
Informational |
Enabled |
Informational |
Disabled |
Debug |
Log buffer |
All supported modules |
Enabled |
Informational |
Disabled |
Debug |
Disabled |
Debug |
SNMP module |
All supported modules |
Disabled |
Debug |
Enabled |
Informational |
Disabled |
Debug |
Web interface |
All supported modules |
Enabled |
Debug |
Enabled |
Debug |
Disabled |
Debug |
Log file |
All supported modules |
Enabled |
Debug |
Enabled |
Debug |
Disabled |
Debug |
System information formats
The following shows the original format of system information, which may be different from what you see. The actual system information format depends on the log resolution tool you use.
The format of system information displayed on the Web interface depends on the Web interface.
Formats
The system information formats vary with output destinations. See Table 4.
Table 4 System information formats
Output destination |
Format |
Example |
Console, monitor terminal, logbuffer, trapbuffer, SNMP module, or log file |
timestamp sysname module/level/digest: content |
%Jun 26 17:08:35:809 2008 Sysname SHELL/4/LOGIN: VTY login from 1.1.1.1. |
Log host |
· H3C format: · UNICOM format: |
· H3C format: · UNICOM format: ¡ <186>Oct 13 16:48:08 2000 Sysname 10IFNET/2/210231a64jx073000020: log_type=port;content=Vlan-interface1 link status is DOWN. ¡ <186>Oct 13 16:48:08 2000 Sysname 10IFNET/2/210231a64jx073000020: log_type=port;content=Line protocol on the interface Vlan-interface1 is DOWN. |
Field description
Field |
Description |
PRI (priority) |
The priority is calculated by using this formula: facility*8+level, where: · facility is the facility name. Facility names can be configured by using the info-center loghost command. It is used to identify different log sources on the log host, and to query and filter logs from specific log sources. · level is in the range of 0 to 7. See Table 1 for more information. Note that the priority field is available only for information that is sent to the log host. |
Timestamp |
The timestamp records the time when the log was generated. Logs sent to the log host and those sent to the other destinations have different precisions, and their timestamp formats are configured with different commands. For more information, see Table 5 and Table 6. |
Sysname (host name or host IP address) |
· If the system information that is sent to a log host is in the UNICOM format, and the info-center loghost source command is configured, the sysname field is displayed as the IP address of the device that generated the system information. · If the system information is in the H3C format, the field is displayed as the system name of the device that generated the system information. You can use the sysname command to modify the local system name. For more information, see Fundamentals Command Reference. |
%% (vendor ID) |
This field indicates that the information was generated by an H3C device. It exists only in logs sent to a log host. |
vv (version information) |
This field identifies the version of the log, and has a value of 10. It exists only in logs sent to the log host. |
Module |
This field specifies source module name. You can execute the info-center source ? command in system view to view the module list. |
Level (severity) |
System information is divided into eight severity levels, from 0 to 7. See Table 1 for more information about severity levels. You cannot change the system information levels generated by modules. However, you can use the info-center source command to control the output of system information based on severity levels. |
Digest |
This field briefly describes the content of the system information. It contains a string of up to 32 characters. For system information destined to the log host: · If the string ends with (l), the information is log information. · If the string ends with (t), the information is trap information. · If the string ends with (d), the information is debug information. |
Serial Number |
This field indicates the serial number of the device that generated the system information. It is displayed only if the system information sent to the log host is in the UNICOM format. |
source |
This optional field identifies the source of the information. It is displayed only if the system information is sent to a log host in H3C format. It can take one of the following values: · Slot number of a card. · IP address of the log sender. |
content |
This field contains the content of the system information. |
Table 5 Timestamp precisions and configuration commands
Item |
Destined to the log host |
Destined to the console, monitor terminal, log buffer, and log file |
Precision |
Seconds |
Milliseconds |
Command used to set the timestamp format |
info-center timestamp loghost |
info-center timestamp |
Table 6 Description of the timestamp parameters
Timestamp parameters |
Description |
Example |
boot |
Time since system startup, in the format of xxx.yyy. xxx represents the higher 32 bits, and yyy represents the lower 32 bits, of milliseconds elapsed. System information sent to all destinations other than log host supports this parameter. |
%0.109391473 Sysname FTPD/5/FTPD_LOGIN: User ftp (192.168.1.23) has logged in successfully. 0.109391473 is a timestamp in the boot format. |
date |
Current date and time, in the format of mm dd hh:mm:ss:xxx yyy. All system information supports this parameter. |
%May 30 05:36:29:579 2003 Sysname FTPD/5/FTPD_LOGIN: User ftp (192.168.1.23) has logged in successfully. May 30 05:36:29:579 2003 is a timestamp in the date format. |
iso |
Timestamp format stipulated in ISO 8601. Only system information that is sent to the log host supports this parameter. |
<189>2003-05-30T06:42:44 Sysname %%10FTPD/5/FTPD_LOGIN(l): User ftp (192.168.1.23) has logged in successfully. 2003-05-30T06:42:44 is a timestamp in the iso format. |
none |
No timestamp is included. All system information supports this parameter. |
% Sysname FTPD/5/FTPD_LOGIN: User ftp (192.168.1.23) has logged in successfully. No timestamp is included. |
no-year-date |
Current date and time without year information, in the format of mm dd hh:mm:ss:xxx. Only the system information that is sent to the log host supports this parameter. |
<189>May 30 06:44:22 Sysname %%10FTPD/5/FTPD_LOGIN(l): User ftp (192.168.1.23) has logged in successfully. May 30 06:44:22 is a timestamp in the no-year-date format. |
Information center configuration task list
Task |
Remarks |
Optional. |
|
Optional. |
|
Optional. |
|
Optional. |
|
Optional. |
|
Optional. |
|
Optional. |
|
Optional. |
|
Optional. |
|
Optional. |
|
Optional. |
Configurations for the information output destinations function independently.
Outputting system information to the console
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable the information center. |
info-center enable |
Optional. Enabled by default. |
3. Name the channel with a specified channel number. |
info-center channel channel-number name channel-name |
Optional. See Table 2 for default channel names. |
4. Configure an output channel for the console. |
info-center console channel { channel-number | channel-name } |
Optional. By default, system information is output to the console through channel 0 (console). |
5. Configure an output rule for the console. |
info-center source { module-name | default } channel { channel-number | channel-name } [ debug { level severity | state state } * | log { level severity | state state } * | trap { level severity | state state } * ] * |
Optional. |
6. Configure the timestamp format. |
info-center timestamp { debugging | log | trap } { boot | date | none } |
Optional. By default, the timestamp format for log, trap and debug information is date. |
7. Return to user view. |
quit |
N/A |
8. Enable system information output to the console. |
terminal monitor |
Optional. The default setting is enabled. |
9. Enable the display of system information on the console. |
· Enable the display of debug information
on the console: · Enable the display of log information
on the console: · Enable the display of trap information
on the console: |
Optional. By default, the console displays log and trap information, and discards debug information. |
Outputting system information to the monitor terminal
Monitor terminals refer to terminals that log in to the device through the AUX, VTY, or TTY user interface.
To output system information to the monitor terminal:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable the information center. |
info-center enable |
Optional. Enabled by default. |
3. Name the channel with a specified channel number. |
info-center channel channel-number name channel-name |
Optional. See Table 2 for default channel names. |
4. Configure an output channel for the monitor terminal. |
info-center monitor channel { channel-number | channel-name } |
Optional. By default, system information is output to the monitor terminal through channel 1 (known as monitor). |
5. Configure an output rule for the monitor terminal. |
info-center source { module-name | default } channel { channel-number | channel-name } [ debug { level severity | state state } * | log { level severity | state state } * | trap { level severity | state state } * ] * |
Optional. |
6. Configure the timestamp format. |
info-center timestamp { debugging | log | trap } { boot | date | none } |
Optional. By default, the timestamp format for log, trap and debug information is date. |
7. Return to user view. |
quit |
N/A |
8. Enable system information output to the monitor terminal. |
terminal monitor |
The default setting is disabled. You must execute this command before you can enable the display of debugging, log, and trap information on the monitor terminal. |
9. Enable the display of system information on a monitor terminal. |
· Enable the display of debug information
on a monitor terminal: · Enable the display of log information
on a monitor terminal: · Enable the display of trap information
on a monitor terminal: |
Optional. By default, the monitor terminal displays log and trap information, and discards debug information. |
Outputting system information to a log host
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable the information center. |
info-center enable |
Optional. Enabled by default. |
3. Name the channel with a specified channel number. |
info-center channel channel-number name channel-name |
Optional. See Table 2 for default channel names. |
4. Configure an output rule for the log host. |
info-center source { module-name | default } channel { channel-number | channel-name } [ debug { level severity | state state } * | log { level severity | state state } * | trap { level severity | state state } * ] * |
Optional. |
5. Specify the source IP address for the log information. |
info-center loghost source interface-type interface-number |
Optional. By default, the source IP address of output log information is the primary IP address of the matching route' egress interface. |
6. Configure the timestamp format for system information output to a log host. |
info-center timestamp loghost { date | iso | no-year-date | none } |
Optional. date by default. |
7. Set the format of the system information sent to a log host. |
info-center format { cmcc |unicom } |
Optional. Use either method. By default, system information is sent to log hosts in H3C format. |
8. Specify a log host and configure related parameters. |
info-center loghost { host-ipv4-address | host-name | ipv6 host-ipv6-address } [ port port-number ] [ channel { channel-number | channel-name } | facility local-number ] * |
By default, no log host or related parameters are specified. If no channel is specified when outputting system information to a log host, the system uses channel 2 (loghost) by default. The value of the port-number argument must be the same as the value configured on the log host. Otherwise, the log host cannot receive system information. |
Outputting system information to the trap buffer
The trap buffer only receives trap information, and discards log and debug information.
To output system information to the trap buffer:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable the information center. |
info-center enable |
Optional. Enabled by default. |
3. Name the channel with a specified channel number. |
info-center channel channel-number name channel-name |
Optional. See Table 2 for default channel names. |
4. Configure an output channel for the trap buffer and set the buffer size. |
info-center trapbuffer [ channel { channel-number | channel-name } | size buffersize ] * |
Optional. By default, system information is output to the trap buffer through channel 3 (known as trapbuffer) and the default buffer size is 256. |
5. Configure an output rule for the trap buffer. |
info-center source { module-name | default } channel { channel-number | channel-name } [ debug { level severity | state state } * | log { level severity | state state } * | trap { level severity | state state } * ] * |
Optional. |
6. Configure the timestamp format. |
info-center timestamp { debugging | log | trap } { boot | date | none } |
Optional. The timestamp format for log, trap and debug information is date by default. |
Outputting system information to the log buffer
The log buffer only receives log information, and discards trap and debug information.
To output system information to the log buffer:
Step |
Command |
Remarks |
1. Enter system view. |
N/A |
|
2. Enable the information center. |
info-center enable |
Optional. Enabled by default. |
3. Name the channel with a specified channel number. |
info-center channel channel-number name channel-name |
Optional. See Table 2 for default channel names. |
4. Configure an output channel for the log buffer and set the buffer size. |
info-center logbuffer [ channel { channel-number | channel-name } | size buffersize ] * |
Optional. By default, system information is output to the log buffer through channel 4 (known as logbuffer) and the default buffer size is 512. |
5. Configure an output rule for the log buffer. |
info-center source { module-name | default } channel { channel-number | channel-name } [ debug { level severity | state state } * | log { level severity | state state } * | trap { level severity | state state } * ] * |
Optional. |
6. Configure the timestamp format. |
info-center timestamp { debugging | log | trap } { boot | date | none } |
Optional. The timestamp format for log, trap and debug information is date by default. |
Outputting system information to the SNMP module
The SNMP module only receives trap information, and discards log and debug information.
To monitor the device running status, trap information is usually sent to the SNMP network management system (NMS). For this purpose, you must configure output of traps to the SNMP module, and set the trap sending parameters for the SNMP module. For more information about SNMP, see "Configuring SNMP."
To output system information to the SNMP module:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable the information center. |
info-center enable |
Optional. Enabled by default. |
3. Name the channel with a specified channel number. |
info-center channel channel-number name channel-name |
Optional. See Table 2 for default channel names. |
4. Configure an output channel for the SNMP module. |
info-center snmp channel { channel-number | channel-name } |
Optional. By default, system information is output to the SNMP module through channel 5 (known as snmpagent). |
5. Configure an output rule for the SNMP module. |
info-center source { module-name | default } channel { channel-number | channel-name } [ debug { level severity | state state } * | log { level severity | state state } * | trap { level severity | state state } * ] * |
Optional. |
6. Configure the timestamp format. |
info-center timestamp { debugging | log | trap } { boot | date | none } |
Optional. The timestamp format for log, trap and debug information is date by default. |
Outputting system information to the Web interface
The Web interface only receives log information, and discards trap and debug information.
This feature allows you to control whether to output system information to the Web interface and, if so, which system information can be output to the Web interface. The Web interface provides abundant search and sorting functions. If you output system information to the Web interface, you can view the system information by clicking corresponding tabs after logging in to the device through the Web interface.
To output system information to the Web interface:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable the information center. |
info-center enable |
Optional. Enabled by default. |
3. Name the channel with a specified channel number. |
info-center channel channel-number name channel-name |
Optional. See Table 2 for default channel names. |
4. Configure an output channel for the Web interface. |
info-center syslog channel { channel-number | channel-name } |
Optional. By default, system information is output to the Web interface through channel 6. |
5. Configure an output rule for the Web interface. |
info-center source { module-name | default } channel { channel-number | channel-name } [ debug { level severity | state state }* | log { level severity | state state }* | trap { level severity | state state }* ]* |
Optional. |
6. Configure the timestamp format. |
info-center timestamp { debugging | log | trap } { boot | date | none } |
Optional. The timestamp format for log, trap and debug information is date by default. |
Saving system information to the log file
Support for this feature depends on the device model. For more information, see About the H3C Access Controllers Configuration Guides.
Perform this task to enable saving system information to the log file at a specific interval, or manually save system information to the log file.
System information is saved into the log file buffer first. The device writes the information from the log file buffer to the log file at the specified interval. You can also manually save the information while the device is not busy. After saving system information from the log file buffer to the log file, the system clears the log file buffer.
The log file has a specific capacity. When the capacity is reached, the system deletes the earliest messages and writes new messages into the log file. Typically, the log file is saved in the directory /logfile/logfile.log.
To enable saving system information to the log file:
Step |
Command |
Remarks |
|
1. Enter system view. |
system-view |
N/A |
|
2. Enable the information center. |
info-center enable |
Optional. Enabled by default. |
|
3. Enable the log file feature. |
info-center logfile enable |
Optional. Enabled by default. |
|
4. Configure the interval at which the system saves information to the log fie. |
info-center logfile frequency freq-sec |
Optional. The default saving interval is 86400 seconds. |
|
5. Enable log file overwrite-protection. |
info-center logfile overwrite-protection |
Optional. By default, log file overwrite-protection is disabled. This feature is supported only in FIPS mode. |
|
6. Configure the maximum size of the log file. |
info-center logfile size-quota size |
Optional. To ensure normal operation of the device, set the size argument to a value between 1 MB and 10 MB. |
|
7. Configure the directory to save the log file. |
info-center logfile switch-directory dir-name |
Optional. By default, the log file is saved in the logfile directory under the root directory of the storage device (the root directory of a storage device varies by device). The configuration made by this command cannot survive a system reboot. |
|
8. Manually save system information from the log file buffer to the log file. |
logfile save |
Optional. Available in any view. By default, the system saves system information in the log file buffer to the log file at the interval configured by the info-center logfile frequency command. |
|
Enabling synchronous information output
The output of system logs interrupts ongoing configuration operations. You have to find the previously input commands before the logs. Synchronous information output can show the previous input after log output and a command prompt in command editing mode, or a [Y/N] string in interaction mode so you can continue your operation from where you were stopped.
If system information, such as log information, is output before you input any information under the current command line prompt, the system does not display the command line prompt after the system information output.
If system information is output when you are inputting some interactive information (non-Y/N confirmation information), the system displays your previous input in a new line but does not display the command line prompt.
To enable synchronous information output:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable synchronous information output. |
info-center synchronous |
Disabled by default. |
Disabling a port from generating link up or link down logs
By default, all the ports on a device generate link up or link down logs when the port state changes. In some cases, you might want to disable specific ports from generating this information. For example:
· You are concerned only about the states of some ports. In this case, you can use this function to disable other ports from generating link up and link down logs.
· A port is unstable and continuously outputs log information. In this case, you can disable the port from generating link up and link down logs.
Use the default setting in normal cases to avoid affecting port status monitoring.
To disable a port from generating link up or link down logs:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Layer 2 Ethernet interface view, Layer 3 Ethernet interface view, or VLAN interface view. |
interface interface-type interface-number |
N/A |
3. Disable the port from generating link up or link down logs. |
undo enable log updown |
By default, all port generate link up or link down logs when the state changes. |
Filtering system information by using regular expression
In FIPS mode, you can configure a regular expression for a channel to filter system information output to that channel.
To configure a regular expression for a channel:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Configure a regular expression for a channel. |
info-center filter channel channelNum { exclude | include } regular-expression |
By default, no regular expression is configured for a channel. Do not configure complicated regular expressions such as .*.*.*/. for a channel. Otherwise, system information filtering might fail, and the performance of the information center will be afffected. You cannot configure regular expressions for channels that output system information to the SNMP module, Web interface, or the NETCONF module. |
Displaying and maintaining information center
Task |
Command |
Remarks |
Display information about information channels. |
display channel [ channel-number | channel-name ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display information center configuration. |
display info-center [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display the state and the log information of the log buffer. |
display logbuffer [ reverse ] [ level severity | size buffersize ] * [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display a summary of the log buffer. |
display logbuffer summary [ level severity ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display the content of the log file buffer. |
display logfile buffer [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display the log file configuration. |
display logfile summary [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display the state and the trap information of the trap buffer. |
display trapbuffer [ reverse ] [ size buffersize ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Clear the log buffer. |
reset logbuffer |
Available in user view. |
Clear the trap buffer. |
reset trapbuffer |
Available in user view. |
Information center configuration examples
Outputting log information to the console
Network requirements
Configure the AC to send ARP and IP log information that has a severity level of at least informational to the console.
Figure 2 Network diagram
Configuration procedure
# Enable the information center.
<AC> system-view
[AC] info-center enable
# Use channel console to output log information to the console. (This step is optional because it is the default setting.)
[AC] info-center console channel console
# To avoid output of unnecessary information, disable the output of log, trap, and debug information of all modules on channel console.
[AC] info-center source default channel console debug state off log state off trap state off
# Configure an output rule to enable the AC to send ARP and IP log information that has a severity level of at least informational to the console.
[AC] info-center source arp channel console log level informational state on
[AC] info-center source ip channel console log level informational state on
[AC] quit
# Enable the display of log information on the console. (This function is enabled by default.)
<AC> terminal monitor
Info: Current terminal monitor is on.
<AC> terminal logging
Info: Current terminal logging is on.
Now, if the ARP and IP modules generate log information, the information center automatically sends the log information to the console.
Outputting log information to a UNIX log host
Network requirements
Configure the AC to send ARP and IP log information that has a severity level of at least informational to the UNIX log host at 1.2.0.1/16.
Figure 3 Network diagram
Configuration procedure
Before the configuration, make sure the AC and the log host can reach each other. (Details not shown.)
1. Configure the AC:
# Enable the information center.
<AC> system-view
[AC] info-center enable
# Specify the log host 1.2.0.1/16, use channel loghost to output log information (optional, loghost by default), and specify local4 as the logging facility.
[AC] info-center loghost 1.2.0.1 channel loghost facility local4
# To avoid outputting unnecessary information, disable the output of log, trap, and debug information of all modules on channel loghost.
[AC] info-center source default channel loghost debug state off log state off trap state off
# Configure an output rule to enable the AC to output to the log host ARP and IP log information that has a severity level of at least informational.
[AC] info-center source arp channel loghost log level informational state on trap state off
[AC] info-center source ip channel loghost log level informational state on trap state off
2. Configure the log host:
The following configurations were performed on SunOS 4.0 which has similar configurations to the UNIX operating systems implemented by other vendors.
a. Log in to the log host as a root user.
b. Create a subdirectory named AC in directory /var/log/, and then create file info.log in the AC directory to save logs from the AC.
# mkdir /var/log/AC
# touch /var/log/AC/info.log
c. Edit the file syslog.conf in directory /etc/ and add the following contents.
# AC configuration messages
local4.info /var/log/AC/info.log
In this configuration, local4 is the name of the logging facility that the log host uses to receive logs. info is the informational level. The UNIX system records the log information that has a severity level of at least informational to the file /var/log/AC/info.log.
|
NOTE: Be aware of the following issues while editing file /etc/syslog.conf: · Comments must be on a separate line and must begin with a pound sign (#). · No redundant spaces are allowed after the file name. · The logging facility name and the information level specified in the /etc/syslog.conf file must be identical to those configured on the AC by using the info-center loghost and info-center source commands. Otherwise the log information might not be output properly to the log host. |
d. Display the process ID of syslogd, kill the syslogd process, and then restart syslogd using the –r option to make the new configuration take effect.
# ps -ae | grep syslogd
147
# kill -HUP 147
# syslogd -r &
Now, the system can record log information into the log file.
Outputting log information to a Linux log host
Network requirements
Configure the AC to send log information that has a severity level of at least informational to the Linux log host at 1.2.0.1/16.
Figure 4 Network diagram
Configuration procedure
Before the configuration, make sure the AC and the log host can reach each other. (Details not shown.)
1. Configure the AC:
# Enable the information center.
<Sysname> system-view
[Sysname] info-center enable
# Specify the host 1.2.0.1/16 as the log host, use the channel loghost to output log information (optional, loghost by default), and specify local5 as the logging facility.
[Sysname] info-center loghost 1.2.0.1 channel loghost facility local5
# Configure an output rule to enable the AC to output log information that has a severity level of at least informational to the log host, and disable the output of trap and debug information.
[Sysname] info-center source default channel loghost log level informational state on debug state off trap state off
2. Configure the log host:
a. Log in to the log host as a root user.
b. Create a subdirectory named AC in the directory /var/log/, and create file info.log in the AC directory to save logs from the AC.
# mkdir /var/log/AC
# touch /var/log/AC/info.log
c. Edit the file syslog.conf in the directory /etc/ and add the following contents.
# AC configuration messages
local5.info /var/log/AC/info.log
In this configuration, local5 is the name of the logging facility used by the log host to receive logs. info is the information level. The Linux system will record the log information with severity level equal to or higher than informational to file /var/log/AC/info.log.
|
NOTE: Be aware of the following issues while editing file /etc/syslog.conf: · Comments must be on a separate line and must begin with a pound sign (#). · No redundant spaces are allowed after the file name. · The logging facility name and the information level specified in the /etc/syslog.conf file must be identical to those configured on the AC by using the info-center loghost and info-center source commands. Otherwise the log information might not be output properly to the log host. |
d. Display the process ID of syslogd, kill the syslogd process, and then restart syslogd using the –r option to make the new configuration take effect.
# ps -ae | grep syslogd
147
# kill -9 147
# syslogd -r &
Make sure the syslogd process is started with the -r option on a Linux log host.
Now, the system can record log information into the log file.