Perform database operations
If you encounter issues with the Tanium deployment, Tanium Support might direct you to perform database operations.
View the Postgres log file
View Postgres configuration files
- Sign in to the TanOS console as a user with the tanadmin role.
- Enter 3-3-2 (Tanium Support > Database Operations > Select File).
- Use the menu to review or modify the configuration.
View Postgres control data
Enable full Postgres audit log
Postgres logs are very rarely useful in troubleshooting Appliance or platform issues. Audit logging is disabled by default. When enabled, Postgres logging can consume inordinate disk space. For best results, enable audit logging only when debugging.
Manage the database memory plan
Run the Postgres top command
Query the tanium database
The Manage Queries menu includes predefined queries that can be useful during troubleshooting.
View database replication status and history
View the database replication status and history to help troubleshoot replication issues between the primary and secondary Tanium Server or between the active and inactive Module Server. The replication status is captured every 15 minutes at the same time as the automatic health check, and, additionally, when you view the current status. The status is recorded as a new entry in the history if the server role changes or if there is an important change in the replication status; otherwise the status overwrites the previous entry in the history. The Postgres Replication History screen displays the 10 most recent history entries.
- Sign in to the TanOS console as a user with the tanadmin role.
- Enter 3-3 (Tanium Support > Database Operations).
- Enter S to view the Postgres replication history.
- ------------------------------------------------------ >>> Postgres Replication History <<< C: Show Current Status Timestamp Status Role 1: 2024-04-23 20:00:33 Fail Secondary 2: 2024-04-16 07:45:32 Fail Secondary 3: 2024-04-16 07:30:13 Pass Secondary 4: 2024-04-15 22:00:13 Pass Secondary 5: 2024-04-15 21:45:12 Fail Secondary 6: 2024-04-15 20:15:13 Pass Secondary R: Return to previous menu RR: Return to top ------------------------------------------------------
- Enter C to view the current replication status, or enter the number of the historical status to view.
- Viewing previously captured replication status Status Timestamp: 2024-04-16 07:30:13 Service Type: TS >>> Local Database Replication Status <<< Cluster Address: 10.10.110.236 Postgres TS service: Pass (Running) Cluster Role: Secondary Last WAL LSN: 0/51806B8 Last Xact Replay: 2024-04-16 07:30:06.291924+00 Streaming Status: Pass (streaming) Written LSN: 0/51806B8 Last Msg Send: 2024-04-16 07:30:06.292087+00 Last Msg Receipt: 2024-04-16 07:30:06.292141+00 Replication Lag: 00:00:07.872822 >>> Remote Database Replication Status <<< Cluster Address: 10.10.110.205 Network Access: Pass (Responding) Remote DB Net Latency: 1ms Cluster Role: Primary Replication Slot: Pass (Active) Slot Restart LSN: 0/51806B8 Current Log Location: 0/51806B8 Streaming Status: Pass (streaming) In Recovery Mode: Pass (No) Sync State: async Backend Start: 2024-04-15 21:59:44.180481+00 Sent Log Location: 0/51806B8 Write Log Location: 0/51806B8 Replay Log Location: 0/51806B8 Flush Log Location: 0/51806B8 Overall Status: Pass Press enter to continue
Initiate database server failover
- Sign in to the TanOS console of the Appliance with the secondary database as a user with the tanadmin role.
- Enter 2-B-F (Tanium Operations > Cluster Configuration > Database Server Failover).
- Follow the prompts to initiate the failover.
Collect database replication statistics (Module Server only)
When troubleshooting a replication issue on a Module Server, you can temporarily enable replication statistics that indicate the amount of data recorded in the database on the primary Module Server that has not yet been replicated to the secondary Module Server. When you enable this collection, TanOS records statistics once per minute, in the replstats_yyyy-mm-dd.json file in the outgoing folder. TanOS creates one log file for each day while collection is enabled.
- Enter 3-3-C (Tanium Support > Database Operations > Collect Replication Stats).
- Follow the prompts to enable or disable collection of database replication statistics.