Collecting Tech Support Logs

Overview

Tech support logs are used for offline troubleshooting. This article describes how to collect tech support logs from a single Avi Controller or 3-node Avi Controller cluster.

Note: In a 3-node Avi Controller cluster, the steps mentioned in this article automatically collect logs from all the three nodes. The commands need not be entered separately on each Avi Controller node.

Collecting tech support logs from Avi UI

Follow the instructions in this section to collect tech support logs from the Avi UI.

Navigate to Administration > Troubleshoot and select Generate to create tech support log files.

Screen Shot 2016-09-19 at 12.29.15 PM

Click on the plus sign at the rightmost position in the archive row) to display additional information. Click on the download icon as shown in the below screenshot to download the tech support file to the local drive. Download the .tar.gz file and then convey it to Avi Support for further troubleshooting.

downloading tech support log

Collecting tech support logs from Avi CLI

Follow the instructions in this section to collect tech support logs from the Avi CLI.

  • In an Avi Controller cluster, one of the nodes is the leader or the primary node. Login to the leader node using any ssh client, such as putty. 10.10.1.1 is the leader node in this example.

login as: admin

Avi Cloud Controller

Avi Networks software, Copyright (C) 2013-2017 by Avi Networks, Inc.
All rights reserved.

Version:      17.1.6
Date:         2017-08-30 15:35:21 UTC
Build:        9022
Management:   10.10.2.2/22                UP
Gateway:      10.10.2.1                    UP

admin@10.10.1.1's password:

To know more about the leader node in an Avi Controller cluster, refer to Overview of the Controller Cluster. To know more about SSH key generation, refer to Avi CLI access.

  • Type shell command, and enter your credentials.

admin@avi-cntrl1:~$ shell
Login: admin
Password:
  • From the shell prompt, run the command show tech-support serviceengine.

    The command show tech-support serviceengine create debug logs for the particular SE.

    Note: For reference, Avi-Cluster1-SE1 is the Avi SE for which we want to collect the debug logs.


[admin:avi-cntrl1]: > show tech-support serviceengine Avi-cluster1-SE1
  • This command generates core files and other debug logs, which are stored in /tmp directory on the Avi Controller leader node. Use cd/tmp command from the Avi CLI to get access to the tmp directory. Check the debug logs and the other log files, which are available in compressed form with tar.gz extension.

Sample tech support log file: debuglogs.20170915-124030.tar.gz The number 20170915 in the log file debuglogs.20170915-124030.tar.gz represents the date of generation of the log files, i.e., 15 Sep 2017.

The following are the available options that can be used while executing the show tech-support command.


[admin:cntrl]: > show tech-support
clustering       show system tech clustering
debuglogs        show system tech support
gslb             Collect GSLB logs on this site
placement        show system tech placement
portal           show system tech portal
serviceengine    show se tech-support
upgrade          show system tech upgrade
virtualservice   show vs tech-support
[admin:cnrl]: > show tech-support
[admin:cntrl]: >

Additional Information

The following command collects the debug logs on each of the Avi Controller nodes. This option keeps the collected tech support bundle to a minimal size. The option is especially useful if the core archive bundles that are present have already been uploaded and fixed.

show tech-support debuglogs

The following command includes the collection of the core archive bundles.

show tech-support debuglogs filter include_archive

If you have external connectivity to AWS S3 from the Avi Controller, you can upload the tech support information to the Avi customer support S3 bucket, using the following command:

upload tech-support debuglogs

Collecting tech support logs using Avi API

Follow the commands in this section to collect tech support logs using REST API.

GET https:///api/techsupport/debuglogs
GET https:///api/techsupport/debuglogs?include_archive=true
GET https:///api/techsupport/debuglogs?upload=true

Collecting Tech Support Logs via Script on the Controller

You can upload logs via attach2case.py script on the Controller. Before running the script, ensure:

  • A per-user or per-account token for API authentication
  • Forward proxy on the network which the Controller is part of
  • Super user access to the Controller

Note: The attach2case.py script is found under /opt/avi/scripts directory.

The CLI format is as follows:

User@Test-MacBook-Pro:~$ ssh admin@10.10.22.117

Avi Cloud Controller

Avi Networks software, Copyright (C) 2013-2017 by Avi Networks, Inc.
All rights reserved. 

Version:      17.1.8
Date:         2017-09-21 06:03:07 UTC
Build:        9020
Management:   10.10.22.62/23                 UP 
Gateway:      10.10.22.1                     UP 

admin@10.10.22.117's password: 

The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under
license. Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or the GNU
Lesser General Public License (LGPL) Version 2.1. A copy of each
such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://www.opensource.org/licenses/lgpl-2.1.php
Last login: Fri Oct  6 07:01:03 2017 from 10.10.221.61
admin@Test-Cntl:~$ 
admin@Test-Cntl:~$ cd /opt/avi/scripts
admin@Test-Cntl:/opt/avi/scripts$ pwd
/opt/avi/scripts
admin@Test-Cntl:/opt/avi/scripts$ ls -l attach2case.py 
rwxrwx-- 1 root root 14187 Sep 21 06:03 attach2case.py

root@Test-Cntl:/opt/avi/scripts# ./attach2case.py --help
usage: attach2case.py [-h] [-c CONFIG] [-d] [-H HOSTNAME] [-i]
[-p {http,https}] [-P] [-t TOKEN]
CASE-NUMBER FILE [FILE ...] 

Attaches files to a case on the Avi Networks portal.

positional arguments:
CASE-NUMBER           case number to attach files to
FILE                  files to attach to the case

optional arguments:
-h, --help            show this help message and exit
-c CONFIG, --config CONFIG
Path to configuration file (JSON) (default: None)
-d, --debug           Enable HTTP debug (default: False)
-H HOSTNAME, --hostname HOSTNAME
HTTP hostname (default: avinetworks.com)
-i, --insecure        Allow insecure SSL connections (default: False)
-p {http,https}, --protocol {http,https}
HTTP protocol (default: https)
-P, --progress        Display progress indicator (default: False)
-t TOKEN, --token TOKEN
API authentication token  

The script can be executed as follows:

/opt/avi/scripts/attach2case.py -H avinetworks.com -t  -P -p https <case#>                       
</code></pre>

**Example**


admin@Test-Cntl:/opt/avi/scripts$ sudo su
[sudo] password for admin: 
root@Test-Cntl:/opt/avi/scripts# ls -ltrh /home/admin/test
total 5.4G
-rwxrwxrwx 1 admin admin 3.5G Oct  6 06:44 test.tar.gz
-rwxrwxrwx 1 admin admin 2.0G Oct  6 06:47 controller.pkg

root@Test-Cntl:/opt/avi/scripts# ./attach2case.py -H avinetworks.com -t  -P -p https 3763 /home/admin/test/controller.pkg 
100%
root@Test-Cntl:/opt/avi/scripts# ./attach2case.py -H avinetworks.com -t  -P -p https 3763 /home/admin/test/test.tar.gz
100% 
Attaches files to a case on the Avi Networks portal.  </code></pre>