R3166-R3206-HP High-End Firewalls System Management and Maintenance Configuration Guide-6PW101

121
Configuring SNMP logging
Introduction to SNMP logging
SNMP logs the Get and Set operations that the NMS performs on the SNMP agent. When the GET
operation is performed, the agent logs the IP address of the NMS, node name of the GET operation and
OID of the node. When the SET operation is performed, the agent logs the IP address of the NMS, node
name of the SET operation, OID of the node, the value configured and the error code and error index of
the SET response. These logs will be sent to the information center, and the level of them is informational,
that is, they are taken as the system prompt information. With parameters for the information center
configured, the output rules for SNMP logs are decided (that is, whether the logs are permitted to display
and the output destinations).
SNMP logs Get requests, Set requests and Set responses, but does not log Get responses.
Enabling SNMP logging
To do… Use the command…
Remarks
Enter system view system-view
Enable SNMP logging
snmp-agent log { all | get-operation |
set-operation }
Required
Disabled by default.
Configure SNMP log
output rules
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
By default, SNMP logs are output
to loghost and logfile only. To
output SNMP logs to other
destinations such as the console or
a monitor terminal, you need to set
the output destinations with this
command.
NOTE:
A large number of lo
g
s occupy stora
g
e space of the device, thus affectin
g
the performance of the device.
Therefore, it is recommended to disable SNMP logging.
The size of SNMP logs cannot exceed that allowed by the information center, and the total len
g
th of the
node field and value field of each log record cannot exceed 1K bytes; otherwise, the exceedin
g
part will
not be displayed.
For more information about system information, the information center, and the info-center source
command, see the chapter “Information center configuration.
Configuring SNMP trap
Enabling the trap function
The SNMP agent sends traps to the NMS to inform the NMS of critical and important events (such as
reboot of a managed device). Two types of traps are available: generic traps and vendor-specific traps.
Generic traps supported on the device include: authentication, coldstart, linkdown, linkup and
warmstart. The others are self-defined traps, which are generated by different modules. As traps that