Download pre-build binary
wget https://github.com/FastNetMon/pagerduty_integration/releases/latest/download/pagerduty_integration-linux-amd64 -O /opt/fastnetmon_pagerduty_integration
chmod +x /opt/fastnetmon_pagerduty_integrationYou need to add Events API V2 integration for your service and get Integration Key from there.
And with Integration Key set config /etc/fastnetmon_pagerduty_integration.json -
{
"log_path": "/var/log/fastnetmon/fastnetmon_pagerduty_integration.log",
"inegration_key": "YOUR_INTEGRATION_KEY",
"severity": "warning",
"dedup_key": "fastnetmon_setup_n",
"dedup_with_target": true,
"timeout": 5
}Also we can set sevirity for events.
Can set dedup_key so our allerts it also will be used as "client".
With flag dedup_with_target we will be add ip/hostgroup to dedup_key, so only with same ip/hostgroup alerts would stacked.
And timeout for request to pager duty and our log file.
Config path can be set with FASTNETMON_PAGERDUTY_INTEGRATION_CONFIG env.
Add this script as JSON based callback scripts on FastNetMon side:
sudo fcli set main notify_script_enabled enable
sudo fcli set main notify_script_format json
sudo fcli set main notify_script_path /opt/fastnetmon_pagerduty_integration
sudo fcli commit