Automated Support Report Generation and Posting

Goal

To periodically generate a support report for a 63xx-series router and post it to a site where the report can be downloaded later.

Background

Support reports provide a snapshot of a device's current settings and connection status at the time of the report's generation. Typically, this report is manually generated, and the relevant log files are packaged into a .bin file that can be downloaded from the local (Web) UI of all Accelerated devices. For more information about generating support reports, please click here.

However, in certain setups or for sites that are undergoing troubleshooting scrutiny, it is beneficial to periodically generate a support report that can be analyzed offline later.  The following script, when setup in the configuration profile as shown below, will generate a support report and post it to a public pastebin site where the report can be downloaded for offline inspection later.

This will post the raw contents of the support report binary tarball to a URL such as the following.  

    https://clbin.com/RTArC

This link is logged to Events and Raw Events pages in aView for the device, and is also viewable on the Events and System Logs pages on the local web UI.  To view this support report, click on the link, save the page as a support_report.bin file, then extract it like you do a normal support report.  See link below for details on extracting and analyzing the support report.
   Support Report Overview

Config Setup

Minimum firmware: 17.8.128.24

Create a new custom script under System -> Scheduled tasks -> custom scripts, and enter in the following.   Adjust the Interval to 1h, or the desired interval you would like this script to run.

#!/bin/sh
  
# Generate a support report and post it to a pastebin site
# thanks to clbin for an easy to use pastebin
#   https://clbin.com/

# This will post the raw contents of the support report binary tarball to a URL
# such as the following.  This link is logged to aView, and is also viewable on
# the Events and System Logs pages on the local web UI
#   https://clbin.com/RTArC
# To view this support report, click on the link and save the page as a support_report.bin
# file, then extract it like you do a normal support report:
#    https://kb.accelerated.com/m/67492/l/944383-support-report-overview

# alternative pastebin:
#    http://sprunge.us/

url="$(/bin/gen_support_report | curl -kF 'clbin=<-' https://clbin.com)"
# Alternate pastebin. Uncomment the below and comment out the above line if desired
#url="$(/bin/gen_support_report | curl -kF 'sprunge=<-' http://sprunge.us)"
ret="$?"
if [ "$ret" = '0' ]; then
  accns_log w config "custom: support report generated on $(date) and posted to link $url"
else
  accns_log w config "error ($ret) in posting support report. check internet connectivity"
fi