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

We're having this issue too. the scripts don't seem to work (like DarrenWhite99 said).

It's on the development board with CWA.

no other updates yet...

  • Like 1

Share this post


Link to post
Share on other sites

We have the same issue on a few computers i've seen. (Not all of them!)

I'd rather not reset their ComputerID and blow everything away just to resolve that issue.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...