Recreate the Vertica Database in DX NetOps Performance Management
search cancel

Recreate the Vertica Database in DX NetOps Performance Management

book

Article ID: 46236

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

This will tell you how to drop and recreate the Vertica database in a Performance Management system.

WARNING: By performing this you will lose all data. This is performed as a last resort solution for when you are unable to get the Vertica database back up again.

The DX NetOps Performance Management Data Repository Vertica database is unrecoverable. There are no backups available for use in restoration. How can we rebuild?

Environment

Dx NetOps Performance Management any version

Resolution

Complete the following steps to reset the environment.

Single Data Aggregator process

  1. To obtain a list of device IPs and names before reset for use in rediscovery post rebuild run the following.
    • Enter the MySql DB password when prompted.
    • The default install path is referenced. Change as needed.
    • The output file is saved in /tmp. Change as needed if /tmp is not available for use.
    • Command:
      • /opt/CA/MySql/bin/mysql -uroot -p netqosportal  -e "select td.itemname, REPLACE(inet6_ntoa(td.address),'::ffff:',''), IF(tdom.ItemName IS NULL, tdomi.ItemName, tdom.ItemName) from t_device td inner join t_domain tdom on td.domainid=tdom.itemid left join t_domain_i18n tdomi on td.domainid=tdomi.itemid where tdomi.cultureid='en-US' order by 3, 2;" > /tmp/IP-List.out
  2. Remove the Data Aggregator (DA) Data Source (DS) from the NetOps Portal Manage Data Source page.
    1. Go to Administration->Data Sources->Data Sources
    2. Delete the DA DS and ONLY the DA DS.
      • No other DS entries need to be removed.
      • If the Delete option is not available ensure the users Role Rights include the Delete Data Sources Role Right.
  3. Stop the DA & Data Collector (DC) Services before uninstalling them
  4. Uninstall the DA & DC(s) following the documented steps.
    • Uninstall Performance Management documentation topics 
    • Ensure each host is rebooted post uninstall.
      • It is important there is no trace of the install left after reboot. Ensure the install directory structure is removed.
  5. Drop and then recreate the Data Repository (DR) DB via the Vertica adminTools UI.
    1. Log into the DR DB cluster as the dradmin user and launch adminTools.
    2. Select #6 Configuration Menu
    3. Select #7 Drop Database
    4. Select #1 Create Database
      1. Database Mode selection screen: Select "Enterprise Mode"
      2. Create Database screen:
        • Set the DB Name in the Database name field.
        • Comments field can be left blank. It is optional.
  6. Reinstall the DA and DC(s) per the documentation.
  7. Add the DA as a DS in the NetOps Portal Manage Data Source page
    1. Go to Administration->Data Sources->Data Sources
    2. Add a new DA DS using the reinstalled host details.

 

Fault Tolerant Data Aggregator process

  1. To obtain a list of device IPs and names before reset for use in rediscovery post rebuild run the following. Enter the MySql DB password when prompted.
    • Enter the MySql DB password when prompted.
    • The default install path is referenced. Change as needed.
    • The output file is saved in /tmp. Change as needed if /tmp is not available for use.
    • Command:
      • /opt/CA/MySql/bin/mysql -uroot -p netqosportal  -e "select td.itemname, REPLACE(inet6_ntoa(td.address),'::ffff:',''), IF(tdom.ItemName IS NULL, tdomi.ItemName, tdom.ItemName) from t_device td inner join t_domain tdom on td.domainid=tdom.itemid left join t_domain_i18n tdomi on td.domainid=tdomi.itemid where tdomi.cultureid='en-US' order by 3, 2;" > /tmp/IP-List.out
  2. Remove the Data Aggregator (DA) Data Source (DS) from the NetOps Portal Manage Data Source page.
    1. Go to Administration->Data Sources->Data Sources
    2. Delete the DA DS and ONLY the DA DS.
      • No other DS entries need to be removed.
      • If the Delete option is not available ensure the users Role Rights include the Delete Data Sources Role Right.
  3. Stop the DA & Data Collector (DC) Services before uninstalling them
  4. Uninstall the DA, clean up the Proxy (no uninstall needed) & Uninstall the DC(s) following these steps.
    1. Proxy host:
      • No uninstall is needed.
      • Delete the consul/data directory and restart consul, to clear out the acl token/etc.
    2. Uninstall the DAs and DCs.
      • See the Uninstall Performance Management documentation topics for specific uninstall steps.
      • Ensure each host is rebooted post uninstall.
        • It is important there is no trace of the install left after reboot.
        • Ensure the install directory structure is removed post reboot.
    3. Clean out the shared data directory.
      1. If the shared data directory contains custom Certifications, Metric Families, Extensions, Attributes or DeviceTypes.xml overrides be sure to save those off before cleaning things up further.
      2. After saving custom files off to a safe location delete everything under the shared data directory.
        • NOTE: Restore the files save here after the new DA installs complete in step 6 below.
      3. Leave the directory itself, no need to remove that.
  5. Drop and then recreate the Data Repository (DR) DB via the Vertica adminTools UI.
    1. Log into the DR DB cluster as the dradmin user and launch adminTools.
    2. Select #6 Configuration Menu
    3. Select #7 Drop Database
    4. Select #1 Create Database
    5. Database Mode selection screen: Select "Enterprise Mode"
      1. Create Database screen:
        • Set the DB Name in the Database name field.
        • Comments field can be left blank. It is optional.
  6. Reinstall the DA and DC(s) per the documentation.
    • Installing documentation topic 
    • Restore any saved customizations from step 4.3.1 above.
  7. Add the DA as a DS in the NetOps Portal Manage Data Source page
    1. Go to Administration->Data Sources->Data Sources
    2. Add a new DA DS using the reinstalled host details.

Additional Information

As always, please contact Broadcom support if you have further questions

  • Releases 21.2.7 and earlier using MySql 5.x releases:
    • /opt/CA/MySql/bin/mysql -uroot -p netqosportal -e "select td.itemname, REPLACE(v6_ntoa(td.address),'::ffff:',''), IF(tdom.ItemName IS NULL, tdomi.ItemName, tdom.ItemName) from t_device td inner join t_domain tdom on td.domainid=tdom.itemid left join t_domain_i18n tdomi on td.domainid=tdomi.itemid where tdomi.cultureid='en-US' order by 3, 2; > /tmp/IP-List.out
  • Releases 21.2.8 and newer using MySql 8.x:
    • /opt/CA/MySql/bin/mysql -uroot -p netqosportal  -e "select td.itemname, REPLACE(inet6_ntoa(td.address),'::ffff:',''), IF(tdom.ItemName IS NULL, tdomi.ItemName, tdom.ItemName) from t_device td inner join t_domain tdom on td.domainid=tdom.itemid left join t_domain_i18n tdomi on td.domainid=tdomi.itemid where tdomi.cultureid='en-US' order by 3, 2;" > /tmp/IP-List.out