In Mackerel, removing a registered host from Mackerel’s managed object is referred to as “retiring”. This document will explain how to retire a host.
In the event that managing a host becomes no longer necessary, please follow the instructions provided below.
How to retire a host
Open the host details screen of the host you want to remove from Mackerel’s managed targets and click the gear icon settings link that is located to the right of the host name.
This will open the host’s settings screen shown below. Located in the lower right corner of this screen, there is a button labeled “Retire This Host”. Click this to retire the host.
If the agent is installed to that server, be sure to uninstall it as well. For details on how to uninstall the agent, refer to Installing the agent - Mackerel Docs.
Additionally, retiring hosts can be done with the API, the command line tool mkr, or the mackerel-agent
How do I register/retire hosts in Mackerel in combination with automatic expansion/degradation (auto-scaling)?
Reference the following page.
When using AWS Integration, how do I remove AWS resources from Mackerel without removing them from AWS?
If instances etc. are left over in AWS and only retired in Mackerel, they will be re-registered as a Mackerel host due to a feature of AWS Integration.
Using the AWS tag, configure the instances so that they are excluded from the integration target. For more information, refer to the following help page.
How do I register a retired host again in Mackerel?
Once a host has been retired, original host information can not be restored. Please be careful and only retire a host when necessary.
If you want to re-register a retired server as a new host in Mackerel, follow the procedure below (host information prior to retirement cannot be obtained).
- Check to see if there is host ID file named
/var/lib/mackerel-agent(This is for default settings.
/var/lib/mackerel-agent-kcpsfor the KCPS version agent, inside the install folder for Windows Server). If it exists, delete it.
- Start the agent (restart if already running). If the agent is not installed, re-install it.
- The server will be registered in Mackerel as a new host.