Skip to content

Remote Forensics

Run forensic actions from an application server when the Unix DB server is inaccessible.

2 min read Updated SS

Introduction#

Supported Platform: Unix

If you need to run forensics on a DB server corresponding to the AIX platform, and if you do not have access to put forensics on a DB server, then you cannot deploy forensics directly on the DB server. In this case, you need to run forensic actions on the DB server. You should remotely connect from the application server to the DB server.

Prerequisites for Remote Forensics#

1. Install Supervisor on the Application server.

2. Enable passwordless connectivity from the Application server to the DB server for non-root users.

3. Assign permission to non-root users on the DB server to execute necessary commands for forensic actions.

Queries in the Percona Database#

Execute the following queries in the Percona database to fetch remote forensics.

1. select * from agent;

From the result of the above query, fetch the IDs from the ‘ID’ column corresponding to the values from the ‘host_address’ column which match the IP addresses of the app server and DB server.

Check the IP address of the app server in the ‘host_address’ column and take the corresponding ID from the ‘ID’ column where the value in the ‘name’ column is the name of the component agent.

Follow the same for the DB server as well.

2. Execute the below command to obtain all the records from agent_comp_instance_mapping:

select * from agent_comp_instance_mapping where agent_id IN (<APP server id you received from step #1>,<DB server id you received from step #1>);

3. The below command updates the agent_id field in the agent_comp_instance_mapping table:

UPDATE `appsone`.`agent_comp_instance_mapping` SET `agent_id` = '<APP server id>' WHERE (`id` = '<id>');

Execute the above query for every id in the ‘ID’ column from the result of step #2.

4. The below command retrieves all records from the supervisor_details table:

select * from supervisor_details where host_address='<IP address of APP server>';

From the output of the above query, note the value from the ‘id’ column. This is the Supervisor id.

5. This SQL command updates the supervisor_id field in the comp_instance table within the appsone database.

UPDATE `appsone`.`comp_instance` SET `supervisor_id` = '<id from step #4>' where (`host_address` = '<IP address of DB server>');

6. This SQL command retrieves all records from the comp_instance table:

select * from comp_instance where id IN (<comma separated values from 'comp_instance_id' column from step #2>);