Collecting a 'must-gather'

After you've done a few of these, automating the process saves a lot of time. Here's a script that collects the 'Must-Gather' information for webseal support.

must_gather

#/bin/bash

# Use a temporary folder to build our output in
TMP=/tmp/must_gather

# Gather "Part A" or webseal specific info into these files
PD_VER=$TMP/pdversion_output
GS_VER=$TMP/gsk7ver_output
WS_VER=$TMP/webseald_output
WS_CNF=$TMP/webseald-default.conf
WS_JCT=$TMP/jct
WS_SSO=$TMP/fsso
TRACES=$TMP/logs_and_traces

# Clean up anything that may be left over
rm -rf $TMP
mkdir $TMP
mkdir $TRACES

# Get WebSEAL info assembled
pdversion > $PD_VER
gsk7ver > $GS_VER
sudo /opt/pdweb/bin/webseald -version > $WS_VER
sudo cp -a /opt/pdweb/etc/webseald-default.conf $WS_CNF
sudo cp -ar /opt/pdweb/www-default/jct $WS_JCT
sudo cp -ar /opt/pdweb/fsso $WS_SSO
sudo cp -a  /opt/PolicyDirector/etc/pd.conf $TMP/
sudo cp -a  /opt/PolicyDirector/etc/ldap.conf $TMP/

# Get traces assembled
sudo cp -a /var/pdweb/www-default/traces/pdweb.debug.txt* $TRACES
sudo cp -a /var/pdweb/www-default/log/request.log $TRACES
sudo cp -a /var/pdweb/log/msg__webseald-default.log $TRACES


sudo chown -R `whoami` $TMP


tar -czf must_gather.tgz -C /tmp must_gather


Comments