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:
- Be executable, so bash can execute it by referencing the filename only
- Accepts a -p start up parameter with the value of the path to the extracted archive
- Writes a case sensitive, order dependent information string to stdout
META_CLASS=<string>|META_CATEGORY=<string>|META_COMPONENT=<string>|PATTERN_ID=<pattern_filename>|PRIMARY_LINK=META_LINK_<TAG>|OVERALL=[0-5]|OVERALL_INFO=<message string>|META_LINK_<TAG>=<URL>[|META_LINK_<TAG>=<URL>]
- A pattern supports a maximum of 12 solution links - one TID, one BUG and 10 custom links
- Provide at least one solution link
- Set the OVERALL status value to 0-6, -1 being invalid
0 = SUCCESS
1 = RECOMMEND
2 = PROMOTION
3 = WARNING
4 = CRITICAL
5 = ERROR
6 = IGNORE
- Set the OVERALL_INFO value to the report's display string
Creating a Pattern
- Click on the Create A Pattern link
- Fill in the fields, using the Help button as necessary
- Click the Submit Pattern button
- When you return to the pattern list, click on the new pattern's title to edit
- Make sure your pattern type is correct, and click the Generate Template button
NOTE: Bash patterns tend to take the longest to run.
- Use the library documentation for help with function calls specific to Python or Perl
- Copy and paste this starting code to your editor
- Write the code necessary to parse the supportconfig files and indentify a known issue
NOTE: The templates use libraries to help meet the Pattern Requirements above
- Save your pattern to the local pattern directory (Default: /usr/lib/sca/patterns/local)
- Change the owner of your pattern file to sca
- Add execute permission to the owner of your pattern file
- 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.
- Copy and extract the supportconfig archives to test against into the archive directory (Default: /var/log/archives)
- 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
- Change to the directory where your pattern is located (ie /usr/lib/sca/patterns/local)
- Run pat followed by your pattern name
- Compare the output to the Pattern Requirements above
- Review the pat documentation for any errors