Supportconfig Analysis Patterns

Creating Custom Patterns

The Supportconfig Analysis (SCA) appliance uses scripts or programs to parse supportconfig archive files looking for specific known issues. The scripts or programs are patterns. You can create your own custom patterns for local use. The Supportconfig Analysis pattern database is used to manage and create pattern templates to speed up development time.

Pattern library documentation is available for Python and Perl.

Pattern Requirements

A Supportconfig Analysis pattern has the following requirements:

Creating a Pattern

  1. Click on the Create A Pattern link
  2. Fill in the fields, using the Help button as necessary
  3. Click the Submit Pattern button
  4. When you return to the pattern list, click on the new pattern's title to edit
  5. Make sure your pattern type is correct, and click the Generate Template button
  6. NOTE: Bash patterns tend to take the longest to run.

  7. Use the library documentation for help with function calls specific to Python or Perl
  8. Copy and paste this starting code to your editor
  9. Write the code necessary to parse the supportconfig files and indentify a known issue
  10. NOTE: The templates use libraries to help meet the Pattern Requirements above

  11. Save your pattern to the local pattern directory (Default: /usr/lib/sca/patterns/local)
  12. Change the owner of your pattern file to sca
  13. Add execute permission to the owner of your pattern file
  14. Your pattern will be run against all new supportconfigs uploaded to the appliance

Testing Pattern Output

Once you have finished your pattern, you can test its effectiveness with a command line tool called pat.

  1. Copy and extract the supportconfig archives to test against into the archive directory (Default: /var/log/archives)
  2. If you already have supportconfig archives extracted in a different location, run 'export ARCHDIR=/path/to/your/archives' to set the pattern tester archive location
  3. Change to the directory where your pattern is located (ie /usr/lib/sca/patterns/local)
  4. Run pat followed by your pattern name
  5. Compare the output to the Pattern Requirements above
  6. Review the pat documentation for any errors