From 166026d251abbf9e555c40ec2fd80127b7b18d4b Mon Sep 17 00:00:00 2001 From: Hamza Khan <19928007+mhamzak008@users.noreply.github.com> Date: Mon, 8 Jan 2024 16:49:14 +0100 Subject: [PATCH] Add JiraServiceManagement Transport (#15593) --- .../Alert/Transport/JiraServiceManagement.php | 40 +++++++++++++++++++ doc/Alerting/Transports.md | 17 ++++++++ 2 files changed, 57 insertions(+) create mode 100644 LibreNMS/Alert/Transport/JiraServiceManagement.php diff --git a/LibreNMS/Alert/Transport/JiraServiceManagement.php b/LibreNMS/Alert/Transport/JiraServiceManagement.php new file mode 100644 index 0000000000..99fe2b38aa --- /dev/null +++ b/LibreNMS/Alert/Transport/JiraServiceManagement.php @@ -0,0 +1,40 @@ +config['jsm-url']; + + $res = Http::client()->post($url, $alert_data); + + if ($res->successful()) { + return true; + } + + throw new AlertTransportDeliveryException($alert_data, $res->status(), $res->body(), '', $alert_data); + } + + public static function configTemplate(): array + { + return [ + 'config' => [ + [ + 'title' => 'Webhook URL', + 'name' => 'jsm-url', + 'descr' => 'Jira Service Management Webhook URL', + 'type' => 'text', + ], + ], + 'validation' => [ + 'jsm-url' => 'required|url', + ], + ]; + } +} diff --git a/doc/Alerting/Transports.md b/doc/Alerting/Transports.md index b6f57411b7..a558da06f3 100644 --- a/doc/Alerting/Transports.md +++ b/doc/Alerting/Transports.md @@ -363,6 +363,23 @@ LibreNMS database. | Jira Username | myjirauser | | Jira Password | myjirapass | +## Jira Service Management + +Using Jira Service Management LibreNMS integration, LibreNMS forwards alerts to +Jira Service Management with detailed information. Jira Service Management acts as a dispatcher for +LibreNMS alerts, determines the right people to notify based on +on-call schedules and notifies via email, text messages (SMS), phone +calls and iOS & Android push notifications. Then escalates alerts +until the alert is acknowledged or closed. + +:warning: If the feature isn’t available on your site, keep checking Jira Service Management for updates. + +**Example:** + +| Config | Example | +| ------ | ------- | +| WebHook URL | | + ## LINE Messaging API [LINE Messaging API Docs](https://developers.line.biz/en/docs/messaging-api/overview/)