Actions83
- Bills Actions
- Alerts Actions
- Alert Rules Actions
- ARP Actions
- Devices Actions
- Device Groups Actions
- Inventory Actions
- Locations Actions
- Logs Actions
- Poller Groups Actions
- Ports Actions
- Port Groups Actions
- Routing Actions
- Services Actions
- Switching Actions
Overview
The node enables interaction with the LibreNMS network monitoring system, specifically allowing users to create alert rules. Alert rules define conditions under which alerts are triggered based on device statuses or other monitored parameters. This is useful for network administrators who want to automate monitoring and receive notifications when certain network conditions occur, such as device failures or performance degradation.
Practical examples include:
- Creating a rule that triggers a critical alert if any device goes offline.
- Setting up warning-level alerts for devices with high CPU usage.
- Defining global rules that apply to all devices or specific groups of devices.
Properties
| Name | Meaning |
|---|---|
| Rule Name | The name assigned to the alert rule. |
| Devices | Device IDs the rule applies to; use -1 for a global rule affecting all devices, or comma-separated device IDs for specific devices. |
| Rule Builder | JSON object defining the logical condition(s) for the alert, including fields, operators, and values. Example: a condition checking if device status equals 0. |
| Severity | The severity level of the alert. Options: OK, Warning, Critical. |
| Additional Options | Collection of optional settings: - Disabled (boolean): Whether the rule is disabled. - Count (number): Number of polling runs before the alert triggers. - Delay (string): Delay before alerting (e.g., "5 m", "1 h"). - Interval (string): Frequency to re-issue notifications. - Mute (boolean): If true, alert appears in UI but does not send notifications. - Invert (boolean): Inverts the rule check logic. - Notes (string): Additional notes about the rule. |
Output
The node outputs JSON data representing the created alert rule as returned by the LibreNMS API. This typically includes details such as the rule ID, name, devices it applies to, the rule conditions, severity, and additional options set. The output can be used downstream in workflows to confirm creation or trigger further actions.
No binary data output is involved.
Dependencies
- Requires an API key credential for authenticating with the LibreNMS API.
- Needs the base URL of the LibreNMS instance configured in credentials.
- The node uses standard HTTP requests to communicate with the LibreNMS REST API.
Troubleshooting
- Invalid Rule Builder JSON: If the JSON structure for the rule builder is malformed or missing required fields, the API may reject the request. Ensure the JSON follows the expected schema with valid conditions.
- Device IDs Incorrect: Using invalid or non-existent device IDs will cause errors. Use
-1for global rules or verify device IDs exist in LibreNMS. - Authentication Errors: Missing or incorrect API credentials will result in authentication failures. Verify API keys and URL configurations.
- Permission Issues: The API user must have permissions to create alert rules.
- Delay and Interval Format: The delay and interval strings must follow accepted formats (e.g., "5 m" for 5 minutes). Invalid formats may cause errors.