Performing a Database (DB) & Network Health Check
Overview
Performing a database and network health check will do the following:
- Test the connection between D3 vSOC and the database.
- Update a test database record to verify available disk space for storing transaction logs.
- Update a test database record to verify available disk space for storing transaction logs.
- Outputs the available disk space for storing transaction logs (in megabytes). Please note that this functionality requires the
VIEW SERVER STATE
permission. - Verify network connectivity to D3 vSOC by sending an HTTP
POST
request from outside the local network
This document will provide all the information needed to guide you through the process of performing an application and database health check with the D3 SOAR platform.
Reader Note
The prerequisites for using this guide are:
Access to a D3 SOAR environment v14.0.384+
Access to Postman, an API testing and building platform. You will need to have a workspace and a collection created. Refer to the Getting Started guide from Postman’s documentation for help.
Performing a Database Health Check with the Local Network
Log into your D3 SOAR environment.
Find the D3 DB Health Check utility command.
Navigate to Configuration on the top header menu.
Click on Utility Commands on the left sidebar menu.
Use the search box to find and select the D3 DB Health Check utility command.
Test the utility command.
Navigate to the Test tab. Choose the Site to test the command. Click Test Command.
A window with the database health check results will appear.
Database State: Indicates the connection status between D3 vSOC and the local network.
WriteDatabase: Indicates if there is enough disk space to write to the database.
Free Space Usage of Transaction Log (MB): An optional output that returns the available disk space in the database for transaction logs in megabytes (MB). Please note that the
VIEW SERVER STATE
permission must be granted for the field to return data. “Failed to get the free space usage information for the transaction log” will be returned for the field without the permission granted. Refer to the reader note below for more details on enabling and disabling theVIEW SERVER STATE
permission.
Reader Note
For the Free Space Usage of Transaction Log (MB) field to output a value, the VIEW SERVER STATE permission is required. Please use the following SQL commands to enable/disable the D3 application database user permission.
Enabling the permission for the D3 application database user (e.g. userA):
USE master GRANT VIEW SERVER STATE TO userA
Disabling the permission for the D3 application database user (e.g. userA):
USE master REVOKE VIEW SERVER STATE TO userA
Performing a Network Connection Health Check with Postman
Log in to Postman. Navigate to your collection, then click + in the main work area to open a new tab.
In the Enter request URL box, use the following URL format to input the request URL:
{vSOC URL}Api/Command/D3DBHealthCheck
Note: For the vSOC URL, copy the full URL on the login page of your D3 vSOC.
Use the adjacent drop-down menu to set the HTTP request method to POST.Click on the Authorization tab. Using the dropdown menu, select Basic Auth for the authorization type. Input the login credentials of your D3 vSOC.
Click Send.
You will see the output response data in the bottom response viewer. This is a sample of the response output data:
JSON{ "Database State": "Connected", "WriteDatabase": "Successful", "Free Space Usage of Transaction Log (MB)": "Failed to get the free space usage information for the transaction log" }
Interpreting the response data:
Database State: Indicates the connection status between D3 vSOC and the local network.
WriteDatabase: Indicates if there is enough disk space to write to the database.
Free Space Usage of Transaction Log (MB): An optional output that returns the available disk space in the database for transaction logs in megabytes (MB). Please note that the VIEW SERVER STATE permission must be granted for the field to return data. “Failed to get the free space usage information for the transaction log” will be returned for the field without the permission granted. Refer to the reader note below for more details on enabling and disabling the VIEW SERVER STATE permission.
Reader Note
For the Free Space Usage of Transaction Log (MB) field to output a value, the VIEW SERVER STATE
permission is required. Please use the following SQL commands to enable/disable the permission for the D3 application database user.
Enabling the permission for the D3 application database user (e.g. userA):
USE master GRANT VIEW SERVER STATE TO userA
Disabling the permission for the D3 application database user (e.g. userA):
USE master REVOKE VIEW SERVER STATE TO userA
Note: It is recommended to revoke the permission when the testing feature is no longer in use.
Generating Scripts with Postman
Postman can generate a script of the API request in the language or framework of your choice for use in your front-end applications. Refer to Generating client code | Postman Learning Center for more details.