Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Retire Machines offline for more than 60 days

Important:

This monitor should be created only after the client's approval.

The prerequisite step before retiring the machine is to run the RMM+ autofix, which attempts to fix the broken agents in the environment.

Reference monitor set: ProVal - Development - Retire machines offline for more than 60 days

Monitor Set

Monitor set details:

Please use the configuration below or modify it as per client requirements:

Monitor Set Configuration

Verify by clicking on the build and viewing the query to see these machines.

Autofix Script

The autofix script to remove the machines should consist of two parts:

  1. Check if the enlisted machine is a probe; if yes, remove it as a probe.
  2. Then execute the SQL command to retire all these machines and move them to the retired asset tab.

The first script can be as follows:

Autofix Script 1

The second script can be as follows:

Autofix Script 2

SQL:

Call sp_DeleteComputer(%computerid%, 'Removed by a monitor autofix on %when%')

Reference Monitor/Script in Our Environment

Monitor: "ProVal - Development - Retire machines offline for more than 60 days"

Note: Remove the AND query at the end to limit to only 30 years. If you see machines that have the last contact listed as "0001," make sure to remove the 30-year limit and then save the monitor in the client's environment.

Script 1: "Probe - Remove from an Offline Agent"

Folder: "Agent"

Script 2: "Move Agent to Retired Assets [Autofix]"

Folder: ".Monitor Autofixes"