SCA Documentation


Changing the Default Passwords

The default password for root, mariadb root and the SCA web page is linux. Each should be changed once the appliance has been installed.

    Changing the SCA web page username and/or password
  1. Login as root at the system console
  2. Edit /srv/www/htdocs/sca/web-config.php
  3. Change the $username and $password values as you want
  4. Save and exit
    Changing the system root password
  1. Login to the system console as root using the default password of linux
  2. Type passwd
  3. When prompted type in your new system root user password
    Changing the MariaDB (MySQL) database root password
  1. Login as root at the system console
  2. Run /usr/bin/mysql_secure_installation

SCA Appliance Administration

You can do some database maintenance and administration using the scadb command. Login as root and run the command.

################################################################################
# Supportconfig Analysis Database Tool
################################################################################

Usage: scadb [OPTION]

OPTIONS
 help                 Shows this screen
 check                Checks, optimizes and repairs tables
 empty                Truncates Archives and Results, resets Agents and AgentWorkers
 backup               Creates a mysqldump file of the ServerDiagnostics database
 cmd <query>          Supports a custom query
 import <file>        Imports the file
 old <int>            Deletes old archives greater than <int> days old
 del <int>            Deletes archive with <int> ArchiveID
 reset agents         Activates the Agent and clears the agent threads
 archive reset <int>  Configures an archive with archive ID <int> to be reanalyzed
 archive ignore <int> Sets archive to error with archive ID <int>
 workers add <int> on <agent_id>  Increases the number of agent threads by <int> amount on <agent_id>
 workers del <int> on <agent_id>  Decreases the number of agent threads by <int> amount on <agent_id>
 maint                Changes to maintenance mode, use 'reset agents' to clear


Archive Mode

The default behavior is to delete all supportconfig archives in the /srv/ftp/upload directory once they have been successfully processed. However, you can change this behavior so the supportconfig archives are left in the /srv/ftp/upload directory for archive purposes. This is helpful when you want to save supportconfigs off the server. Comparing a supportconfig from a problem server with the supportconfig from its previously working condition is a valuable troubleshooting technique. Enabling Archive Mode also activates a hyperlink to the archive in the SCA Report's Archive File field.

Do the following to enable archive mode:

  1. Login to the SCA Appliance console as root
  2. Edit /etc/sca/sdagent.conf
  3. Change ARCHIVE_MODE=0 to ARCHIVE_MODE=1
  4. Save and exit
  5. All future supportconfigs will remain in the appliance's /srv/ftp/upload directory
  6. NOTE: You are responsible for file rotation. Don't let the SCA Appliance run out of disk space.

Emailing SCA Reports

The SCA Appliance can email a report HTML file for each supportconfig analyzed.

Do the following to configure emailing SCA Reports.

  1. Login to the SCA Appliance console as root
  2. Edit /etc/sca/sdagent.conf
  3. Change root in EMAIL_REPORT='root' to a list of email addresses, separated by spaces, to which you want SCA Reports sent.
  4. For example: EMAIL_REPORT='me@my.company.com you@my.company.com'
  5. Change the STATUS_NOTIFY_LEVEL from $STATUS_OFF to the level of reports you want sent.
  6. Save and exit
  7. All future SCA Reports will be emailed to the specified addresses
  8. No reboot or restart required

SCA Appliance Updates

The SCA Appliance and its associated patterns are built in the OpenSUSE Build Service project Supportconfig Analysis Appliance. The appliance is linked to this OBS service making it possible to update your SCA Appliance when new patterns or updates are available. You do not need to reimage your server or VM. Patterns will automatically be updated each night when sdagent-patterns is run, but you can update the appliance and patterns manually. The appliance packages must be manually updated since sdagent-patterns only updates the patterns.

Do the following to manually update the SCA Appliance Patterns

  1. Login to the SCA Appliance console as root
  2. Run sdagent-patterns

Do the following to update the SCA Appliance

  1. Login to the SCA Appliance console as root
  2. Run zypper --no-gpg-checks refresh to refresh the update repositories
  3. Select one of the following:

SCA Appliance Backup

You can backup the database of archives analyzed. This is useful when you want to reimage the appliance or update to a new version of the appliance.

Do the following to backup your SCA Appliance database

  1. Login to the SCA Appliance console as root
  2. Run scadb maint to put the appliance in maintenance mode
  3. Run scadb backup
  4. Run scadb reset agents to activate the appliance
  5. Copy the sca-backup-*sql.gz file to another server

SCA Appliance Restore

You restore the SCA Appliance database data from the scadb backup file.

Do the following to restore your SCA Appliance database

  1. Login to the SCA Appliance console as root
  2. Copy the newest sca-backup-*sql.gz file to the SCA Appliance
  3. Run gzip -d sca-backup-*sql.gz to extract the file
  4. Run scadb import sca-backup-*sql to restore the data from the file into the database
  5. Run scadb reset agents to activate the appliance
  6. Run sdagent-patterns -u to update the pattern modules in the database

Automating Supportconfig Uploads to the SCA Appliance

The purpose of the SCA Appliance is to automatically analyze supportconfig archives. You can setup your SLES servers to automatically upload a supportconfig to the SCA Appliance on a regular basis to monitor any change in the server's health. The SCA Appliance is already configured as an anonymous FTP server. The only thing left is to setup a crontab entry on each SLES server so they will upload their supportconfig.

For this example, I will assume your SCA Appliance hostname is sca.company.com, and server you want analyzed is server.company.com

  1. Login to server.company.com as root
  2. Make sure your supportutils package that provides supportconfig is up-to-date (see Getting the Latest Supportconfig)
  3. Run crontab -e to create a supportconfig crontab entry
  4. Create the following entry
  5. # Run supportconfig in quiet mode on the first day of the month at 2:05am
    5 2 1 * * /sbin/supportconfig -QU "ftp://sca.company.com/upload"
  6. Save and quit

Basic Server Health Checks

When a server is not behaving correctly, it is important to check some basic server conditions such as free disk space, CPU utilization, memory usage and running process status. The SCA Appliance checks these basic conditions for you in the "Basic Health" category in the reports. However, you can manually review the conditions in the supportconfig archive.

Refer to A Basic Server Health Check with Supportconfig for more details.


Getting the Latest Supportconfig

The SCA Appliance relies on the data gathered by supportconfig. It is always a good idea to use the latest supportconfig provided in the supportutils package on servers you are analyzing. SLES10 SP3 and newer ship with the supportutils package, other versions of SLES do not.

To update from the published update channels, run zypper up supportutils.

To update from the openSUSE Build Service (OBS), refer to "Supportconfig for Linux", Option A. This is the absolute current version.


Troubleshooting Supportconfig Hangs

Sometimes supportconfig will hang. You can find out which command is causing the hang or even attempt to by-pass the hang using the Ctrl-\ key.

Refer to Troubleshooting a supportconfig Hang for more details.