Contents

Introduction

Prerequisites

Requirements

Components Used

Background Information

Problem

Solution

Introduction

This document describes how to configure Cisco Policy Suite (CPS) before the log collect command.

Prerequisites

Requirements

Cisco recommends that you have knowledge of these topics:

- Linux

- CPS

- Policy Control Rule Function (PCRF)

- Diameter Routing Agent (vDRA)

- Docker Container

Cisco recommends that you must have privilege access:

- Root access to CPS vDRA CLI

- qns-svn user access to CPS GUIs (Policy builder and CPS Central)

Components Used

The information in this document is based on these software and hardware versions:

- CPS cisco-policy-dra 21.1.0

- MongoDB v3.6.17

- Docker container

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

Automated Log collection helps to collect all required logs from vDRA for Outage conditions. The log collect command supports the collection of all possible logs across all Virtual Machines (VMs) with a single command.

- List of logs that are collected:

- Consolidated QNS Logs

- Consolidated PB Logs

- Orchestrator Logs

- Top command

- Docker Container Logs

- Journalctl Logs

- Mongo logs

- Support to collect heapdump

- Support to collect threaddump

- Support to collect logs category wise

- Support to collect logs vmwise

- Support to configure details of external / DIM server to which logs must be copied

- Support to display the current feature configs

Problem

The log collect CLI is the automated log collection for outage conditions that collects various logs and compresses them into the CPS log archive.

The "SCP to server failed" error is reported when the log collect CLI is executed.

admin@orchestrator[labnode]# log collect all duration 1

===================== Collecting Docker container logs =====================

================ Collection of Docker container logs ended =================

======================== Collecting journalctl logs ========================

=================== collection of journalctl logs ended ====================

===================== Collecting top outputs from vms ======================

======================= collection of top logs ended =======================

====================== Collecting prometheus snapshot =======================

================== collection of prometheus snapshot ended ==================

=========================== Collecting debug tech ===========================

====================== collection of debug tech ended =======================

=========================== Collecting mongo logs ===========================

====================== collection of mongo logs ended =======================

SCP to server 10.10.10.10 failed, Please check in https://<Master-IP>/orchestrator/downloads/logs

Solution

1. Configure the external server with the IP address, port number, username, and password for the log collection with the log collect config ip command.

admin@orchestrator[labnode]# log collect config ip ip_address port port user user

Password:password

2. Check the external server configuration with the log collect show command.
admin@orchestrator[labnode]# log collect show

Log collect configurations Current Value

---------------------------- --------------------------------

ip 10.10.10.20

port 22

user user

password ABCDEF0123456789ABCDEF0123456789

3. Execute the log collect all command to collect logs and copy the compressed log file to the external server.

Caution: The duration time period in hours must be a natural integer number. For example 1. Decimal numbers are not allowed.

log collect all [ duration <timeperiod in hours> ]