Configuration Audit Tool (CAT)

This appendix explains how to use the Configuration Audit Tool (CAT). CAT includes a database into which users can load and/or copy default and/or user-defined attributes by means of the loadcfgaudit.sh script. These are then used to generate audit reports.

This appendix provides information on the following:

Glossary of Terms

The following is a glossary of terms used in this appendix:

  • Chassis Type: This is the system-defined chassis or Network Element (NE) configured via WEM. ST16/ST40(ASR5000)/ASR5500 are all supported.
    Chassis Type is a key parameter in order to audit the attributes for the specified chassis and product type.
  • Product Type: A system must have the Product Type specified in order to be audited. The Product Type can be the type of service enabled on a given chassis or NE, or any user defined text. Product Type can be configured in WEM via the Configuration->NE List -> Details tab.
    Product Type is a key parameter in order to audit the attributes for the specified chassis and product type.
  • Source Chassis: Source Chassis Type is a chassis from which you want to copy default and user-defined attributes to another chassis called as destination chassis.
  • Destination Chassis: Destination Chassis Type is a chassis for which you want to load/copy attributes from either a Source chassis or from the cfgauditattrinute.csv file.
  • Static Attributes: The attributes loaded into the cfgauditattributeinfo table by default during WEM installation are called as static attributes.
  • Dynamic Attributes: Attributes which are loaded from the cfgauditattribute.csv file, and any user-defined attributes configured from WEM client, are called as dynamic attributes.
  • Default Attributes: Attributes which are loaded from the cfgauditattribute.csv file to the cfgauditattributeinfo table are called as dynamic attributes.
    Please see the Default Attributes Table in this appendix for more information about supported attributes.
  • User Defined Attributes: Attributes which you configure from a WEM client are called as user-defined attributes.
    Please see the Default Attributes Table in this appendix for more information about supported attributes.
  • loadcfgaudit.sh Script: This script is used to:
    Load default attributes into the CAT database.
    Copy default attributes, and any user-defined attributes you might have configured from a WEM client, from one source chassis type and/or product type to other chassis type.
    Copy default attributes, and any user-defined attributes you might have configured from a WEM client, from one source chassis type and product type for other chassis type and new product type.
    Please see “Using the loadcfgaudit.sh Script” for more information.
  • cfgauditattribute.csv File: This file contains default audit attributes in the .CSV (comma separated value) format.

Glossary of Terms

The following is a glossary of terms used in this appendix:

  • Chassis Type: This is the system-defined chassis or Network Element (NE) configured via WEM. ST16/ST40(ASR5000)/ASR5500 are all supported.
    Chassis Type is a key parameter in order to audit the attributes for the specified chassis and product type.
  • Product Type: A system must have the Product Type specified in order to be audited. The Product Type can be the type of service enabled on a given chassis or NE, or any user defined text. Product Type can be configured in WEM via the Configuration->NE List -> Details tab.
    Product Type is a key parameter in order to audit the attributes for the specified chassis and product type.
  • Source Chassis: Source Chassis Type is a chassis from which you want to copy default and user-defined attributes to another chassis called as destination chassis.
  • Destination Chassis: Destination Chassis Type is a chassis for which you want to load/copy attributes from either a Source chassis or from the cfgauditattrinute.csv file.
  • Static Attributes: The attributes loaded into the cfgauditattributeinfo table by default during WEM installation are called as static attributes.
  • Dynamic Attributes: Attributes which are loaded from the cfgauditattribute.csv file, and any user-defined attributes configured from WEM client, are called as dynamic attributes.
  • Default Attributes: Attributes which are loaded from the cfgauditattribute.csv file to the cfgauditattributeinfo table are called as dynamic attributes.
    Please see the Default Attributes Table in this appendix for more information about supported attributes.
  • User Defined Attributes: Attributes which you configure from a WEM client are called as user-defined attributes.
    Please see the Default Attributes Table in this appendix for more information about supported attributes.
  • loadcfgaudit.sh Script: This script is used to:
    Load default attributes into the CAT database.
    Copy default attributes, and any user-defined attributes you might have configured from a WEM client, from one source chassis type and/or product type to other chassis type.
    Copy default attributes, and any user-defined attributes you might have configured from a WEM client, from one source chassis type and product type for other chassis type and new product type.
    Please see “Using the loadcfgaudit.sh Script” for more information.
  • cfgauditattribute.csv File: This file contains default audit attributes in the .CSV (comma separated value) format.

Please see “Using the cfgauditattribute.csv File” for more information.

Using the loadcfgaudit.sh Script

This section describes the parameters, usage and limitations of loadcfgaudit.sh, with some examples.

loadcfgaudit.sh Parameters

This section describes all the parameters that will be used in the examples below.

  • -c: Source chassis type: ST16/ST40(ASR5000)/ASR5500
  • -d: Destination chassis type: ST16/ST40(ASR5000)/ASR5500
  • -f: The file name from which data will be restored [<server-dir>/scripts/cfgauditattribute.csv].
  • -l: Flag indicator for load (= 0) or copy (= 1) operation:

0 = Load the default attributes for a specified chassis type/product type.

1 = Copy the default attributes and user-defined attributes from an existing database using another chassis type and/or product type.

  • -p: Product type; for example: PDSN.

When -l = 1 and -p is specified, then it copies the attributes of both the specified source chassis type AND the product type for the specified destination chassis.

When -l = 1 but -p is not specified, then it copies the attributes of all product types supported by the specified source chassis type for the specified destination chassis type

  • -t: Destination product type.
  • -u: Postgres user. The default is postgres. (This parameter is mandatory for both -l = 0 and -l = 1).

Mandatory/Optional parameters for -l = 0/1

  • When -l = 0 (Load) the following parameters are mandatory:

-u: postgres user (Default: postgres).

-f: Name of the file from which data will be restored (<server-dir>/scripts/cfgauditattribute.csv).

-p: Product Type (e.g. HA, PDSN, PPP).

-c: Chassis Type (ST16/ST40(ASR5000)/ASR5500).

  • When -l = 1 (Copy) the following parameters are mandatory:

-u: postgres user (Default: postgres).

-c: Chassis Type (ST16/ST40(ASR5000)/ASR5500).

-d: Destination Chassis Type (ST16/ST40(ASR5000)/ASR5500).

  • When -l = 1 (Copy) the following parameters are optional:

-p: Product type; for example: PDSN.

When -l = 1 and -p is specified, then it copies the attributes of both the specified source chassis type AND the product type for the specified destination chassis.

When -l = 1 but -p is not specified, then it copies the attributes of all product types supported by the specified source chassis type for the specified destination chassis type.

-t: Destination Product Type (e.g. HA, PDSN). If -t is specified, then it copies attributes of specified source chassis type AND product type for the specified destination chassis AND product type .

loadcfgaudit.sh Script Examples

This section provides a variety of different usage examples.

IMPORTANT:

User defined attributes can be added from a WEM client.

Scenario 1: Loading Default Attributes for an IMG

Follow these steps in order to load default attributes for a newly added Intelligent Mobile Gateway (IMG), or for the first IMG added on a fresh WEM installation, and for a specific product type (i.e. PDSN).

  1. Begin by changing directories:
    Cd
    <WEM_INSTALL_PATH>/server
  2. Stop WEM services as follows:
    ./serv
    stop
  3. Change directories to the scripts folder:
    Cd <WEM_INSTALL_PATH
    >/server/scripts
  4. Execute loadcfgaudit.sh as follows: ./loadcfgaudit.sh -u postgres -l <0|1> -f <cfgauditattribute.csv file path> -c <source chassis type> -p <source product type>
    For example:
     ./loadcfgaudit.sh
    -u postgres -l 0 -f <WEM_INSTALL_PATH >/server/scripts/cfgauditattribute.csv
    -c ASR5000 -p PDSN
  5. Change to the server directory:
    Cd <WEM_INSTALL_PATH>/server
  6. Start the server.

Scenario 2: Loading Default Attributes for the First IMG in WEM

Please follow the steps described in Scenario 1: Loading Default Attributes for an IMG.

Scenario 3: Adding Subsequent IMG(s) in WEM

Loading Default Attributes

If you want to load just the default attributes, please follow the steps described in Scenario 1: Loading Default Attributes for an IMG.

Copying Default and User-Defined Attributes to a Destination Chassis in WEM

This case is more suitable when the Source chassis contains attributes for more than one product type (e.g. PDSN, GGSN and PPP) and you want to copy all attributes to the Destination chassis

Follow these steps to copy all attributes from a Source Chassis - ASR5000 - and send them to a Destination chassis - ASR5500:

  1. Begin by changing directories:
    Cd
    <WEM_INSTALL_PATH>/server
  2. Stop WEM services:
    ./serv stop
  3. Change directories:
    cd <WEM_INSTALL_PATH>/server/scripts
  4. Execute loadcfgaudit.sh as follows: ./loadcfgaudit.sh -u postgres -l <0|1> -c <source chassis type> -d <destination chassis type>
    For example:
    ./loadcfgaudit.sh
    -u postgres -l 1 -c ASR5000 -d ASR5500 
  5. Change directories:
    Cd <WEM_INSTALL_PATH>/server
  6. Start the server.

If required, you can specify multiple destination chassis by using a comma with no spaces.

For example:
./loadcfgaudit.sh
-u postgres -l 1 -c ASR5000 -d ASR5500,<CHASSIS2>,<CHASSIS3>

Copying Default and User Attributes from a Source Chassis with a Specific Product Type to a Destination Chassis in WEM

This case is more suitable when the Source chassis contains attributes for more than one product type (e.g. PDSN, GGSN and PPP) and you want to copy only the PDSN attributes to the Destination chassis.

Follow these steps to copy all default and user attributes for a chassis type ASR5000, AND product type PDSN to a Destination chassis - ASR5500:

  1. Begin by changing directories:
    Cd
    <WEM_INSTALL_PATH>/server
  2. Stop WEM services:
    ./serv stop
  3. Change directories:
    cd <WEM_INSTALL_PATH>/server/scripts
  4. Execute loadcfgaudit.sh as follows: ./loadcfgaudit.sh -u postgres -l <0|1> -c <source chassis type> -p <source product type> -d <destination chassis type>
    For example:
    ./loadcfgaudit.sh
    -u postgres -l 1 -c ASR5000 -p PDSN -d ASR5500 
  5. Change directories:
    Cd <WEM_INSTALL_PATH>/server
  6. Start the server.

If required, you can specify multiple destination chassis by using a comma with no spaces between chassis names.

For example:
./loadcfgaudit.sh
-u postgres -l 1 -c ASR5000 -d ASR5500,<CHASSIS2>,<CHASSIS3>

“Error: duplicate key violates unique constraint "cfgauditattributeinfo_pkey" Message

This error message will appear if you try using the following command to copy a product type (or types) to a destination chassis that already has that product type (or types):

./loadcfgaudit.sh
-u postgres -l 1 -c ASR5000 -d ASR5500

The solution is to use -p to specify the product type to be copied from the Source to the Destination, as follows:

./loadcfgaudit.sh -u postgres -l 1 -c <source chassis type> -p <source product type> -d <destination chassis type>

For example:

./loadcfgaudit.sh
-u postgres -l 1 -c ASR5000 -p GGSN -d ASR5500

Scenario 4: CAT Attribute Support for a New Product Type

Loading Default Attributes

If you want to load only default attributes for the new product type, then follow the steps in Scenario 1: Loading Default Attributes for an IMG.

Copying Default and User Attributes from a Source Chassis with a Specific Product Type to a Destination Chassis in WEM

This case is more suitable when the CAT database does not contain records for a new product type.

Follow these steps to copy default and user-defined attributes from a specific chassis type AND the specific product type for a newly added product type, and destination chassis type:

  1. Begin by changing directories:
    Cd
    <WEM_INSTALL_PATH>/server
  2. Stop WEM services:
    ./serv stop
  3. Change directories:
    cd <WEM_INSTALL_PATH>/server/scripts
  4. Execute loadcfgaudit.sh as follows: ./loadcfgaudit.sh -u postgres -l <0|1> -c <source chassis type> -p <source product type> -d <destination chassis type> -t <destination product type>
    For example:
    ./loadcfgaudit.sh
    -u postgres -l 1 -c ASR5000 -p PDSN -d ASR5500 -t LTE 
  5. Change directories:
    Cd <WEM_INSTALL_PATH>/server
  6. Start the server.

Limitations

Selective attribute copying from a source is not allowed.

For example, a source and destination chassis both contain attributes for product type PDSN. Now you add 10 new user-defined attributes to the source chassis. It would not be possible to take only the new user-defined attributes and copy them to the destination chassis.

Default Attributes Table

The following table describes the default attributes that can be loaded into the database using the loadcfaudit.sh script:


Table 1. Supported Default Attributes
Attribute Name Description
2nd AAA Acct Retrieve secondary AAA auth context from "show radius accounting servers" in "src" context CLI and first occurrence of key filter as "IP", return two fields, where field separator is SPACE and skip header of table
2nd AAA Auth Context (1) Retrieve secondary AAA auth context from "show radius authentication servers" in "src" context CLI and multiple occurrence of key filter as "IP", return two fields, where field separator is SPACE and skip header of table
2nd AAA Auth Context (2) Retrieve secondary AAA auth context from "show radius authentication servers" in "source" context CLI and multiple occurrence of key filter as "IP", return two fields, where field separator is SPACE and skip header of table
2nd AAA Auth Context (3) Retrieve secondary AAA auth context from "show radius authentication servers" in "dst" context CLI and multiple occurrence of key filter as "IP", return two fields, where field separator is SPACE and skip header of table
Acct Retry Retrieve accounting retry from "show configuration" command and first occurrence of key filter "accounting max-retries"
Acct Timeout Retrieve accounting timeout from "show configuration" command and first occurrence of key filter "accounting timeout”
Auth Retry Attempts Retrieve Auth retry attempts from "show configuration" command and first occurrence of key filter "radius max-retries"
Auth Seqence Retrieve auth sequence from "show pdsn-service all" command and first occurrence of key filter "PPP Authentication" from "service name" section
Auth Timeout Retrieve auth timeout from "show configuration" command and first occurrence of key filter "radius timeout"
CALEA Configured Properly Retrieve CALEA configuration from "show configuration" command and first occurrence of key filter "operator" where value contains "caleas"
CF1-Serial Number Retrieve CF1 serial number from "show license information" command and first occurrence of key filter "Serial Number" from "CF Device 1"
CF2-Serial Number Retrieve CF2-Serial Number from "show license information" command and first occurrence of key filter "Serial Number" from "CF Device 2"
Configured User Acct - Administrator Retrieve users configured as an administrator privilege from "show configuration | grep administrator" command
Configured User Acct - Inspector Retrieve users configured as Inspector privilege Inspector(s) from "show configuration | grep "inspector"" command
Configured User Acct - Operator Retrieve users configured as Operator privilege from "show configuration | grep "operator"" command
ECS Configured Retrieve ECS service name from "show active-charging service all" command and first occurrence of key filter "Service name"
ECS Mode Retrieve whether ECS service Passive Mode is enabled from "show active-charging service all" command and first occurrence of key filter "Passive Mode"
ECS Session Limits Retrieve ECS Session Limits from "show license information" command and first occurrence of key filter "ECS" from "Session Limits" section
FA-HA security associations Retrieve FA-HA security associations from "show configuration" command and multiple occurrences of key filter "fa-ha-spi"
HA Proxy List Retrieve HA proxies from "show configuration" command and multiple occurrences of key filter "redirect" from "proxy-dns" section
Hostname Retrieve system hostname from "show config" CLI and first occurrence of key filter "hostname"
IMG Version Retrieve IMG software version from "show version" CLI and first occurrence of key filter "Image Version" from "Active Software" section.
IP Pool Retrieve IP Pool info from "show config" CLI and multiple occurrences of key filter as "ip pool"
LAC Service Status Retrieve LAC Service Status from "show lac-service all" command and first occurrence of key filter "Service Status" if value contains "Not Started"
License key Retrieve license key from "show license key" command and first occurrence of key filter ""
License Key Number Retrieve license key number "show license information" CLI and first occurrence of key filter "Key Number"
Logging Level Retrieve logging level from "show logging" command and first occurrence of key filter "a10"
PAC HW Rev Retrieve PAC hardware revision from "show card hardware" CLI and multiple occurrences of key filter "Part Number" from "Packet" section. Depending on chassis type (ST16, ST40 (ASR5000), ASR5500), it will return the PAC, PSC or DPC revision.
PAC Serial Number Retrieve PAC serial number from "show card hardware" CLI and multiple occurrences of key filter "Serial Number" from "Packet" section. Depending on chassis type (ST16, ST40 (ASR5000), ASR5500), it will return the PAC, PSC or DPC serial number.
Primary AAA Acct Retrieve primary AAA auth context from "show radius accounting servers" in "src" context CLI and first occurrence of key filter as "IP", return two fields, where field separator is SPACE and skip header of table
Primary AAA Auth Context (2) Retrieve Primary AAA auth context from "show radius authentication servers" in "src " context CLI and first occurrence of key filter as "IP", return two fields, where field separator is SPACE and skip header of table
Primary AAA Auth Context (3) Retrieve primary AAA auth context from "show radius authentication servers" in "source " context CLI and first occurrence of key filter as "IP", return two fields, where field separator is SPACE and skip header of table
Primary AAA Auth Context (1) Retrieve Primary AAA auth context from "show radius authentication servers" in "dst " context CLI and first occurrence of key filter as "IP", skip header of table
Primary Bulkstat Server Retrieve primary bulk statistic server from "show bulkstat" command, and first occurrence of key filter "Primary"
Primary DNS Server Retrieve primary DNS server from "show configuration" command, and first occurrence of key filter "dns primary"
Primary NTP IP Address Retrieve primary NTP IP address from "show config" CLI and multiple occurrences of key filter as "server" and single occurrence from "ntp" and "enable" sections.
Regional Contact Retrieve regional contact from "show configuration" command and first occurrence of key filter "system contact"
Secondary Bulkstat Server Retrieve secondary bulk statistic server from "show bulkstat" command, and first occurrence of key filter "Secondary" from "Bulkstats Receivers"
Secondary DNS Server Retrieve Secondary DNS server from "show configuration" command, and first occurrence of key filter "dns secondary"
Sessions Configured Retrieve sessions configured from "show license information" command, and first occurrence of key filter "PDSN" from "session limits" section.
SNMP Servers Retrieve SNMP servers from "show configuration" command, and multiple occurrences of the key filter "snmp target"
System uptime Retrieve System uptime from "show system uptime" command, and first occurrence of the key filter "uptime"
Vendor/Model Retrieve vendor/model information from "show version" CLI, and first occurrence of the key filter "boot image"


CAT Configuration Example

This section provides examples for the entire sequence to configure CAT. We suggest you use this information in conjuction with the WEM Online Help.

Creating E-Mail Recipients

You can arrange to have reports emailed to any interested parties, but to do that you need to set up subscribers first. Follow these steps to add subscribers.

  1. Navigate to Configuration Menu\System\WEM Mail Subscription.
  2. Select an IMG, or click the checkbox to select ALL.
  3. Select a WEM feature or click the checkbox to select ALL.
  4. Enter an email address in any or all of the To, CC, and BCC fields and click the arrow symbol to add the email address.

Adding an IMG with a Product Type

Follow these steps in WEM to add an IMG with a product type:

  1. Navigate to Configuration\NE List.
  2. Click the Add button to open the Add NE screen.
  3. Enter the NE name and IP address.
  4. Click the Details tab.
  5. Enter a product type. For this example, use LTE.
  6. Click Apply and click OK.
  7. Add an appropriate map and save the topology.

Configuring Default Attributes

Follow these steps to add default attributes. Refer to “Using the loadcfgaudit.sh Script” for more information.

  1. Navigate to the scripts directory
     /export/home/SQA/ems/server/scripts
  2. Run the scripts similar to the following example, where the product type is LTE and the chassis type is ST40:
    ./loadcfgaudit.sh /export/home/SQA/ems/postgres
    5432 postgres /export/home/SQA/ems/server/scripts/cfgauditattribute.csv
    LTE ST40

Configuring Required Dynamic Attributes

Follow the steps in this example to configure dynamic attributes.

IMPORTANT:

Fields requiring a chassis type are automatically populated with the chassis type you entered when you created the NE.

  1. Navigate to Security Menu\Configuration Audit\Query Information.
  2. Click the Add button to open the Add Configuration Audit Query screen.
  3. Enter an attribute name (for example IMG version).
  4. Enter the CLI command (for example, enter show version).

    IMPORTANT:

    The output of any command whose length exceeds 255 bytes would be displayed partially.

  5. Complete the optional Section\Sub-Section frame. For this example, use the section name active software.and select Single from the Occurrence drop-down box. This will ignore the output of show version until the first occurrence of the active software string. Then the value for the image version string is returned.
    If there is an entry for Section/Sub-Section, the Keyword frame is no longer optional. (Refer to the “Using the cfgauditattribute.csv File” section for keyword definitions.)
  6. Click the + symbol to add the attribute, which then appears in the frame beneath the Keyword frame, as follows:EMAIL_Subscr
  7. Click the Apply button, then click OK.
  8. Navigate to Security Menu\Configuration Audit\Query Information and verify the attribute was added correctly.
  9. Repeat these steps to add more attributes as necessary.

Configuring Audit Attribute Groups

Follow the steps in this example to configure an attribute group.

  1. Navigate to Security Menu\Configuration Audit\Query Information.
  2. Click the Configure Group button.
  3. Create an entry in the Group Name field; for example, Group1.
  4. Select the appropriate attributes from the Available Audit Attributes list and click the + sign to add them to the Group Attribute List panel.
  5. When all the attributes are selected, click the + sign to the right of the screen to add the group to the Audit Attribute Groups panel, then click the Apply button.

Scheduling an Audit Report

Follow the steps in this example to schedule an audit report.

  1. Navigate to Security Menu\Configuration Audit\Schedule.
  2. Select an IMG from the list of available IMGs. Ensure the IMG is manageable by checking the Map Information panel in the opening WEM topology screen.
  3. Select a date and time to run the report. This needs to be set at least 15 minutes from the current time.
  4. Select a time zone from the drop-down list.
  5. Select a configured group name, or ALL.
  6. Select a recurrence pattern for the report.
  7. Click the + button to add the schedule to the Schedule Table panel.
  8. Enter a valid user name and password.
  9. Select XLS as the report format and click the checkboxes for the report mailing (usually Send Notification and Attach Report)
    Refer to the example below if necessary:
  10. Click Apply to create a confirmation popup.

Verifying Audit Reports

Follow the steps in this example to view your audit reports.

  1. Navigate to Security Menu\Configuration Audit\Results and open the All IMGs tab.
  2. Select the radio button for the appropriate filter: 7 Days, 30 Days, 180 Days
  3. Confirm the fields are correct (particularly that the Status field reads “Success”).
  4. Select an entry from the table and click the View Report button.
  5. Verify the information in the report is correct.

Configuring an On-Demand Audit

Rather than waiting for a scheduled audit to appear in the Results screen, you can configure an on-demand audit.

Navigate to Security Menu\Configuration Audit\On Demand.

This is an abbreviated version of the Configuration Audit Schedule screen, but without the Recurrence Pattern and Schedule Table requirements. The field descriptions are the same as for the “Scheduling an Audit Report” section above.

Using the cfgauditattribute.csv File

This file contains default audit attributes in .CSV (comma separated value) format. Attributes from this file are parsed and stored in the CAT database.

The following is a sample record from the cfgauditattribute.csv file:

Primary AAA Auth Context (2),20,0,,context source\,show radius authentication servers,,,0,IP,0,4,,,,f,<space>,2,,

Each value in the above record maps directly to the following columns in the cfgauditattributeinfo table, as follows:

  • Attributename: Attribute name.
  • Attributeorder: Specifies the attribute sequence ID.
  • Chassistype: Specifies the type of chassis on which to load the default attributes (e.g.ASR5000).
  • Producttype: Specifies the product type for the default attributes (e.g. PDSN).
  • Cli: Defines the cli executed in order to return the expected attribute value.
  • Defaultvalue: Specifies the attribute’s default value.
  • Subsection: If defined, the values from the specified section for the specified key pattern will be reported.
  • Subsectionoccr: Subsection occurrence; this specifies whether to report single or multiple occurrences.
  • Keyword: Specifies the key to be searched in CLI output.
  • Keywordoccr: Keyword occurrence; this specifies whether to report single or multiple occurrences for CLI output.
  • Keypattern: Specifies the pattern to report the value.
  • Keyvaluesearch: Specifies the exact value to be searched in output return by keyword search.
  • Keyvaluematch: Specifies the value to return when the value specified in Keyvaluesearch is matched.
  • Keyvaluenotmatch: Specifies the value to return when the value specified in Keyvaluesearch is not matched.
  • Isstatic: Specifies whether an attribute is either static or dynamic.
  • Fieldseparator: Specifies the field separator to be used while extracting fields from the output.
  • Fields: Specifies the field numbers to be extracted based on the specified field separator.
  • Outputfieldseparator: Specifies a field delimiter in output fields.
  • Validvalue: Specifies the attribute’s valid value.

Using the exportNrestoreCfgAttr.sh Script

This section describes the parameters, usage and limitations of the exportNrestoreCfgAttr.sh script, with some examples.

You can use this script when you have configured CAT attributes (default and user defined attributes) on one of the WEM and you want to copy those attributes to some other WEM. You should perform this export and restore operation in maintenance window as this requires the server to be shut down.

exportNrestoreCfgAttr.sh Script Parameters

This section describes all the parameters that are used in the examples below.

  • -u: postgres user [Default: postgres]
  • -o: Operation to perform export or restore. Valid values: {export, restore}
  • -d: Path of directory where CAT database schema and table dump will be stored.
  • -h: Help

exportNrestoreCfgAttr.sh Script Examples

If you already have CAT attributes configured in WEM (WEM_src) and you want to copy all these attributes to other WEM (WEM_dest), this can be achieved using the exportNrestoreCfgAttr.sh script. You have to first execute this script for the export operation to export or copy attributes from WEM_src to some location. Then again execute same script to restore attributes with restore operation as input parameter.

Scenario 1: Export CAT attributes information

Following are the steps to Export or copy CAT attributes from WEM_src WEM.

  1. Change directory to the scripts folder:
    cd <WEM_SRC_INSTALL_PATH>/server/scripts
  2. Execute exportNrestoreCfgAttr.sh script as follows:
    ./exportNrestoreCfgAttr.sh
    -o <export|restore>
     -u postgres -d <path>
    For example:
    ./exportNrestoreCfgAttr.sh
    -o export -u postgres -d /tmp/catdb
  3. Change directory to the server folder:
    cd <WEM__SRC_INSTALL_PATH>/server

Result

  1. The script creates /tmp/catdb directory.
  2. CAT database schema dump is stored in the cfgAuditSchema.dump file in /tmp/catdb directory. Schema dump is required to check schema compatibilty before restoring the CAT attributes, as there might be schema change in WEM_dest if WEM version is different.
  3. It export or copy CAT attributes configured and CAT database schema dump of WEM_src in attributeInfo.dump file in /tmp/catdb directory.

Scenario 2: Restore CAT attributes information

Following are the steps to restore CAT attributes to WEM_dest WEM.

  1. Login to machine where WEM_dest is installed.
    cd <WEM_DEST_INSTALL_PATH>/server
  2. Stop WEM services.
    ./serv stop
  3. Change directories:
    cd <WEM_DEST_INSTALL_PATH>/server/scripts
  4. Execute exportNrestoreCfgAttr.sh script as follows:
    ./exportNrestoreCfgAttr.sh
    -o <export|restore> -u postgres -d <path>
    For example:
    ./exportNrestoreCfgAttr.sh
    -o restore -u postgres -d /tmp/catdb
  5. Change directory:
    cd <WEM_DEST_INSTALL_PATH>/server
  6. Start the server using the following command:
    ./serv
    start

Result

  1. CAT database schema dump is stored in cfgAuditSchema_dest.dump file in the /tmp/catdb directory. Schema dump is required to check schema compatibility before restoring the CAT attributes. As there might be schema change in WEM_dest if WEM version is different.
  2. CAT database schema dump of WEM_src and WEM_dest is compared.
  3. If CAT database schemas is not same then error message is reported as follows: "CAT database schema does not match, cannot proceed with restore operation."

Limitations

During restore operation dynamic and user defined attributes configured on destination WEM, that is, WEM_dest are deleted.