In Flashduty On-call
You can get the integration push URL in either of the following ways.Use a dedicated integration
- In the Flashduty console, go to Channels and open a channel
- Select Configuration → Integrations → Private integration, then click Add integration
- Select Pandora FMS and click Save
- Open the generated integration card and copy the Push URL
Use a shared integration
- In the Flashduty console, go to Integration Center → Alert Events
- Select Pandora FMS and enter an integration name
- Configure the default route and select a channel. You can add more rules under Routing after creation
- Click Save and copy the generated Push URL
Configure Pandora FMS
Pandora FMS alert actions run a command on the Pandora FMS server. The steps below create an alert command that pushes withcurl, create an action that uses the command, and then add the action to module alerts.
The Pandora FMS server that executes alerts needs
curl installed and HTTPS access to the domain in the push URL.1
Create the alert command in Pandora FMS
Where: Pandora FMS console › Management › Alerts › Commands › CreateSign in as an administrator.Click Create to save.Every macro sits inside double quotes. Pandora FMS shell-quotes the value when it replaces the macro, and
curl --data-urlencode then URL-encodes it, so spaces, quotes, and non-ASCII text in agent names or module descriptions reach Flashduty unchanged.2
Create the alert action in Pandora FMS
Where: Pandora FMS console › Management › Alerts › Actions › CreateFill in both the Triggering and Recovery columns:
Click Create to save.
3
Make sure the alert template has recovery enabled
Where: Pandora FMS console › Management › Alerts › Templates
Open the template you use (or create one). The built-in Critical condition and Warning condition templates have it enabled by default. With Alert recovery disabled, Pandora FMS runs no action when the module recovers, and the Flashduty alert does not close automatically.
4
Add the action to module alerts
Where: Pandora FMS console › Management › Alerts › Module Alerts
Create the module alert and save it (older versions call this page List of Alerts and use Add alert). You can also add an alert for a module from the agent’s Alerts tab and select the
Flashduty action. For an existing module alert, just add the Flashduty action; existing actions such as email are not affected.5
Verify trigger and recovery
Where: Pandora FMS console › Management › Alerts › Module AlertsPut a module that has an alert into its alert condition (for example, lower the Critical threshold of a CPU module) and confirm that Flashduty receives an active alert. Restore the threshold, wait for the next data collection, and confirm that the alert closes.Back in Flashduty, the integration shows Latest event time, which means the setup works.
Pushed content
The command POSTs the following fields as anapplication/x-www-form-urlencoded form:
The alert title is
<template name>: <agent> / <module>. When some fields are missing the rest are used, and when all are empty the title is Pandora FMS alert <id_alert>.
Alert key
Flashduty usesid_alert (the Pandora FMS macro _id_alert_) as the Alert Key. The Pandora FMS documentation describes this macro as “Alert identifier, useful for correlating the alert in third-party tools”: it is the ID of the module alert created when a template is assigned to a module. The trigger, repeated firings, and recovery of one module alert carry the same ID, so they land on the same Flashduty alert. One template assigned to two modules makes two module alerts with different IDs, which produce different Flashduty alerts. Changing the template name, priority, agent alias, or data does not change the Alert Key.
Module alert IDs are unique only within one Pandora FMS installation. Use a separate Flashduty integration for each installation (including each node under a Metaconsole), so that alerts with the same ID in different installations do not merge into one alert.
Only module alerts carry _id_alert_. Event alerts, log alerts, and correlated alerts have no module alert ID and Flashduty rejects them as a parameter error, so do not add the Flashduty action to them.
Status and severity
event decides whether the alert triggers or recovers, and alert_priority (the alert template’s Priority) decides the severity:
When
event is alert_recovered the alert recovers, and its severity still comes from the template priority. Requests with an empty or any other event are rejected, so a request whose state cannot be determined never enters the wrong alert lifecycle.
FAQ
Why does the action need an Event field?
Why does the action need an Event field?
Pandora FMS runs the same action when an alert fires and when it recovers, and no macro tells which one it is. Only action fields can take separate Triggering and Recovery values, so
alert_fired and alert_recovered in Field 2 tell Flashduty whether the run is a trigger or a recovery.Does forcing an alert (Force) create an alert?
Does forcing an alert (Force) create an alert?
Forcing a module alert that has not fired sends
alert_times_fired 0. Flashduty treats such a request as a test, returns success, and creates no alert. Forcing an alert that has already fired merges into that alert and does not create a new one.Do repeated firings create multiple alerts?
Do repeated firings create multiple alerts?
No. Repeated firings of one module alert before it recovers carry the same
id_alert and merge into the same Flashduty alert. How often it fires again is controlled by the template’s Max number of alerts and the action’s Threshold.The alert recovered in Pandora FMS but did not close in Flashduty?
The alert recovered in Pandora FMS but did not close in Flashduty?
Check, in order: the alert template has Alert recovery enabled; the action’s Field 2 is
alert_recovered in the Recovery column; the module alert is not in Standby (alerts in Standby run no actions).Troubleshooting
- Pandora FMS does not push: run
curl -sS <push URL>on the Pandora FMS server to confirm the network path, and make sure the action’s Group covers the agent’s group - Flashduty returns a parameter error: make sure the command is pasted in full on one line, the action’s Field 2 is
alert_firedandalert_recoveredin the two columns, and the action is only added to module alerts - The alert does not recover: see the FAQ “The alert recovered in Pandora FMS but did not close in Flashduty?” above