Introduction
This document describes the steps to set logs on the Cisco DNA Center via CLI.
Prerequisites
Requirements
Use maglev as the username on port 2222.
Components Used
The information in this document is based on these software versions:
- Cisco DNA Center 2.3.3
- Cisco DNA Center 2.3.5
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.
Background Information
To assist in troubleshooting service issues, you can change the logging level for the Cisco DNA Center services.
If you want to set the logs via Graphical User Interface (GUI) you can review this document.
The default logging level for services is informational (Info). You can change the logging level from informational to a different logging level (Debug) to capture more information.
Caution: Due to the type of information that can be disclosed, logs collected at the Debug level or higher must have restricted access and cannot be on for long.
- Debug: Debugging messages
- Info: Normal, but significant condition messages
- Warn: Warning condition messages
- Error: Error condition messages
Cisco DNA Center CLI logs
Procedure
Step 1. Identify the port of the services.
magctl service status [service] | grep -i port
magctl service ip display | grep [service]
Step 2. Set the level log of the service.
magctl service loglevel set -l debug -t [30|60] [service] [port]
Note: There are few services that are not able to modify the log level.
In that case, you must see the an error :
magctl service loglevel set -l debug -t 30 disaster-recovery-service 8500
Could not complete the operation, either service is down or service does not support the operation
Verification
Verify the changes.
magctl service loglevel display [service] [port]