cancel
Showing results for 
Search instead for 
Did you mean: 

Restore the deleted PEM agent.

 

Q)Is it possible to restore a deleted agent in PEM 7.6? Would it have to be unregistered and then reregistered using the pemworker? Or is there something more elegant?

 

>>Yes, it is possible to restore the Agent if it is deleted from PEM Web client but still has an entry in the pem.agent table with active status=f.


Test Case :


1. Delete the Agent from PEM web client.

Agent Deleted through PEM.png

 

2. If you check from the database side you can see the "active:f"
pem=# select * from pem.agent;
id                    | 2
agent_capability_list | {unix,getloadavg,disk_space,memory_usage,cpu_usage,network_statistics,io_analysis,data_log_file_analysis,disk_busy_info,os_statistics,os_info,slony_replication,auto_discover_servers,allow_server_restart}
description           | standby
active                   | f
heartbeat_interval    | 30
alert_blackout        | f
version               | 7.6.0
platform              | linux-x64a
owner                 | 10
team                  | 
ignore_mnt_points     | 
group_id              | 0

3. Later, we have updated the status for agent “standby” to true in pem.agent table  
pem=# update pem.agent set active=true where id=2;
UPDATE 1

pem=# select * from pem.agent;
id                    | 2
agent_capability_list | {unix,getloadavg,disk_space,memory_usage,cpu_usage,network_statistics,io_analysis,data_log_file_analysis,disk_busy_info,os_statistics,os_info,slony_replication,auto_discover_servers,allow_server_restart}
description           | standby
active                | t
heartbeat_interval    | 30
alert_blackout        | f
version               | 7.6.0
platform              | linux-x64
owner                 | 10
team                  | 
ignore_mnt_points     | 
group_id              | 0

4. Then refresh the PEM web client. 
If you see the attached screenshot the agent "standby" is restored again, however, the servers which were bounded to the particular agent seems to be down. To rectify this we need to modify the PEM agent properties of a Down server to add bound agent and after the successful modification, the servers are UP again.

Agent Restored.png
Note: If an agent is deleted from pem.agent table then we cannot restore it by using the above steps, We need to re-register it using PEM worker.

Version history
Revision #:
5 of 5
Last update:
‎03-21-2019 03:20 AM
Updated by:
 
Labels (3)