Jump to content
BlueToast

Force Reinstall of Remote Monitors for Search-joined Group machines?

Recommended Posts

Hello! Is there a way to force reinstallation of Remote Monitors properly?

This MySQL query succeeds in removing the Remote Monitors per criteria from the database:

DELETE FROM agents WHERE agents.`ComputerID`='44356' AND (agents.`DataOut` LIKE '%VEEAM%' OR agents.`AlertMessage` LIKE 'VEEAM%');

And, the system quickly responds to installing the Remote Monitors again. However, after the system finishes installing the Remote Monitors, the Commands History is spammed with a message:

Quote

Monitor Install Ignored: Remote Monitor Version mismatch - newer version is already installed.

So, perhaps another way to word my question: is there a way to force Remote Monitors on a remote agent to reinstall/reinitialize properly (without having a constant unending SPAM of the above message in Commands History as noted above)?

Edited by BlueToast

Share this post


Link to post
Share on other sites

Using your query, you just want to touch a couple of other tables first:

#Break the Group Control (Will re-populate)
DELETE FROM groupagentscontrol WHERE AgentID IN (SELECT AgentID FROM agents WHERE agents.`ComputerID`='44356' AND (agents.`DataOut` LIKE '%VEEAM%' OR agents.`AlertMessage` LIKE 'VEEAM%'));
#Clear the Agent Version history
DELETE FROM agentsversion WHERE AgentID IN (SELECT AgentID FROM agents WHERE agents.`ComputerID`='44356' AND (agents.`DataOut` LIKE '%VEEAM%' OR agents.`AlertMessage` LIKE 'VEEAM%'));
#Now remove the agent for the remote monitor.
DELETE FROM agents WHERE agents.`ComputerID`='44356' AND (agents.`DataOut` LIKE '%VEEAM%' OR agents.`AlertMessage` LIKE 'VEEAM%');

This will force the monitor to get a new AgentID (with no prior agentid version to conflict) and will remove the old agentid since it isn't found in the database.
This will also wipe the monitor history and orphan any open tickets (you will have to manually close them), so it's not a perfect solution.

  • Thanks 1

Share this post


Link to post
Share on other sites

So, there is a way to do this.

#Increase the Agentsversion value.
UPDATE agentsversion SET `version`=`version`+1 WHERE agentid IN (SELECT AgentID FROM agents WHERE agents.`ComputerID`='44356' AND (agents.`DataOut` LIKE '%VEEAM%' OR agents.`AlertMessage` LIKE 'VEEAM%'));
#Flag the monitor as changed, forcing it to rebuild.
UPDATE agents SET `changed`=IFNULL(NULLIF(0-ABS(agents.`Changed`),0),-1) WHERE agentid IN (SELECT AgentID FROM agents WHERE agents.`ComputerID`='44356' AND (agents.`DataOut` LIKE '%VEEAM%' OR agents.`AlertMessage` LIKE 'VEEAM%'));

The higher value in agentsversion should break the condition where your change is not considered newer than what is already on the remote agent. No other deleting is needed.

This post (and what I discovered while investigating) prompted me to create a monitor to automatically fix remote monitor version mismatches.
It is posted here: https://www.mspgeek.com/files/file/46-internal-monitor-for-remote-monitor-version-mismatch/

Edited by DarrenWhite99
Adding link to Internal Monitor for Remote Monitor Version Mismatches
  • Thanks 1

Share this post


Link to post
Share on other sites
15 hours ago, BlueToast said:

When I try to access the link to the Internal Monitor for Remote Monitor Version Mismatch:

image.thumb.png.53c18df7c2ef992f2938e4c5667e6d1a.png

I did not find any issues in my testing, but a user reported that it was not working for them. It would successfully rebuild, but then a minute later would rebuild again and fail... Which triggered it to rebuild.. repeating. So until I can confirm the cause I don't think it should be used. I have hidden it pending an investigation to resolve this.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×