How do I check NSP database synchronization?

Purpose

Perform this procedure to check the synchronization status of the database instances in the redundant NSP clusters of a DR deployment. You can check the synchronization status from the NSP GUI, or using a CLI.

Steps
Check database synchronization from the NSP GUI
 

As an NSP administrator, choose System Health from the NSP main menu.


In the System Health dashboard, click png45.png Expand Size on the Database Synchronization Status dashlet.


View the information in the expanded Database Synchronization Status list.

The Sync Status column displays the synchronization completion percentage for each of the database pods. If the Sync Status for a database is less than 99%, it is generally not safe to switch between databases, although system load is also a factor. Consider whether the system is currently under heavy load or if there are networking issues between clusters, as these factors could contribute to reduced synchronization. A Sync Status of 97-98% is acceptable on systems with high load.

If the In Recovery or Replay Paused columns are True, it is not safe to switch.

End of steps

Steps
Check database synchronization using a CLI
 

Log in as the root or NSP admin user on the NSP cluster host in the primary data center.


Open a console window.


Enter the following:

kubectl exec -n $(kubectl get pods -A | awk '/nspos-asm/ {print $1;exit}') -it $(kubectl get pods -A| awk '/nspos-asm/ {print $2;exit}') -c nspos-asm-app -- /opt/nsp/os/asm/bin/report.py ↵


Database synchronization data is returned for all NSP database instances in tabular format, with information presented under the following columns:

  • dcName - string value

  • dbName - string value (postgres | neo4j)

  • podName - string value

  • role - string value (PRIMARY | STANDBY for postgres, LEADER | FOLLOWER | READ_REPLICA for neo4j)

  • activeSize - string value

  • sizeUnit - string value (Bytes for postgres, Commits for neo4j)

  • isInRecovery - null (or boolean for postgres)

  • isReplayPaused - null (or boolean for postgres)

  • receivedSize - null (or string for postgres)

  • replaySize - null (or string for non primary/leader instances)

  • lastReplayTimeStamp - null (or timestamp string for postgres)

  • missingSize - null (or string for non primary pg instances)

  • dataToTransfer - null (or string for non primary pg instances)

  • dataToProcess - null (or string for non primary/leader instances)

  • syncPercentage - double (real number 0-100)


Review the information.

If “syncPercentage” for a database is less than 99%, it is generally not safe to switch between databases, although system load is also a factor. Consider whether the system is currently under heavy load or if there are networking issues between clusters, as these factors could contribute to reduced synchronization. A “syncPercentage” of 97-98% is acceptable on systems with high load.

If “isInRecovery” or “isReplayPaused” are True, it is not safe to switch.


Close the console window.

End of steps