< Home

info-center source

Function

The info-center source command adds records to the information channel.

The undo info-center source command deletes the records from the information channel.

Format

info-center source { module-name | default } channel { channel-number | channel-name } [ log { state { off | on } | level severity } * | trap { state { off | on } | level severity } * | debug { state { off | on } | level severity } * ] *

undo info-center source { module-name | default } channel { channel-number | channel-name }

Parameters

Parameter Description Value

module-name

Specifies the module names.

-

default

Indicates default information record.

If this parameter is configured, information about all modules can be added to the information channel.

-

channel-number

Specifies the number of the information channel to be set.

It ranges from 0 to 9.

channel-name

Specifies the name of the channel to be set.

The name is a string of 1 to 30 case-insensitive characters without spaces, hyphens (-), slashes (\), and anti-slashes (/).

log

Indicates the logs.

-

trap

Indicates the alarms.

-

debug

Indicates the debugging information.

-

on

Enables information.

-

off

Disables information.

-

level severity

Specifies the information level.

The information center divides the information into 8, as shown in Table 1. The severer the information is, the lower the information level is. For example, the level of emergencies is 0 while that of debugging is 7.

Table 1 Definition of information levels

Level

Severity

0

emergencies

1

alert

2

critical

3

error

4

warning

5

notification

6

informational

7

debugging

Views

System view

Default Level

3: Management level

Usage Guidelines

The name of the default module for recording log information in each information channel is "default". For different information channels, the record has different default values for the log, alarm and debugging information. For details, see Table 2. The default configuration record will be used if a module has no specified configuration record in the channel.

Table 2 Default levels and state of information channels

Information Channel Number

Module Enabled to Output Information

Log

Trap

Debug

Default Level

Default State

Default Level

Default State

Default Level

Default State

0

default

warning

on

debugging

on

debugging

on

1

default

warning

on

debugging

on

debugging

on

2

default

informational

on

debugging

on

debugging

off

3

default

informational

off

debugging

on

debugging

off

4

default

warning

on

debugging

off

debugging

off

5

default

debugging

off

debugging

on

debugging

off

6

default

debugging

on

debugging

on

debugging

off

7

default

debugging

on

debugging

on

debugging

off

8

default

debugging

on

debugging

on

debugging

off

9

default

debugging

on

debugging

on

debugging

off

After the information level allowed by the information channel is configured, alarms whose severity levels are below the set level may be filtered.

  • level severity: Set the level severity parameter to adjust the level of logs output through the information channel. Then logs at a level lower than the configured on are filtered out.

    Example: By default, the information center sends logs of the warning level and higher levels (such as error level) to channel 4. The information center does not send policy matching logs since the log level is informational, lower than the default warning level. In this case, if you want to view policy matching logs in the log buffer, you need to run the info-center source POLICY channel logbuffer log level informational command to change the log level to informational so that the information center will send policy matching logs to the log buffer.

  • To disable the function of sending logs to a specified channel, run the info-center source module-name channel channel-name log state off command. For example, after the info-center source POLICY channel loghost log state off command is executed, policy matching logs are not sent to the log host but are still sent to other channels. For the mapping between information channels and output directions, see Information Output.
  • If the default status set for a channel is off, logs of all levels are not sent. For example, if the default log level set for information channel 3 is informational but the default status is off, logs of all levels, including warning and debugging, are not sent.

Example

# Enable the log information of the BGP module in the snmpagent channel and the highest level of the output information is emergence.

<sysname> system-view
[sysname] info-center source bgp channel snmpagent log level emergencies

# Remove the setting of the CMD module in the snmpagent channel.

[sysname] undo info-center source CMD channel snmpagent
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >