Product Documentation

StrongKey provides an SQL query in a file named counts_v2.sql (shown at the end of this chapter) which can be used as is, or in conjunction with system monitoring tools - such as Grafana, Nagios, Zabbix, etc. - to periodically count the database schema of the appliance to get the number of records within each table.

 

Using the SQL query is as simply as using the mysql command while authenticated as the skles user (or root user) on the cluster-node and sourcing the SQL query file as follows – you will need to be in the directory where the counts_v2.sql file is located – we recommend copying it into the /usr/local/software/tools folder:

shell> mysql -u skles -p strongkeylite
MariaDB> source counts_v2.sql

If you authenticating to MariaDB as the root user, please make sure you change to the appropriate database before sourcing the SQL query:

shell> mysql -u root -p
MariaDB> use strongkeylite;
MariaDB> source counts_v2.sql

The output from the query in this file will display a columnar result of table names of the strongkeylite schema, with the current number of rows in each table.

 

Within a StrongKey Tellaro cluster, it is normal for table row-counts to change frequently in some tables, while others remain static over long periods of time. However, when the cluster is quiet and not processing any transactions actively, all tables within the cluster should show the identical number of rows.

 

If you are not using any of the system monitoring tools, you may view the results of counts_v2.sql for each cluster-node in a separate Shell window and simply view if there are any differences.

 

If you are using system monitoring tools, it is recommended that the tools be configured to capture the results of this SQL query and display them every hour on the console of the monitoring tool. Sophisticated monitoring environments may go further and compare results from all nodes and highlight just the tables and counts that have different values so attention is focused on just those tables.

https://demo4.strongkey.com/getstarted/assets/documents/HTML/images/key_strong_cyan.pngNOTE: Please note that the REPLICATION table is the most dynamic table within the cluster. Even when there are no active users/transactions being processed in the cluster, it is possible for the REPLICATION table to have row-counts that change as objects are replicated between nodes.

It is important to pay attention to the row-counts of this table only if the values do NOT settle down to 0 (or empty values which indicate that there are no more objects to be replicated within the cluster). If the values do not reduce to 0 or an empty set in successive counts_v2.sql results on a quiet cluster, please review the Replication Troubleshooting section of the Reference Manual for steps to resolve the issue.

If this still does not resolve the issue, please contact StrongKey at This email address is being protected from spambots. You need JavaScript enabled to view it. for assistance.