Skip to main content
Sync Nagios alert events to Flashduty through webhook.

In Flashduty On-call

You can get the integration push URL in either of the following ways.

Use a dedicated integration

Choose this option if all alerts go to one channel. It’s the simpler setup.
  1. In the Flashduty console, select Channel and open a channel
  2. Select Configuration → Integrations → Private integration, then click Add integration
  3. Choose Nagios integration and click Save to generate a card
  4. Open the generated integration card and copy the Push URL

Use a shared integration

Choose this option if you need to route alerts to different channels based on the alert payload.
  1. In the Flashduty console, go to Integration Center → Alert Events
  2. Select Nagios integration:
    • Integration Name: Define a name for this integration
  3. Configure the default route and select a channel. You can add more rules under Routing after creation
  4. Click Save and copy the generated Push URL

Configure Nagios

Nagios paths differ between systems and installation methods; adjust the paths below to your environment.
1

Download the notification script on the Nagios Server

Where: A terminal on the Nagios Server host, in the Nagios plugin directoryThe download URL requires a Referer header and returns 403 without it, so keep the --header argument in the commands.
The directory is usually /usr/lib/nagios/plugins/:
The script uses curl, so make sure curl is installed on the Nagios Server. It also needs bash 4 or later (it uses declare -A).
2

Download and edit flashduty.cfg

Where: A terminal on the Nagios Server host, in the Nagios config directory › flashduty.cfg
The directory is usually /etc/nagios3/conf.d/:
Edit the downloaded flashduty.cfg:Example configuration:
Parameters:
  • pager: the Flashduty push URL, the integration push URL from the Flashduty console
  • command_line: the script path defaults to /usr/local/nagios/libexec/send_to_flashduty.sh; change it if the script is elsewhere
  • service_notification_options: service notification options, w=warning, u=unknown, c=critical, r=recovery
  • host_notification_options: host notification options, d=down, u=unreachable, r=recovery
Keep r (recovery): Flashduty closes alerts on the recovery notification.
To carry more information in alerts, append key=value arguments to the end of command_line, for example environment="production" region="$_HOSTREGION$". They are pushed to Flashduty as labels.
3

Include the config file and add the contact to a contact group

Where: nagios.cfg and contacts.cfgFirst include the Flashduty config file in the main Nagios config:
Debian/Ubuntu normally loads every file under /etc/nagios3/conf.d/ automatically, so no manual include is needed.
Then edit the contacts file and add the Flashduty contact to the admins contact group (or the group you use):
/etc/nagios3/conf.d/contacts_nagios2.cfg
Find the contact group definition and add Flashduty to its members:
4

Validate, restart and confirm

Where: A terminal on the Nagios Server hostValidate the configuration first, then restart the Nagios service once it passes:
After the restart, alerts detected by Nagios are pushed to Flashduty automatically. To verify right away, run the script by hand from its directory: send a critical alert first, then a recovery:
The script discards curl’s output, so a failed push shows no message; if Flashduty receives nothing, first check with curl from that host that the push URL is reachable. A few seconds later the integration in Flashduty shows a Latest event time, which means the setup works.

Status and severity

Nagios to Flashduty severity mapping:Any other value is treated as Info.