Restoring Telemetry database post Omnia upgrade
After upgrading Omnia, if you want to retain the telemetry data from Omnia v1.5.1, you need to manually restore the telemetry database from the telemetry_tsdb_dump.sql file. Perform the following steps to do so:
Copy the backed up telemetry database file, that is
telemetry_tsdb_dump.sql, from thebackup_locationto/opt/omnia/telemetry/iDRAC-Referencing-Tools.Stop the Omnia telemetry services on all the cluster nodes. Run the
telemetry.ymlplaybook after setting theidrac_telemetry_support,omnia_telemetry_support, andvisualization_supportparameters tofalseininput/telemetry_config.yml. Execute the following command:cd telemetry ansible-playbook telemetry.yml -i ../upgrade/inventory
Connect to the
timescaledbpod and execute the psql commands. Perform the following steps:Execute the following command:
kubectl exec -it timescaledb-0 -n telemetry-and-visualizations -- /bin/bash
Verify that the dump file is present using the
lscommand.Connect to the psql client using the following command:
psql -U <timescaledb_user>
where “timescaledb_user” is the configured
timescaledbusername for telemetry.Drop the current database using the command below:
DROP DATABASE telemetry_metrics;
Note
If there are processes which are preventing you to drop the database, then terminate those processes and try again.
Create an empty telemetry database for Omnia v1.6.1 using the command below:
CREATE DATABASE telemetry_metrics;
Exit from the psql client using
\qcommand.Execute the following command to initiate the database restore operation:
psql --dbname=telemetry_metrics --host=<pod_external_ip> --port=5432 --username=<timescaledb_user> -v ON_ERROR_STOP=1 --echo-errors -c "SELECT public.timescaledb_pre_restore();" -f telemetry_tsdb_dump.sql -c "SELECT public.timescaledb_post_restore();"
Note
Execute the following command to obtain the
pod_external_ipandportfor thetimescaledbpod:kubectl get svc -A output
Drop the
insert_block_triggerif it exists using the following commands:psql -U omnia \c telemetry_metrics DROP TRIGGER IF EXISTS ts_insert_blocker ON public.timeseries_metrics; DROP TRIGGER IF EXISTS ts_insert_blocker ON omnia_telemetry.metrics;
Next steps
Connect to the
telemetry_metricsdatabase and verify if the restored telemetry data is present inpublic.timeseries_metricsandomnia_telemetry.metricstables.Post verification, you can choose to restart the Omnia telemetry services. Run the
telemetry.ymlplaybook after modifying theinput/telemetry_config.ymlas per your requirements. For more information regarding the telemetry parameters, click here. Execute the following command:cd telemetry ansible-playbook telemetry.yml -i ../upgrade/inventory
After telemetry services are enabled, check
omnia_telemetry.metricsandpublic.timeseries_metricstables to see if the number of rows have increased. This signifies that the fresh telemetry data from Omnia v1.6.1 is getting updated in the database.
If you have any feedback about Omnia documentation, please reach out at omnia.readme@dell.com.