Verify and start the Rapid7 Insight Agent service on Linux endpoints
This Automox Worklet™ ensures the Rapid7 Insight Agent service remains operational on Linux endpoints. The Worklet first checks if the Rapid7 Insight Agent is installed on the endpoint. If the agent is not present, the Worklet exits without making changes.
When the agent is installed, the Worklet evaluates the current status of the ir_agent service using systemctl. If the service is running, no action is taken. If the service is stopped or failed, the Worklet flags the endpoint for remediation to start the service automatically.
The Worklet uses process detection with pgrep to verify the ir_agent process is active, verifying reliable monitoring even if the systemctl status becomes unreliable.
Organizations face operational challenges that require automated solutions. The Rapid7 Insight Agent is a critical component for continuous vulnerability detection, threat monitoring, and compliance reporting. When the agent service stops, your endpoints lose real-time visibility into security threats and vulnerabilities, creating blind spots in your security posture.
Linux environments are frequent targets for exploitation due to their prevalence in data centers, cloud infrastructure, and critical services. Maintaining continuous Rapid7 agent operation helps you detect and respond to zero-day vulnerabilities, supply chain attacks, and misconfigurations before they impact your operations.
Many compliance frameworks including CIS Benchmarks, NIST 800-53, and SOC 2 require continuous endpoint monitoring. Using this Worklet keeps your Linux endpoints in compliance by keeping vulnerability assessment tools active without manual intervention.
Evaluation phase: The Worklet checks whether the ir_agent unit file exists in systemctl. If Rapid7 is not installed, evaluation succeeds and remediation is skipped. If installed, the Worklet verifies that the ir_agent process is running using pgrep. If the process is found and responding, the endpoint passes evaluation. If the process is missing or unresponsive, the endpoint is flagged for remediation.
Remediation phase: The Worklet executes service ir_agent start to restart the agent service. After the service starts, the Worklet verifies that the ir_agent process is running again using pgrep. If the process is active, remediation succeeds. If the process fails to start or crashes immediately, the Worklet reports a failure and recommends checking the activity log for additional diagnostic information.
Linux endpoints with Rapid7 Insight Agent already installed
systemctl available on the endpoint for service management
pgrep command available for process verification
Root or sudo privileges to restart services
Compatible with most Linux distributions using systemd (Ubuntu, CentOS, RHEL, Debian, and others)
After the Worklet successfully runs remediation, the ir_agent service will be running and responding to pgrep queries. The Rapid7 Insight Agent will resume real-time vulnerability scanning, threat detection, and compliance monitoring on the endpoint. You can verify this change through the Automox Activity Log or by checking the endpoint configuration directly.
You can verify success by checking the Automox console for the remediation status. Look for the ir_agent process in the activity log or use systemctl status ir_agent on the endpoint to confirm the service is active and enabled. Data from the endpoint will resume flowing to the Rapid7 InsightVM console within minutes of successful service restart.
Run this Worklet on a pilot Linux endpoint and review evaluation output for start rapid7 insight agent service.
Confirm Automox activity logs show successful completion and exit code 0.
Verify endpoint state using checks aligned to evaluation script logic, such as exit, else.
Validate remediation effects from script operations such as exit, else, service, then rerun evaluation for compliance.


By submitting this form you agree to our Master Services Agreement and Privacy Policy.
Already have an account? Log in
Consider Worklets your easy button
A Worklet is an automation script, written in Bash or PowerShell, designed for seamless execution on endpoints – at scale – within the Automox platform. Worklet automation scripts perform configuration, remediation, and the installation or removal of applications and settings across Windows, macOS, and Linux.

AUTOMOX + WORKLETS™
Uncover new possibilities with simple, powerful automation.
By submitting this form you agree to our Master Services Agreement and Privacy Policy