Skip to content

Running the Diagnostic Script

Run Wrapper.sh to collect logs and system data into a dated tar file.

2 min read Updated SS

Running the Diagnostic Script#

Caution: The HEAL Diagnostic script may take longer to execute on slower machines or machines with less memory.

SSH Enabled#

If SSH is enabled and you have sufficient privileges to execute scripts remotely, you can run the Wrapper.sh script directly on the remote servers.

1. Navigate to the HealDiagnostic directory and execute the following script:

./Wrapper.sh

2. Upon successful execution, an output directory will be created within HealDiagnostic.

This directory will contain a tar file named with the respective date, hour, and minute.

For example: 2023-08-30_10_47.tar.gz

3. Untar the generated tar file:

tar -xvf 2023-08-30_10_47.tar.gz

4. The directory 2023-08-30_11_04 will be generated.

Non SSH#

If SSH is not enabled, follow the manual steps outlined below:

1. Create an Input Folder in the HealDiagnostic Directory.

Navigate to the HealDiagnostic directory and create an input folder using the below command:

mkdir -p input

2. Generate and Place ps and netstat Output Files.

For each node in your cluster, run the ps and netstat commands and save the output as text files. Then, place these text files inside the HealDiagnostic/input folder you created.

3. Naming Convention for Files.

The files should be named as follows:

server_netstat_[IP_ADDRESS].txt
server_ps_[IP_ADDRESS].txt

For Example:

server_netstat_192.0.2.10.txt

server_ps_192.0.2.10.txt

4. Update Service Mapping File.

Navigate to the conf folder and open the services_mapping.conf file.

Here, you can map services to nodes. If there are new services in your setup that were not there before, add them here.

5. Follow Naming Conventions for Services.

While adding new services in services_mapping.conf, make sure to use the actual service names (like percona, keycloak, etc.) and separate them from node numbers using a ## separator.

6. Configure Service Connections.

In the file, the mapping is established as a Key, Value pair where the script will check for an 'ESTABLISHED' connection between the service mentioned in the key and the service mentioned in the value.

percona##1=keycloak##1
keycloak##1=percona##2
opensearch##1=heal-data-receiver##1
opensearch##1=heal-data-receiver##2

7. Execute the Diagnostic Script.

Note: For nomad logs, the script must be executed in the primary server.

Once all the files are in place, execute the diagnostic script on the primary node.

sh Services_Connectivity_Status.sh

8. Upon successful execution, an output directory will be created within HealDiagnostic.