Storing and Collecting Message Logs with Syslog
|
This chapter provides information about how to use the Syslog feature to store and collect message logs.
This chapter contains the following topics:
Configuring Syslog via CLI
This feature allows you to store system messages and/or errors. You can store to local files on the switch or a remote server running a syslog daemon. Also, it provides a method of collecting message logs from many systems.
The following are examples of the CLI commands used with the Syslog feature.
Example 1: show logging
CODE EXAMPLE 34-1 show logging Command
(DTI SWITCH) # show logging
Logging Client Local Port : 514
CLI Command Logging : disabled
Console Logging : disabled
Console Logging Severity Filter : alert
Buffered Logging : enabled
Syslog Logging : enabled
Log Messages Received : 66
Log Messages Dropped : 0
Log Messages Relayed : 0
|
Example 2: show logging buffered
CODE EXAMPLE 34-2 show logging buffered Command
(DTI SWITCH) # show logging buffered ?
<cr> Press Enter to execute the command.
(DTI SWITCH) # show logging buffered
Buffered (In-Memory) Logging : enabled
Buffered Logging Wrapping Behavior : On
Buffered Log Count : 66
<6> Nov 29 13:31:38 0.0.0.0-1 UNKN[292290880]: sysapi.c(1280) 3 %% sysapiCfgFilesSeparate: CRC check failed. 0x0 read and 0xce0a37e0 calculated
<6> Nov 29 13:31:38 0.0.0.0-1 UNKN[292290880]: sysapi.c(1131) 4 %% could not separate SYSAPI_CONFIG_FILENAME
<2> Nov 29 13:31:42 0.0.0.0-1 UNKN[292290880]: bootos.c(332) 5 %% Event(0xaaaaaaaa)
<6> Nov 29 13:31:49 0.0.0.0-1 UNKN[296038472]: sysapi.c(1912) 6 %% Building defaults for file log.cfg version 1
<6> Nov 29 13:32:12 0.0.0.0-1 UNKN[295813352]: edb.c(360) 7 %% EDB Callback: Unit Join: 1.
<6> Nov 29 13:32:12 0.0.0.0-1 UNKN[293358784]: sysapi.c(1912) 8 %% Building defaults for file simCfgData.cfg version 3
|
Example 3: show logging traplogs
CODE EXAMPLE 34-3 show logging traplogs Command
(DTI SWITCH) # show logging traplogs
Number of Traps Since Last Reset............... 16
Trap Log Capacity.............................. 256
Number of Traps Since Log Last Viewed.......... 0
Log System Up Time Trap
--- ------------------------ ------------------------------------
0 6 days 20:22:35 Failed User Login: Unit: 1 User ID:
1 6 days 19:19:58 Multiple Users: Unit: 0 Slot: 3 Port: 1
2 5 days 23:31:27 Multiple Users: Unit: 0 Slot: 3 Port: 1
3 5 days 19:21:51 Multiple Users: Unit: 0 Slot: 3 Port: 1
4 2 days 23:16:32 Link Down: Unit: 0 Slot: 1 Port: 2
5 2 days 23:16:03 Link Down: Unit: 0 Slot: 1 Port: 1
6 2 days 19:49:28 Multiple Users: Unit: 0 Slot: 3 Port: 1
7 2 days 18:20:56 Multiple Users: Unit: 0 Slot: 3 Port: 1
8 2 days 17:10:41 Multiple Users: Unit: 0 Slot: 3 Port: 1
9 2 days 00:55:42 Multiple Users: Unit: 0 Slot: 3 Port: 1
10 2 days 00:55:38 Failed User Login: Unit: 1 User ID: admin
11 2 days 00:20:12 Multiple Users: Unit: 0 Slot: 3 Port: 1
|
Example 4: show logging hosts
CODE EXAMPLE 34-4 show logging hosts Command
(DTI SWITCH) # show logging hosts ?
<cr> Press Enter to execute the command.
(DTI SWITCH) # show logging hosts
Index IP Address Severity Port Status
----- ----------------- ---------- ---- -------------
1 192.168.21.253 critical 514 Active
|
Example 5: logging port configuration
CODE EXAMPLE 34-5 Logging Port Configuration Commands
(DTI SWITCH) # config
(DTI SWITCH) (Config)# logging ?
buffered Buffered (In-Memory) Logging Configuration.
cli-command CLI Command Logging Configuration.
console Console Logging Configuration.
host Enter IP Address for Logging Host
syslog Syslog Configuration.
(DTI SWITCH) (Config)# logging host ?
<hostaddress> Enter Logging Host IP Address
reconfigure Logging Host Reconfiguration
remove Logging Host Removal
(DTI SWITCH) (Config)# logging host 192.168.21.253 ?
<cr> Press Enter to execute the command.
<port> Enter Port ID from 0 to 65535
(DTI SWITCH) (Config)# logging host 192.168.21.253 4 ?
<cr> Press Enter to execute the command.
<severitylevel> Enter Logging Severity Level (emergency|0, alert|1, critical|2, error|3, warning|4, notice|5, info|6,debug|7).
(DTI SWITCH) (Config)# logging host 192.168.21.253 4 1 ?
<cr> Press Enter to execute the command.
(DTI SWITCH) (Config)# logging host 192.168.21.253 4 1
(DTI SWITCH) (Config)# exit
(DTI SWITCH) # show logging hosts ?
<unit> Enter switch ID in the range of 1 to 8.
(DTI SWITCH) # show logging hosts 1
Index IP Address Port Status
----- ----------------- ---- -----------
1 192.168.21.253 4 Active
|
Configuring Syslog via Web Interface
The following web pages are used with the Syslog feature.
FIGURE 34-1 Log - Syslog Configuration Page
FIGURE 34-2 Log - Hosts Configuration Page - Add Host
FIGURE 34-3 Log - Hosts Configuration Page
Interpreting Log Files
Sun Netra CP3240 Switch User’s Guide
|
820-3252-11
|
|
© 2007 Diversified Technology, Inc. All Rights Reserved. © 2009 Sun Microsystems, Inc. All rights reserved.