This section details the steps to upload logs through scripts on the controller.

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

  • 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 [email protected]

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 

[email protected]'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#>                   
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.

What Data Are Collected in Tech Support Logs

As the NSX Advanced Load Balancer system has evolved functionally over time, so too have the number of tech support log _types_ and the data captured in each. Ten tech support types appear below. The debuglogs type captures Controller-specific debugging data; all other types capture data associated with their self-explanatory name.

  • clustering

  • metrics logs

  • debuglogs

  • placement

  • portal

  • serviceengine

  • upgrade

  • virtualservice

  • gslb

  • pool

The logs collected through the shell command show tech-support debuglogs contains all the relevant Controller logs from the previous and current partition from all the nodes in the cluster; this command is a superset of other

show tech-support [clustering, upgrade, placement, portal, metricslogs, gslb] commands.

The two exceptions are:

1. show tech-support virtualservice: Collects the additional show-command output listed below for a given virtual service, along with SE logs for SEs onto which the virtual service has been placed, and the Controller logs from all the nodes in the current partition.

  • show virtualservice

  • show virtualservice <key>

  • show virtualservice <key> detail

  • show virtualservice <key> tcpstat

  • show virtualservice <key> dnstable

  • show virtualservice <key> internal

  • show virtualservice <key> httpstats

  • show virtualservice <key> dosstat

  • show shardserver

2. show tech-support pool: Collects the additional show-command output listed below for a given pool, along with SE logs for SEs onto which the virtual service has been placed, and the vs_mgr logs from all the Controller nodes in the current partition.

  • show pool

  • show pool <key> algo

  • show pool <key> connpool

  • show pool <key> connpool filter disable_aggregate se

  • show pool <key> debug - show pool <key> detail

  • show pool <key> detail filter disable_aggregate se

  • show pool <key> internal

  • show pool <key> internal filter disable_aggregate se

  • show pool <key> httpcache

  • show pool <key> httpcache filter disable_aggregate se

  • show pool <key> httpcachestats

  • show pool <key> httpcachestats filter disable_aggregate se

  • show pool <key> persistence

  • show pool <key> persistence filter disable_aggregate se

  • show pool <key> hmon

  • show pool <key> summary

  • show pool <key> vs

  • show pool <key> server detail

  • show pool <key> server detail filter disable_aggregate se

  • show pool <key> server summary

  • show pool <key> server internal

  • show pool <key> server internal filter disable_aggregate se

  • show pool <key> server hmonstat

  • show pool <key> server hmonstat filter disable_aggregate se

If it is clear to the system administrator that a problem is associated with a particular virtual service, then capturing the virtualservice tech support log specific to that VS is best. Otherwise, the combination of debuglogs and serviceengine tech support logs is generally best.