JumpCloud’s built-in alerts provide a powerful way to monitor the health and security of your device fleet.
But what about the unique conditions that are specific to your organization?
If you need to go beyond the standard monitoring templates, JumpCloud offers a simple yet robust solution: custom script-based alerting.
This functionality allows you to execute your own commands on managed devices and trigger alerts based on the output. It’s the ultimate tool for fine-tuning your monitoring, providing visibility into the most specific and critical aspects of your environment.
Why Go Custom? The Power of Tailored Monitoring
While JumpCloud’s predefined alert templates cover many common scenarios—like high disk usage, device uptime, and command failures—there are countless custom conditions you might need to track.
With custom commands, you can monitor virtually any system attribute, including:
- The status of a critical custom application or third-party service.
- Specific entries in your Windows Event Logs or Linux system logs.
- The presence or absence of a particular process.
- Changes to specific registry key values on Windows devices.
- File system changes or the existence of a custom file.
This level of control ensures that your alerts are not just noise but meaningful, actionable notifications tied directly to your unique operational and security requirements.
Getting Started: The Custom Script Workflow
Using custom scripts in JumpCloud alerts involves two main steps. First, you create the command. Next, you set up the alert rule. Let’s walk through each step.
Step 1: Create your custom command
- Navigate to Commands: In the JumpCloud Admin Portal, go to DEVICE MANAGEMENT > Commands.
- Add a new command: Click the + icon and select Command.
- Configure the command:
- Name: Give your command a clear, descriptive name (e.g., “Check Apache Service Status”).
- OS: Select the operating system (Windows, Mac, or Linux).
- Command: Paste your script into the command field. A script that checks for a monitored condition should return a non-zero exit code if the condition is met and a zero exit code if it’s not.
- Run as: Configure the user context under which the script should run (LocalSystem for Windows, root for Linux, etc.).
- Bind to device groups: Assign the command to the device groups you want to monitor.

Step 2: Create the custom monitoring rule
- Navigate to Alerts: Go to Insights > Alerts and click the Rules tab.
- Create a new rule: Click +Rule and choose the Custom Command Monitoring rule template.
- Define the condition: In the Conditions section, search for and select the custom command you created in Step 1.
- Set priority: Assign a priority (low, medium, or high) to help your team triage alerts based on severity.
- Enable and save: Toggle the rule to enable and save your changes. The rule will now execute your custom script on a schedule and trigger an alert if it receives a non-zero exit code.

Practical Custom Alert Examples
Here are a few examples to help you visualize what’s possible.
Windows: Monitoring for a service crash
Create a PowerShell command to check the Windows Event Log for a specific service crash event (ID 7031) in the last 24 hours. The command’s output will trigger an alert if a crash is detected.
macOS: Verifying Gatekeeper status
Create a Bash command to verify that Gatekeeper, macOS’s security feature, is enabled. The command’s output will trigger an alert if it detects Gatekeeper is not enabled.
Expanding Possibilities with Custom Alerts
Custom script-based alerts are a game-changer for IT administrators who need to:
- Proactively monitor specific health metrics for custom applications.
- Enhance security posture by monitoring unauthorized software or critical security settings.
- Ensure compliance by regularly checking for specific system configurations or log entries.
- Improve operational efficiency by creating targeted alerts that reduce noise and focus on what truly matters.
By harnessing the power of custom commands, JumpCloud transforms from a simple device management tool into an extensible and highly adaptable monitoring platform, giving you complete control and visibility over your entire fleet.
Explore our help article to learn more about configuring JumpCloud Alerts.If you haven’t checked out JumpCloud yet, sign up for a free trial today and experience complete control and visibility over your entire fleet.