29-Information Center Configuration
Chapters Download (173.23 KB)
Table of Contents
When configuring information center, go to these sections for information you are interested in:
l Information Center Configuration
l Configuring Information Center
l Displaying and Maintaining Information Center
l Information Center Configuration Examples
Acting as the system information hub, information center classifies and manages system information, offering a powerful support for network administrators and developers in monitoring network performance and diagnosing network problems.
The following describes the working process of information center:
l Receives the log, trap, and debugging information generated by each module.
l Outputs the above information to different information channels according to the user-defined output rules.
l Outputs the information to different destinations based on the information channel-to-destination associations.
To sum up, information center assigns the log, trap and debugging information to the ten information channels according to the eight severity levels and then outputs the information to different destinations. The following describes the working process in details.
By default, the information center is enabled. An enabled information center affects the system performance in some degree due to information classification and output. Such impact becomes more obvious in the event that there is enormous information waiting for processing.
The system information of the information center falls into three types:
l Log information
l Trap information
l Debugging information
The information is classified into eight levels by severity. The severity levels in the descending order are emergency, alert, critical, error, warning, notice, informational and debug. When the system information is output by level, the information with severity level higher than or equal to the specified level is output. For example, in the output rule, if you configure to output information with severity level being informational, the information with severity level being emergency through informational is all allowed to be output.
Table 1-1 Severity description
Severity |
Severity value |
Description |
Emergency |
0 |
The system is unusable. |
Alert |
1 |
Action must be taken immediately |
Critical |
2 |
Critical conditions |
Error |
3 |
Error conditions |
Warning |
4 |
Warning conditions |
Notice |
5 |
Normal but significant condition |
Informational |
6 |
Informational messages |
Debug |
7 |
Debug-level messages |
The system supports six information output destinations, including the console, monitor terminal (monitor), log buffer, log host, trap buffer and SNMP module.
The system supports ten channels. The six channels 0 through 5 are configured with channel names, output rules, and are associated with output destinations by default. The channel names, output rules and the associations between the channels and output destinations can be changed through commands. Besides, you can configure channels 6, 7, 8 and 9 without changing the default configuration of the six channels.
Table 1-2 Information channels and output destinations
Information channel number |
Default channel name |
Default output destination |
0 |
console |
Console (Receives log, trap and debugging information) |
1 |
monitor |
Monitor terminal (Receives log, trap and debugging information, facilitating remote maintenance) |
2 |
loghost |
Log host (Receives log, trap and debugging information and information will be stored in files for future retrieval.) |
3 |
trapbuffer |
Trap buffer (Receives trap information, a buffer inside the router for recording information.) |
4 |
logbuffer |
Log buffer (Receives log and debugging information, a buffer inside the router for recording information.) |
5 |
snmpagent |
SNMP module (Receives trap information) |
6 |
channel6 |
Not specified (Receives log, trap, and debugging information) |
7 |
channel7 |
Not specified (Receives log, trap, and debugging information) |
8 |
channel8 |
Not specified (Receives log, trap, and debugging information) |
9 |
channel9 |
Not specified (Receives log, trap, and debugging information) |
Configurations for the six output destinations function independently and take effect only after the information center is enabled.
The system is composed of a variety of protocol modules, board drivers, and configuration modules. The system information can be classified, filtered, and output according to source modules. You can use the info-center source ? command to view the supported information source modules.
The default output rules define the source modules allowed to output information on each output destination, the output information type, and the output information level as shown in Table 1-3, which indicates that by default and in terms of all modules:
l Log information with severity level equal to or higher than informational is allowed to be output to the log host; log information with severity level equal to or higher than warning is allowed to be output to the console, monitor terminal, and log buffer; log information is not allowed to be output to the trap buffer and the SNMP module.
l All trap information is allowed to be output to the console, monitor terminal and log host; trap information with severity level equal to or higher than warning is allowed to be output to the trap buffer and SNMP module; trap information is not allowed to be output to the log buffer.
l All debugging information is allowed to be output to the console and monitor terminal; debugging information is not allowed to be output to the log host, log buffer, trap buffer and the SNMP module.
Table 1-3 Default output rules for different output destinations
Output destination |
Modules allowed |
LOG |
TRAP |
DEBUG |
|||
Enabled/disabled |
Severity |
Enabled/disabled |
Severity |
Enabled/disabled |
Severity |
||
Console |
default (all modules) |
Enabled |
Warning |
Enabled |
Debug |
Enabled |
Debug |
Monitor terminal |
default (all modules) |
Enabled |
Warning |
Enabled |
Debug |
Enabled |
Debug |
Log host |
default (all modules) |
Enabled |
Informational |
Enabled |
Debug |
Disabled |
Debug |
Trap buffer |
default (all modules) |
Disabled |
Informational |
Enabled |
Warning |
Disabled |
Debug |
Log buffer |
default (all modules) |
Enabled |
Warning |
Disabled |
Debug |
Disabled |
Debug |
SNMP module |
default (all modules) |
Disabled |
Debug |
Enabled |
Warning |
Disabled |
Debug |
Log file |
default (all modules) |
Enabled |
Debug |
Enabled |
Debug |
Disabled |
Debug |
The format of system information varies with the output destinations.
l If the output destination is not the log host (such as console, monitor terminal, logbuffer, trapbuffer or SNMP), the system information is in the following format:
timestamp sysname module/level/digest:content
For example, a monitor terminal connects to the device. When a terminal logs in to the device, the log information in the following format is displayed on the monitor terminal:
%Jun 26 17:08:35:809 2008 Sysname SHELL/4/LOGIN: VTY login from 1.1.1.1
l If the output destination is the log host, the system information is in the following format according to RFC 3164 (The BSD Syslog Protocol):
<Int_16>timestamp sysname %%nnmodule/level/digest: source content
l The closing set of angel brackets < >, the space, the forward slash /, and the colon are all required in the above format.
l The format in the previous part is the original format of system information, so you may see the information in a different format. The displayed format depends on the tools you use to view the logs.
What follows is a detailed explanation of the fields involved:
The priority is calculated using the following formula: facility*8+severity, in which facility represents the logging facility name and can be configured when you set the log host parameters. The facility ranges from local0 to local7 (16 to 23 in decimal integers) and defaults to local7. The facility is mainly used to mark different log sources on the log host, query and filter the logs of the corresponding log source. Severity ranges from 0 to 7. Table 1-1 details the value and meaning associated with each severity.
Note that the priority field takes effect only when the information has been sent to the log host.
Timestamp records the time when system information is generated to allow users to check and identify system events. You can use the info-center timestamp command to configure whether to include a timestamp in the system information as well as the timestamp format if it is included. The time stamp of the system information sent from the information center to the log host is with a precision of seconds, whereas that of the system information sent from the information center to the other destinations is with a precision of milliseconds.
Sysname is the system name of the current host. You can use the sysname command to modify the system name. (Refer to Basic System Configuration Commands in the System Volume for details)
This field is a preamble used to identify a vendor. It is displayed only when the output destination is log host.
This field is a version identifier of syslog. It is displayed only when the output destination is log host.
The module field represents the name of the module that generates system information. You can enter the info-center source ? command in system view to view the module list.
System information can be divided into eight levels based on its severity, from 0 to 7. Refer to Table 1-1 for definition and description of these severity levels. The levels of system information generated by modules are predefined by developers, and you cannot change the system information levels. However, you can configure to output information of the specified level using the info-center source command.
The digest field is a string of up to 32 characters, outlining the system information.
For system information destined to the log host:
l If the character string ends with (l), the information is log information
l If the character string ends with (t), the information is trap information
l If the character string ends with (d), the information is debugging information
For system information destined to other destinations:
l If the timestamp starts with a %, the information is log information
l If the timestamp starts with a #, the information is trap information
l If the timestamp starts with a *, the information is debugging information
This field indicates the source of the information, such as the source IP address of the log sender. This field is optional and is displayed only when the output destination is the log host.
This field provides the content of the system information.
Complete the following tasks to configure information center:
Task |
Remarks |
Optional |
|
Optional |
|
Optional |
|
Optional |
|
Optional |
|
Optional |
|
Optional |
To do… |
Use the command… |
Remarks |
Enter system view |
system-view |
— |
Enable information center |
info-center enable |
Optional Enabled by default |
Name the channel with a specified channel number |
info-center channel channel-number name channel-name |
Optional Refer to Table 1-2 for default channel names. |
Configure the channel through which system information can be output to the console |
info-center console channel { channel-number | channel-name } |
Optional By default, system information is output to the console through channel 0 (known as console). |
Configure the output rules of system information |
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 |
Configure the format of the time stamp |
info-center timestamp { debugging | log | trap } { boot | date | none } |
Optional The time stamp format for log, trap and debugging information is date by default. |
After setting to output system information to the console, you need to enable the associated display function to display the output information on the console.
Follow these steps in user view to enable the display of system information on the console:
To do… |
Use the command… |
Remarks |
Enable the monitoring of system information on the console |
terminal monitor |
Optional Enabled on the console and disabled on the monitor terminal by default. |
Enable the display of debugging information on the console |
terminal debugging |
Required Disabled by default |
Enable the display of log information on the console |
terminal logging |
Optional Enabled by default |
Enable the display of trap information on the console |
terminal trapping |
Optional Enabled by default |
System information can also be output to a monitor terminal, which is a user terminal that has login connections through the AUX, VTY user interface.
To do… |
Use the command… |
Remarks |
Enter system view |
system-view |
— |
Enable information center |
info-center enable |
Optional Enabled by default |
Name the channel with a specified channel number |
info-center channel channel-number name channel-name |
Optional Refer to Table 1-2 for default channel names. |
Configure the channel through which system information can be output to a 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). |
Configure the output rules of the system information |
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 |
Configure the format of the time stamp |
info-center timestamp { debugging | log | trap } { boot | date | none } |
Optional By default, the time stamp format for log, trap and debugging information is date. |
After setting to output system information to a monitor terminal, you need to enable the associated display function in order to display the output information on the monitor terminal.
Follow these steps to enable the display of system information on a monitor terminal:
To do… |
Use the command… |
Remarks |
Enable the monitoring of system information on a monitor terminal |
terminal monitor |
Required Enabled on the console and disabled on the monitor terminal by default. |
Enable the display of debugging information on a monitor terminal |
terminal debugging |
Required Disabled by default |
Enable the display of log information on a monitor terminal |
terminal logging |
Optional Enabled by default |
Enable the display of trap information on a monitor terminal |
terminal trapping |
Optional Enabled by default |
To do… |
Use the command… |
Remarks |
Enter system view |
system-view |
— |
Enable information center |
info-center enable |
Optional Enabled by default |
Name the channel with a specified channel number |
info-center channel channel-number name channel-name |
Optional Refer to Table 1-2 for default channel names. |
Specify a log host and configure the parameters when system information is output to the log host |
info-center loghost host-ip [ channel { channel-number | channel-name } | facility local-number ] * |
Required By default, the system does not output information to a log host. If you specify to output system information to a log host, the system uses channel 2 (loghost) by default. |
Configure the output rules of the system information |
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 |
Specify the source IP address for the log information |
info-center loghost source interface-type interface-number |
Optional By default, the source interface is determined by the matched route, and the primary IP address of this interface is the source IP address of the log information. |
Configure the format of the time stamp for system information output to the log host |
info-center timestamp loghost { date | no-year-date | none } |
Optional date by default. |
The trap buffer receives the trap information only, and discards the log and debugging information even if you have configured to output them to the trap buffer.
To do… |
Use the command… |
Remarks |
Enter system view |
system-view |
— |
Enable information center |
info-center enable |
Optional Enabled by default |
Name the channel with a specified channel number |
info-center channel channel-number name channel-name |
Optional Refer to Table 1-2 for default channel names. |
Configure the channel through which system information can be output to the trap buffer and specify 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. |
Configure the output rules of the system information |
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 |
Configure the format of the time stamp |
info-center timestamp { debugging | log | trap } { boot | date | none } |
Optional The time stamp format for log, trap and debugging information is date by default. |
You can configure to output log, trap, and debugging information to the log buffer, but the log buffer receives the log and debugging information only, and discards the trap information.
To do… |
Use the command… |
Remarks |
Enter system view |
— |
|
Enable information center |
info-center enable |
Optional Enabled by default. |
Name the channel with a specified channel number |
info-center channel channel-number name channel-name |
Optional Refer to Table 1-2 for default channel names. |
Configure the channel through which system information can be output to the log buffer and specify 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. |
Configure the output rules of the system information |
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 |
Configure the format of the timestamp |
info-center timestamp { debugging | log | trap } { boot | date | none } |
Optional The time stamp format for log, trap and debugging information is date by default. |
The SNMP module receives the trap information only, and discards the log and debugging information even if you have configured to output them to the SNMP module.
To monitor the device running status, trap information is usually sent to the SNMP network management station (NMS). In this case, you need to configure to send traps to the SNMP module, and then set the trap sending parameters for the SNMP module to further process traps. For details, refer to SNMP Configuration in the System Volume.
Follow these steps to configure to output system information to the SNMP module:
To do… |
Use the command… |
Remarks |
Enter system view |
system-view |
— |
Enable information center |
info-center enable |
Optional Enabled by default |
Name the channel with a specified channel number |
info-center channel channel-number name channel-name |
Optional Refer to Table 1-2 for default channel names. |
Configure the channel through which system information can be output to 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). |
Configure the output rules of the system information |
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 |
Configure the format of the timestamp |
info-center timestamp { debugging | log | trap } { boot | date | none } |
Optional The time stamp format for log, trap and debugging information is date by default. |
Synchronous information output refers to the feature that if the user’s input is interrupted by system output such as log, trap, or debugging information, then after the completion of system output the system will display a command line prompt (a prompt in command editing mode, or a [Y/N] string in interaction mode) and your input so far.
This command is used in the case that your input is interrupted by a large amount of system output. With this feature enabled, you can continue your operations from where you were stopped.
Follow these steps to enable synchronous information output:
To do… |
Use the command… |
Remarks |
Enter system view |
system-view |
— |
Enable synchronous information output |
info-center synchronous |
Required Disabled by default |
l If system information, such as log information, is output before you input any information under the current command line prompt, the system will not display the command line prompt after the system information output.
l If system information is output when you are inputting some interactive information (non Y/N confirmation information), then after the system information output, the system will not display the command line prompt but your previous input in a new line.
By default, all the ports of the device generate link up/down logging information when the port state changes. Therefore, you may need to use this function in some cases, for example:
l You only concern the states of some of the ports. In this case, you can use this function to disable the other ports from generating link up/down logging information.
l The state of a port is not stable, and therefore redundant logging information will be generated. In this case, you can use this function to disable the port from generating link up/down logging information.
Follow the steps below to disable a port from generating link up/down logging information:
To do… |
Use the command… |
Remarks |
Enter system view |
system-view |
— |
Enter interface view |
interface interface-type interface-number |
— |
Disable the port from generating link up/down logging information |
undo enable log updown |
Required By default, all ports are allowed to generate link up/down logging information when the port state changes. |
With this feature applied to a port, when the state of the port changes, the system does not generate port link up/down logging information. In this case, you cannot monitor the port state changes conveniently. Therefore, it is recommended to use the default configuration in normal cases.
When an ONU attached to an OLT encounters configuration changes or failures or is being debugged, you can configure the ONU to report the specified types of information to the OLT.
Note that:
Because a large number of ONUs are attached to an OLT, enabling ONUs to report information to the OLT may generate a large amount of traffic and thus cause congestion. Therefore, you are recommended to select the reported information type as required.
Follow these steps to configure an ONU to report information to the OLT:
To do… |
Use the command… |
Remarks |
Enter system view |
system-view |
— |
Enter ONU port view |
interface interface-type interface-number |
— |
Configure the ONU tp report the specified types of information to the OLT |
onu-event { debug | log | trap } enable level severity |
Optional By default, an ONU reports no information to its OLT. |
To do… |
Use the command… |
Remarks |
Display information about information channels |
display channel [ channel-number | channel-name ] |
Available in any view |
Display the information of each output destination |
display info-center |
Available in any view |
Display the state of the log buffer and the log information recorded |
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 ] |
Available in any view |
display the registration and deregistration records of an ONU |
display onu-event interface interface-type interface-number |
Available in any view |
Display the state of the trap buffer and the trap information recorded |
display trapbuffer [ reverse ] [ size buffersize ] |
Available in any view |
Reset the log buffer |
reset logbuffer |
Available in user view |
Reset the trap buffer |
reset trapbuffer |
Available in user view |
l Send log information to a Unix log host with an IP address of 1.2.0.1/16;
l Log information with severity higher than informational will be output to the log host;
l The source modules are ARP and IP.
Figure 1-1 Network diagram for outputting log information to a Unix log host
Before the configuration, make sure that there is a route between Device and PC.
1) Configure the device
# Enable information center.
<Sysname> system-view
[Sysname] info-center enable
# Specify the host with IP address 1.2.0.1/16 as the log host, use channel loghost to output log information (optional, loghost by default), and use local4 as the logging facility.
[Sysname] info-center loghost 1.2.0.1 channel loghost facility local4
# Disable the output of log, trap, and debugging information of all modules on channel loghost.
[Sysname] info-center source default channel loghost debug state off log state off trap state off
As the default system configurations for different channels are different, you need to disable the output of log, trap, and debugging information of all modules on the specified channel (loghost in this example) first and then configure the output rule as needed so that unnecessary information will not be output.
# Configure the information output rule: allow log information of ARP and IP modules with severity equal to or higher than informational to be output to the log host. (Note that the source modules allowed to output information depend on the device model.)
[Sysname] info-center source arp channel loghost log level informational state on
[Sysname] info-center source ip channel loghost log level informational state on
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.
Step 1: Log in to the log host as a root user.
Step 2: Create a subdirectory named Device under directory /var/log/, and create file info.log under the Device directory to save logs of Device.
# mkdir /var/log/Device
# touch /var/log/Device/info.log
Step 3: Edit file /etc/syslog.conf and add the following contents.
# Device configuration messages
local4.info /var/log/Device/info.log
In the above configuration, local4 is the name of the logging facility used by the log host to receive logs. info is the information level. The Unix system will record the log information with severity level equal to or higher than informational to file /var/log/Device/info.log.
Be aware of the following issues while editing file /etc/syslog.conf:
l Comments must be on a separate line and begin with the # sign.
l No redundant spaces are allowed after the file name.
l The logging facility name and the information level specified in the /etc/syslog.conf file must be identical to those configured on the device using the info-center loghost and info-center source commands; otherwise the log information may not be output properly to the log host.
Step 4: After log file info.log is created and file /etc/syslog.conf is modified, you need to issue the following commands to display the process ID of syslogd, kill the syslogd process and then restart syslogd using the –r option to make the modified configuration take effect.
# ps -ae | grep syslogd
147
# kill -HUP 147
# syslogd -r &
After the above configurations, the system will be able to record log information into the log file.
l Send log information to a Linux log host with an IP address of 1.2.0.1/16;
l Log information with severity higher than informational will be output to the log host;
l All modules can output log information.
Figure 1-2 Network diagram for outputting log information to a Linux log host
Before the configuration, make sure that there is a route between Device and PC.
1) Configure the device
# Enable information center.
<Sysname> system-view
[Sysname] info-center enable
# Specify the host with IP address 1.2.0.1/16 as the log host, use channel loghost to output log information (optional, loghost by default), and use local5 as the logging facility.
[Sysname] info-center loghost 1.2.0.1 channel loghost facility local5
# Disable the output of log, trap, and debugging information of all modules on channel loghost.
[Sysname] info-center source default channel loghost debug state off log state off trap state off
As the default system configurations for different channels are different, you need to disable the output of log, trap, and debugging information of all modules on the specified channel (loghost in this example) first and then configure the output rule as needed so that unnecessary information will not be output.
# Configure the information output rule: allow log information of all modules with severity equal to or higher than informational to be output to the log host.
[Sysname] info-center source default channel loghost log level informational state on
2) Configure the log host
Step 1: Log in to the log host as a root user.
Step 2: Create a subdirectory named Device under directory /var/log/, and create file info.log under the Device directory to save logs of Device.
# mkdir /var/log/Device
# touch /var/log/Device/info.log
Step 3: Edit file /etc/syslog.conf and add the following contents.
# Device configuration messages
local5.info /var/log/Device/info.log
In the above 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/Device/info.log.
Be aware of the following issues while editing file /etc/syslog.conf:
l Comments must be on a separate line and begin with the # sign.
l No redundant spaces are allowed after the file name.
l The logging facility name and the information level specified in the /etc/syslog.conf file must be identical to those configured on the device using the info-center loghost and info-center source commands; otherwise the log information may not be output properly to the log host.
Step 4: After log file info.log is created and file /etc/syslog.conf is modified, you need to issue the following commands to display the process ID of syslogd, kill the syslogd process, and restart syslogd using the -r option to make the modified configuration take effect.
# ps -ae | grep syslogd
147
# kill -9 147
# syslogd -r &
Ensure that the syslogd process is started with the -r option on a Linux log host.
After the above configurations, the system will be able to record log information into the log file.
l Log information with a severity higher than informational will be output to the console;
l The source modules are ARP and IP.
Figure 1-3 Network diagram for sending log information to the console
# Enable information center.
<Sysname> system-view
[Sysname] info-center enable
# Use channel console to output log information to the console (optional, console by default).
[Sysname] info-center console channel console
# Disable the output of log, trap, and debugging information of all modules on channel console.
[Sysname] info-center source default channel console debug state off log state off trap state off
As the default system configurations for different channels are different, you need to disable the output of log, trap, and debugging information of all modules on the specified channel (console in this example) first and then configure the output rule as needed so that unnecessary information will not be output.
# Configure the information output rule: allow log information of ARP and IP modules with severity equal to or higher than informational to be output to the console. (Note that the source modules allowed to output information depend on the device model.)
[Sysname] info-center source arp channel console log level informational state on
[Sysname] info-center source ip channel console log level informational state on
[Sysname] quit
# Enable the display of log information on a terminal. (Optional, this function is enabled by default.)
<Sysname> terminal monitor
% Current terminal monitor is on
<Sysname> terminal logging
% Current terminal logging is on
After the above configuration takes effect, if the specified module generates log information, the information center automatically sends the log information to the console, which then displays the information.