Introduction
This document describes how to configure Data Management Engine (DME) logs to be exported to an external server with the use of Secure Copy Protocol (SCP) in order to preserve the logs.
Unified Computing System Manager (UCSM) stores log files for its processes in /var/sysmgr/sam_logs/. These logs can be read by the administrator by the collection of an UCSM techsupport or with the use of the tail-mgmt-log command in the local-mgmt scope.
Prerequisites
Requirements
Cisco recommends that you have knowledge of these topics:
- Command Line (CLI) access to UCS domain
- External server
Components Used
The information in this document is based on these software and hardware versions:
- UCS 6248 Fabric Interconnects
- UCSM 2.2(7b)
- CentOS 6.7
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
Configure
Log Export Policy Configuration
Note: These configuration steps are documented in the Cisco UCS Manager CLI System Monitoring Guide, in the section Configuring Settings for Faults, Events, and Logs > Log File Exporter. It is strongly recommended that you read the monitoring guide in its entirety .
Step 1. Start with the inspection of the current log export policy.
ucs-04-B# scope monitoring
ucs-04-B /monitoring # scope sysdebug
ucs-04-B /monitoring/sysdebug # scope log-export-policy
ucs-04-B /monitoring/sysdebug/log-export-policy # show
Log Export Policy:
Remote server:
admin state: Disabled
Use Passwordless Ssh: Yes
Step 2. View the settings which can be modified.
ucs-04-B /monitoring/sysdebug/log-export-policy # set
admin-state admin state
descr Description
hostname Remote server
passwd password
passwordless-ssh Use Passwordless Ssh
path remote path
proto protocol
user remote user
Step 3. Configure an external server.
ucs-04-B /monitoring/sysdebug/log-export-policy # set hostname 192.168.0.100
ucs-04-B /monitoring/sysdebug/log-export-policy* # set user ucs
ucs-04-B /monitoring/sysdebug/log-export-policy* # set passwd
password:
ucs-04-B /monitoring/sysdebug/log-export-policy* # set path /var/log/
ucs-04-B /monitoring/sysdebug/log-export-policy* # set admin-state enabled
ucs-04-B /monitoring/sysdebug/log-export-policy* # set proto scp
ucs-04-B /monitoring/sysdebug/log-export-policy* # set passwordless-ssh yes
ucs-04-B /monitoring/sysdebug/log-export-policy* # commit-buffer
ucs-04-B /monitoring/sysdebug/log-export-policy #
Logging Level Configuration
The administrator might need to increase the logging level for a specific logging module. The commands here show the modules which can be configured.
ucs-04-B # scope monitoring
ucs-04-B /monitoring # scope sysdebug
ucs-04-B /monitoring/sysdebug # scope mgmt-logging
ucs-04-B /monitoring/sysdebug/mgmt-logging #
reset Reset mgmt logging levels
save Save mgmt logging parameters
set Set mgmt logging property values
show Show system information
ucs-04-B /monitoring/sysdebug/mgmt-logging # show
Log File Size Limit: 5242880
Name Level Default Level
--------------------- ------ -------------
adaptor Info Info
agdriver Info Info
ape Info Info
app_hostag_agcore Info Info
app_sam_bladeAG Info Info
app_sam_cim Info Info
app_sam_controller Info Info
app_sam_dcosAG Info Info
app_sam_dme Info Info
app_sam_hostagentAG Info Info
app_sam_licenseAG Info Info
app_sam_nicAG Info Info
app_sam_portAG Info Info
app_sam_rsdAG Info Info
app_sam_serverAG Info Info
app_sam_snmp Info Info
app_sam_statsAG Info Info
app_sam_svcmonAG Info Info
app_sam_switchAG Info Info
app_synagent_fileAG Info Info
app_unittest_testsvc Info Info
auth Info Info
autocond Info Info
bio_stream Info Info
bios Info Info
callhome Info Info
catalog Info Info
char_stream Info Info
compute Info Info
core_transactor Info Info
core_utils Info Info
diag Info Info
doer Info Info
domain Info Info
equipment Info Info
ether Info Info
event_ Info Info
event_channel Info Info
exception_handling Info Info
fabric Info Info
fault Info Info
fcpool Info Info
filter Info Info
fsm Info Info
http_client Info Info
ippool Info Info
iptfwconfig Info Info
locator Info Info
The commands here exemplify how the administrator can modify the logging level of app_sam_dme, the DME logging module.
ucs-04-B /monitoring/sysdebug/mgmt-logging # set
all All mgmt logging modules
file Mgmt logging file parameters
module Specific mgmt logging module
ucs-04-B /monitoring/sysdebug/mgmt-logging # set module app_sam_dme
crit Crit
debug0 Debug0
debug1 Debug1
debug2 Debug2
debug3 Debug3
debug4 Debug4
info Info
major Major
minor Minor
warn Warn
ucs-04-B /monitoring/sysdebug/mgmt-logging # set module app_sam_dme debug4
ucs-04-B /monitoring/sysdebug/mgmt-logging # show
Log File Size Limit: 5242880
Name Level Default Level
--------------------- ------ -------------
adaptor Info Info
agdriver Info Info
ape Info Info
app_hostag_agcore Info Info
app_sam_bladeAG Info Info
app_sam_cim Info Info
app_sam_controller Info Info
app_sam_dcosAG Info Info
app_sam_dme Info Debug4
app_sam_hostagentAG Info Info
app_sam_licenseAG Info Info
app_sam_nicAG Info Info
app_sam_portAG Info Info
app_sam_rsdAG Info Info
app_sam_serverAG Info Info
app_sam_snmp Info Info
app_sam_statsAG Info Info
app_sam_svcmonAG Info Info
app_sam_switchAG Info Info
app_synagent_fileAG Info Info
app_unittest_testsvc Info Info
auth Info Info
autocond Info Info
bio_stream Info Info
bios Info Info
callhome Info Info
catalog Info Info
char_stream Info Info
compute Info Info
core_transactor Info Info
core_utils Info Info
diag Info Info
doer Info Info
domain Info Info
equipment Info Info
ether Info Info
event_ Info Info
event_channel Info Info
exception_handling Info Info
fabric Info Info
fault Info Info
fcpool Info Info
filter Info Info
fsm Info Info
http_client Info Info
ippool Info Info
iptfwconfig Info Info
locator Info Info
Increase in the logging level causes an increase in number of messages logged. In most cases, this must only be modified if requested by the Cisco Technical Assistance Center (TAC).
Verify
Use this section in order to confirm that your configuration works properly.
External Server
As shown here, the syslog server contains several .tgz files that were exported from the UCS domain.
[admin@localhost /var/log]# ls -la logs.ucs-04-B* | tail -n 5
-rw-r--r--. 1 root root 476911 Dec 8 09:10 logs.ucs-04-B.151208141033.tgz
-rw-r--r--. 1 root root 276423 Dec 8 09:29 logs.ucs-04-B.151208142904.tgz
-rw-r--r--. 1 root root 456043 Dec 8 09:33 logs.ucs-04-B.151208143342.tgz
-rw-r--r--. 1 root root 480427 Dec 8 09:57 logs.ucs-04-B.151208145722.tgz
-rw-r--r--. 1 root root 119322 Dec 8 10:04 logs.ucs-04-B.151208150403.tgz
The extraction of one of them as an example shows that it contains an svc_sam_dme.log.6.gz file which without this configuration in place, UCS would have to delete in order to save newer log messages.
[admin@localhost /var/log]# tar -vxzf logs.ucs-04-B.151208145722.tgz
bootflash/sysdebug/log_export/ucs-04-B/151208145722/
bootflash/sysdebug/log_export/ucs-04-B/151208145722/svc_sam_dme.log.6.gz
Troubleshoot
There is currently no specific troubleshooting information available for this configuration.
Related Information