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 UI, or using a CLI.

Steps
Check database synchronization from the NSP UI
 

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


View the information in the Database Synchronization Status panel, which lists the synchronization completion percentage for the following:

  • graph.db—Neo4j database

  • postgres—PostgreSQL database

  • system—internal NSP database

To view expanded details for a database, click png45.png View on the list item.

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 in the following format:

{

"message": "Data retrieved",

"data":

[

{

"dcName": "string",

"dbName": "string", // postgres|neo4j

"podName": "string",

"role": "string", // PRIMARY|STANDBY for postgres, LEADER|FOLLOWER|READ_REPLICA for neo4j

"activeSize": "string",

"sizeUnit": "string", // 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

},

],

"status": "success"

}


Review the information.


Close the console window.

End of steps