Agent Controls
You can execute the following operations on the Insight Agent to perform several functions. The commands listed here are categorized according to the operating system of the asset.
Windows
Open a command prompt to execute the following commands:
Start the agent
1sc start ir_agent
Stop the agent
1sc stop ir_agent
Windows Service Manager
You can also start, stop, and check the status of the Insight Agent service from the Windows Service Manager. To access the Service Manager, run services.msc
in the command line.
Check the version number
- Navigate to the version directory using the command line:
1cd C:\Program Files\Rapid7\Insight Agent\components\insight_agent\<version directory>
- Run the following command to check the version:
1ir_agent.exe --version
Alternatively, browse to the "Rapid7 Insight Agent" from your Start menu and check its properties.
Reinstall the agent
If you need to reinstall the agent for any reason and want to avoid the step of uninstalling first, you can do so by running the .msi
from the command line.
Substitute <installerType>
with x86_64
for most Windows architectures, or arm64
for Windows ARM64:
1msiexec /i agentInstaller-<installerType>.msi /l*v insight_agent_install_log.log /quiet CUSTOMTOKEN=<region>:<token> REINSTALL=ALL REINSTALLMODE=vamus
Maintaining the existing UUID of the agent
Maintaining the existing UUID ensures there are no agent duplicates in your environment.
As long as the agent is already on version 2.0 or later, reinstalling in this way ensures that its previously existing UUID will remain in use as long as the C:\Program Files\Rapid7\Insight Agent\components\bootstrap\common\bootstrap.cfg
file is present at the time of reinstallation.
If you want a reinstalled agent to get a new UUID, uninstall the existing agent and completely remove the agent directory first before running the installer again.
Note that reinstalls of any agent running a version prior to 2.0 will not retain their original UUID.
Uninstall the agent
Browse to the "Rapid7 Insight Agent" from your Start menu, right click the agent icon, and select "Uninstall". You can also run the installer and select the Remove option.
Linux (.rpm)
Open a command prompt to execute the following commands:
Check the bootstrap sub-component of the Insight Agent is running (.rpm):
1sudo cat /opt/rapid7/ir_agent/components/bootstrap/common/bootstrap.log | grep 'Component Info bootstrap:'
Check the current version running and PIDs (.rpm):
1sudo ps -ax | grep ir_agent
Check the Insight Agent ID (.rpm):
1sudo cat /opt/rapid7/ir_agent/components/bootstrap/common/bootstrap.cfg
Uninstall (.rpm):
1dnf remove rapid7-insight-agent
Following this command, there will be additional files left. These files are not inside the package, therefore the package manager is not capable of removing them.
To clean all the folder and files:
1rm -rf /opt/rapid7
Linux (.deb)
Open a command prompt to execute the following commands:
Check the bootstrap sub-component of the Insight Agent is running (.deb):
1sudo cat /opt/rapid7/ir_agent/components/bootstrap/common/bootstrap.log | grep 'Component Info bootstrap:'
Check the current version running and PIDs (.deb):
1sudo ps -ax | grep ir_agent
Check the Insight Agent ID (.deb):
1sudo cat /opt/rapid7/ir_agent/components/bootstrap/common/bootstrap.cfg
Uninstall (.deb):
1sudo apt remove rapid7-insight-agent
Following this command, there will be additional files left. These files are not inside the package, therefore the package manager is not capable of removing them.
To clean all the folder and files:
1rm -rf /opt/rapid7
Mac (.pkg)
Open a command prompt to execute the following commands:
Check the bootstrap sub-component of the Insight Agent is running (.pkg):
1sudo cat /opt/rapid7/ir_agent/components/bootstrap/common/bootstrap.log | grep 'Component Info bootstrap:'
Check the current version running and PIDs (.pkg):
1sudo ps -ax | grep ir_agent
Check the Insight Agent ID (.pkg):
1sudo cat /opt/rapid7/ir_agent/components/bootstrap/common/bootstrap.cfg
Uninstall (.pkg):
1/opt/rapid7/ir_agent/components/insight_agent/{version}/uninstall.sh