Holy Supportconfig File
SUSE's Linux Enterprise Server comes with Supportutils, a tool for gathering support information that can be configured to work with containers and secure environments.
Join the DZone community and get the full member experience.
Join For FreeLet’s talk about the Supportutils tool! Sure thing, why not?
As a technical support engineer in SUSE, I rely heavily on Supportutils, which generates a file with all the configurations and logs of the system, the Holy Supportconfig File. Frankly, my job would be much more difficult without this little eminent tool, and it took me a while to get to know how to properly use it. Let’s have a look.
Where
First things first, where do I find the tool? The Supportutils package and YaST Module “yast2-support” are shipped with our SLES OSs:
root:~ # zypper se supportutils yast2-support
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
--+----------------------------+-------------------------------------+-----------
i | supportutils | Support Troubleshooting Tools | package
| supportutils | Support Troubleshooting Tools | srcpackage
i | yast2-support | Configuration of nts support tools | package
What
Official documentation about the usage of this tool and YaST Module can be found here.
Supportutils is a tool used to collect all the info of a system into a compressed file called the Supportconfig file.
Why
Needless to say, the Holy Supportconfig File is necessary for the Support Team to troubleshoot customers'/partners' problems. It is usually needed when there is a PROBLEM!
The first thing that a technical support engineer would ask for when summoned for troubleshooting an issue on any SUSE products is, indeed, a Supportconfig file.
How
Second things second, check the manual! All the options and information are listed there: The tool can generate the Supportconfig file with the default settings, it can generate the file and upload it automatically to the Support Team FTP server, it can add contact information to the tarball file like an email address or telephone number, etc., etc.
I usually ask our customers to run the tool with option “-l”:
root:~ # supportconfig -l
Gathering system information
Data Directory: /var/log/nts_hostname_170416_1021
Basic Server Health Check... Done
RPM Database... Done
Basic Environment... Done
System Modules... Done
Memory Details... Done
Disk I/O... Done
B-tree File System... Skipped
YaST Files... Done
File System List... Skipped
Auditing... Done
Crash Info... Done
NTP... Done
PROC... Done
Boot Files... Done
[..]
Creating Tar Ball
==[ DONE ]===================================================================
Log file tar ball: /var/log/nts_hostname_170416_1021.tbz
Log file size: 2.9M
Log file md5sum: 1229965fe933dbbec446df5aa6359acb
=============================================================================
With this option, the tool generates a compressed file in “/var/log” with all the configurations files, logs and even rotated logs. The file can then be attached to the Service Request via SUSE Customer Center or uploaded to the Support Team FTP server.
Especially when the file is uploaded to the FTP server, it can be very useful to add the Service Request number to the file name. The option “-r” allows us to do it:
root:~ # supportconfig -r 12345678901
Gathering system information
Data Directory: /var/log/nts_SR12345678901_hostname_170416_1032
Basic Server Health Check... Done
RPM Database... Done
Basic Environment... Done
System Modules... Done
[..]
System Logs... Done
Creating Tar Ball
==[ DONE ]===================================================================
Log file tar ball: /var/log/nts_SR12345678901_hostname_170416_1032.tbz
Log file size: 902K
Log file md5sum: b01c8b81424a419f1c4ce357d9101559
=============================================================================
The tool has also the possibility to automatically upload the tarball file to the Support Team FTP server very comfortably:
root:~ # supportconfig -u
Gathering system information
Data Directory: /var/log/nts_hostname_170416_1038_97825489-dc63-4406-bdd4-8dec628513ff
Basic Server Health Check... Done
RPM Database... Done
Basic Environment... Done
[..]
Creating Tar Ball
==[ DONE ]===================================================================
Log file tar ball: /var/log/nts_hostname_170416_1038_97825489-dc63-4406-bdd4-8dec628513ff.tbz
Log file size: 1.2M
Log file md5sum: 529ddd0ed99fb7bad2caa2dc7597a114
=============================================================================
Uploading Tar Ball
-----------------------------------------------------------------------------
curl -#T "/var/log/nts_hostname_170416_1038_97825489-dc63-4406-bdd4-8dec628513ff.tbz.md5" "ftp://anonymous@ftp.novell.com/incoming/nts_hostname_170416_1038_97825489-dc63-4406-bdd4-8dec628513ff.tbz.md5"
######################################################################## 100.0%
curl -#T "/var/log/nts_hostname_170416_1038_97825489-dc63-4406-bdd4-8dec628513ff.tbz" "ftp://anonymous@ftp.novell.com/incoming/nts_hostname_170416_1038_97825489-dc63-4406-bdd4-8dec628513ff.tbz"
######################################################################## 100.0%
I could continue for ages and go through all the options, but I’d like to focus on one in particular, the “-C” option. Supportutils has a bunch of default settings and variables, which, usually, don’t need to be touched; for example, the details for the FTP server are stored in a variable:
VAR_OPTION_UPLOAD_TARGET='ftp://anonymous@ftp.novell.com/incoming'
All those variables are stored in “/etc/supportconfig.conf” but the file is not automatically generated, the command with option “-C” creates the file and then we are able to modify it as needed:
root:~ # less /etc/supportconfig.conf
/etc/supportconfig.conf: No such file or directory
laura:~ # supportconfig -C
[..]
Overwriting /etc/supportconfig.conf with default options.
root:~ # cat /etc/supportconfig.conf
####################################
# Default Options
####################################
OPTION_AFP=1
OPTION_APPARMOR=1
OPTION_AUDIT=1
OPTION_AUTOFS=1
Now that the configuration file is created, there are many custom settings that can be implemented depending on the various need to use this tool; one of the most important customizations is to exclude certain options to be used when collecting the data from the system. For example, my system is not using Docker and Multipath. I can speed up the process by excluding these two options. I modify the file “/etc/supportconfig.conf” and I change the following entries from:
OPTION_DOCKER=1
OPTION_MPIO=1
To:
OPTION_DOCKER=0
OPTION_MPIO=0
Then I run the tool again, but now it will not collect anything related to Multipath and Docker:
root:~ # supportconfig -l
Gathering system information
Data Directory: /var/log/nts_hostname_170416_1115
Basic Server Health Check... Done
RPM Database... Done
Basic Environment... Done
[..]
Docker... Excluded
CRON... Done
[..]
Multipathing... Excluded
If the systems are locked down in a secure environment, there is probably no access to the external network, so Supportutils can be customized to use a different FTP, SCP, HTTPS, or HTTP server by changing the variable in “/etc/supportconfig.conf” related to the upload target:
VAR_OPTION_UPLOAD_TARGET='ftp://anonymous@ftp.example.com/incoming'
Then run the command again:
root:~ # supportconfig -u
With “-u”, the tool will pick the destination target, where to upload the Supportconfig File, from the variable above specified in the configuration file.
The command above does the same job of:
root:~ # supportconfig -U ftp://anonymous@ftp.example.com/incoming
As I mentioned previously, I could continue for ages showing all the amazing features and customization of this tool but, for now, let me close with just: Thank you, Holy Supportconfig File.
Published at DZone with permission of Matteo Limardo, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Trending
-
Introduction To Git
-
Never Use Credentials in a CI/CD Pipeline Again
-
How To Integrate Microsoft Team With Cypress Cloud
-
Replacing Apache Hive, Elasticsearch, and PostgreSQL With Apache Doris
Comments