In Flashduty
You can obtain an integration push URL through either of these two methods:
Using Private Integration
Choose this method when you don’t need to route alert events to different channels - it’s simpler.Using Shared Integration
Choose this method when you need to route alerts to different channels based on the alert event payload.In Nagios
Nagios installation paths may vary depending on the system and installation method. Please adjust the paths in the following configuration according to your actual environment.Parameter descriptions:
Step 1: Download Notification Script
Log in to the Nagios Server host and download the notification script to the Nagios plugin directory:- Debian/Ubuntu systems (typically
/usr/lib/nagios/plugins/):
- RHEL/CentOS systems (typically
/usr/lib64/nagios/plugins/):
- Source installation (typically
/usr/local/nagios/libexec/):
Note: The script uses the curl command. Please ensure curl is installed on your Nagios Server.
Step 2: Create Flashduty Configuration File
Download the Flashduty configuration file to the Nagios configuration directory:- Debian/Ubuntu systems (typically
/etc/nagios3/conf.d/):
- RHEL/CentOS systems (typically
/etc/nagios/objects/):
- Source installation (typically
/usr/local/nagios/etc/objects/):
Step 3: Modify Configuration File
Edit the downloadedflashduty.cfg file and modify the following:- Replace the
pagerfield value with the integration push URL obtained from the Flashduty console - Modify the script path in
command_lineaccording to your Nagios installation path
pager: Flashduty push URL, the integration push URL obtained from the Flashduty console<NAGIOS_PLUGIN_PATH>: Replace with the actual script path, such as/usr/local/nagios/libexecservice_notification_options: Service alert notification options, w=warning, u=unknown, c=critical, r=recoveryhost_notification_options: Host alert notification options, d=down, u=unreachable, r=recovery
Tip: To include additional information in alerts, you can append parameters inkey=valueformat at the end ofcommand_line, for example:environment="production" region="$_HOSTREGION$". These parameters will be pushed to Flashduty as labels.
Step 4: Include Configuration File
If you are using RHEL/CentOS systems or source installation, you need to include the Flashduty configuration file in the Nagios main configuration file.- RHEL/CentOS systems: Edit
/etc/nagios/nagios.cfgand add:
- Source installation: Edit
/usr/local/nagios/etc/nagios.cfgand add:
Note: Debian/Ubuntu systems typically auto-load all configuration files in the /etc/nagios3/conf.d/ directory, so manual inclusion is not required.
Step 5: Add Flashduty to Contact Group
Edit the contacts configuration file to add the Flashduty contact to theadmins contact group (or another contact group you use):- Debian/Ubuntu systems: Edit
/etc/nagios3/conf.d/contacts_nagios2.cfg - RHEL/CentOS systems: Edit
/etc/nagios/objects/contacts.cfg - Source installation: Edit
/usr/local/nagios/etc/objects/contacts.cfg
Step 6: Verify Configuration and Restart Service
- Verify the Nagios configuration file:
- Debian/Ubuntu systems:
- RHEL/CentOS systems:
- Source installation:
- If verification passes, restart the Nagios service:
- After configuration is complete, Nagios will automatically push alerts to Flashduty when detected.
Status Mapping
Nagios to Flashduty alert severity mapping:
| Nagios | Flashduty | Status |
|---|---|---|
| CRITICAL | Critical | Critical |
| DOWN | Critical | Critical |
| UNREACHABLE | Critical | Critical |
| WARNING | Warning | Warning |
| OK | Ok | Recovered |
| UP | Ok | Recovered |
| UNKNOWN | Info | Info |