pager_tree-integrations 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/pager_tree/integrations/live_call_routing/twilio/v3_controller.rb +20 -0
- data/app/jobs/pager_tree/integrations/live_call_routing/twilio/v3/max_wait_time_job.rb +13 -0
- data/app/models/pager_tree/integrations/additional_datum.rb +2 -2
- data/app/models/pager_tree/integrations/alert.rb +2 -2
- data/app/models/pager_tree/integrations/aws_cloudwatch/v3.rb +15 -5
- data/app/models/pager_tree/integrations/boolean_store_accessor.rb +2 -2
- data/app/models/pager_tree/integrations/channel/hangouts/v3.rb +23 -2
- data/app/models/pager_tree/integrations/channel/mattermost/v3.rb +4 -0
- data/app/models/pager_tree/integrations/channel/microsoft_teams/v3.rb +74 -29
- data/app/models/pager_tree/integrations/channel/microsoft_teams/v4.rb +261 -0
- data/app/models/pager_tree/integrations/channel/slack/v3.rb +30 -3
- data/app/models/pager_tree/integrations/cloudflare/v3.rb +75 -0
- data/app/models/pager_tree/integrations/custom_webhook/v3.rb +206 -0
- data/app/models/pager_tree/integrations/custom_webhook/v3_examples/datadog.json +12 -0
- data/app/models/pager_tree/integrations/custom_webhook/v3_examples/datadog.yaml +30 -0
- data/app/models/pager_tree/integrations/custom_webhook/v3_examples/generic_rules_definition.json +9 -0
- data/app/models/pager_tree/integrations/custom_webhook/v3_examples/generic_rules_example.yaml +27 -0
- data/app/models/pager_tree/integrations/custom_webhook/v3_examples/grafana.json +25 -0
- data/app/models/pager_tree/integrations/custom_webhook/v3_examples/grafana.yaml +33 -0
- data/app/models/pager_tree/integrations/custom_webhook/v3_examples/new_relic.json +40 -0
- data/app/models/pager_tree/integrations/custom_webhook/v3_examples/new_relic.yaml +32 -0
- data/app/models/pager_tree/integrations/custom_webhook/v3_examples/pingdom.json +30 -0
- data/app/models/pager_tree/integrations/custom_webhook/v3_examples/pingdom.yaml +23 -0
- data/app/models/pager_tree/integrations/custom_webhook/v3_examples/sns_cloudwatch.json +12 -0
- data/app/models/pager_tree/integrations/custom_webhook/v3_examples/sns_cloudwatch.yaml +48 -0
- data/app/models/pager_tree/integrations/custom_webhook/v3_examples/sns_health_event.json +21 -0
- data/app/models/pager_tree/integrations/custom_webhook/v3_examples/sns_health_event.yaml +43 -0
- data/app/models/pager_tree/integrations/custom_webhook/v3_examples/sns_lambda_monitor.json +31 -0
- data/app/models/pager_tree/integrations/custom_webhook/v3_examples/sns_lambda_monitor.yaml +24 -0
- data/app/models/pager_tree/integrations/datadog/v3.rb +10 -3
- data/app/models/pager_tree/integrations/dynatrace/v3.rb +67 -0
- data/app/models/pager_tree/integrations/echoes_hq/v3.rb +138 -0
- data/app/models/pager_tree/integrations/elast_alert/v3.rb +24 -0
- data/app/models/pager_tree/integrations/email/v3.rb +272 -22
- data/app/models/pager_tree/integrations/email/v3_examples/example.yml +24 -0
- data/app/models/pager_tree/integrations/form/v3.rb +15 -3
- data/app/models/pager_tree/integrations/freshdesk/v3.rb +7 -5
- data/app/models/pager_tree/integrations/freshservice/v3.rb +7 -5
- data/app/models/pager_tree/integrations/grafana/v3.rb +2 -2
- data/app/models/pager_tree/integrations/hetrix_tools/v3.rb +160 -0
- data/app/models/pager_tree/integrations/honeybadger/v3.rb +1 -1
- data/app/models/pager_tree/integrations/hydrozen/v3.rb +6 -0
- data/app/models/pager_tree/integrations/integration.rb +52 -9
- data/app/models/pager_tree/integrations/jira_server/v3.rb +12 -2
- data/app/models/pager_tree/integrations/kapacitor/v3.rb +1 -1
- data/app/models/pager_tree/integrations/live_call_routing/twilio/v3.rb +257 -22
- data/app/models/pager_tree/integrations/logic_monitor/v3.rb +193 -3
- data/app/models/pager_tree/integrations/mattermost/outgoing_webhook/v3.rb +1 -1
- data/app/models/pager_tree/integrations/meta/workplace/v3.rb +230 -0
- data/app/models/pager_tree/integrations/new_relic/v3.rb +9 -5
- data/app/models/pager_tree/integrations/outgoing_event.rb +8 -0
- data/app/models/pager_tree/integrations/outgoing_webhook/v3.rb +108 -13
- data/app/models/pager_tree/integrations/outgoing_webhook_delivery/hook_relay.rb +43 -33
- data/app/models/pager_tree/integrations/outgoing_webhook_delivery.rb +6 -5
- data/app/models/pager_tree/integrations/prtg/v3.rb +2 -1
- data/app/models/pager_tree/integrations/pulsetic/v3.rb +70 -0
- data/app/models/pager_tree/integrations/scom/pagertree.ps1 +153 -0
- data/app/models/pager_tree/integrations/scom/v3.rb +58 -0
- data/app/models/pager_tree/integrations/sentry/v3.rb +477 -0
- data/app/models/pager_tree/integrations/server_guard24/v3.rb +1 -1
- data/app/models/pager_tree/integrations/sixty_six_uptime/v3.rb +118 -0
- data/app/models/pager_tree/integrations/slack/webhook/v3.rb +1 -1
- data/app/models/pager_tree/integrations/solar_winds/v3.rb +66 -2
- data/app/models/pager_tree/integrations/status_gator/v3.rb +69 -0
- data/app/models/pager_tree/integrations/uptime_kuma/v3.rb +76 -0
- data/app/models/pager_tree/integrations/uptime_robot/v3.rb +6 -0
- data/app/models/pager_tree/integrations/webhook/v3.rb +25 -7
- data/app/models/pager_tree/integrations/zabbix/v3.rb +95 -0
- data/app/models/pager_tree/integrations/zendesk/v3.rb +2 -0
- data/app/views/pager_tree/integrations/channel/hangouts/v3/_form_options.html.erb +7 -0
- data/app/views/pager_tree/integrations/channel/hangouts/v3/_show_options.html.erb +10 -0
- data/app/views/pager_tree/integrations/channel/microsoft_teams/v3/_form_options.html.erb +7 -0
- data/app/views/pager_tree/integrations/channel/microsoft_teams/v3/_show_options.html.erb +14 -0
- data/app/views/pager_tree/integrations/channel/microsoft_teams/v4/_form_options.html.erb +41 -0
- data/app/views/pager_tree/integrations/channel/microsoft_teams/v4/_show_options.html.erb +54 -0
- data/app/views/pager_tree/integrations/channel/slack/v3/_form_options.html.erb +6 -3
- data/app/views/pager_tree/integrations/channel/slack/v3/_show_options.html.erb +1 -1
- data/app/views/pager_tree/integrations/cloudflare/v3/_form_options.html.erb +7 -0
- data/app/views/pager_tree/integrations/cloudflare/v3/_show_options.html.erb +12 -0
- data/app/views/pager_tree/integrations/custom_webhook/v3/_form_options.html.erb +8 -0
- data/app/views/pager_tree/integrations/custom_webhook/v3/_show_options.html.erb +0 -0
- data/app/views/pager_tree/integrations/datadog/v3/_form_options.html.erb +7 -0
- data/app/views/pager_tree/integrations/datadog/v3/_show_options.html.erb +12 -0
- data/app/views/pager_tree/integrations/dynatrace/v3/_form_options.html.erb +0 -0
- data/app/views/pager_tree/integrations/dynatrace/v3/_show_options.html.erb +0 -0
- data/app/views/pager_tree/integrations/echoes_hq/v3/_form_options.html.erb +10 -0
- data/app/views/pager_tree/integrations/echoes_hq/v3/_show_options.html.erb +12 -0
- data/app/views/pager_tree/integrations/email/v3/_form_options.html.erb +41 -11
- data/app/views/pager_tree/integrations/email/v3/_show_options.html.erb +18 -0
- data/app/views/pager_tree/integrations/form/v3/_form_options.html.erb +1 -5
- data/app/views/pager_tree/integrations/hetrix_tools/v3/_form_options.html.erb +7 -0
- data/app/views/pager_tree/integrations/hetrix_tools/v3/_show_options.html.erb +12 -0
- data/app/views/pager_tree/integrations/hydrozen/v3/_form_options.html.erb +0 -0
- data/app/views/pager_tree/integrations/hydrozen/v3/_show_options.html.erb +0 -0
- data/app/views/pager_tree/integrations/live_call_routing/twilio/v3/_form_options.html.erb +44 -31
- data/app/views/pager_tree/integrations/live_call_routing/twilio/v3/_show_options.html.erb +93 -8
- data/app/views/pager_tree/integrations/logic_monitor/v3/_form_options.html.erb +31 -0
- data/app/views/pager_tree/integrations/logic_monitor/v3/_show_options.html.erb +60 -0
- data/app/views/pager_tree/integrations/meta/workplace/v3/_form_options.html.erb +44 -0
- data/app/views/pager_tree/integrations/meta/workplace/v3/_show_options.html.erb +68 -0
- data/app/views/pager_tree/integrations/outgoing_webhook/v3/_form_options.html.erb +17 -3
- data/app/views/pager_tree/integrations/outgoing_webhook/v3/_show_options.html.erb +20 -0
- data/app/views/pager_tree/integrations/pulsetic/v3/_form_options.html.erb +0 -0
- data/app/views/pager_tree/integrations/pulsetic/v3/_show_options.html.erb +0 -0
- data/app/views/pager_tree/integrations/scom/v3/_form_options.html.erb +0 -0
- data/app/views/pager_tree/integrations/scom/v3/_show_options.html.erb +0 -0
- data/app/views/pager_tree/integrations/sentry/v3/_form_options.html.erb +9 -0
- data/app/views/pager_tree/integrations/sentry/v3/_show_options.html.erb +15 -0
- data/app/views/pager_tree/integrations/sixty_six_uptime/v3/_form_options.html.erb +0 -0
- data/app/views/pager_tree/integrations/sixty_six_uptime/v3/_show_options.html.erb +0 -0
- data/app/views/pager_tree/integrations/solar_winds/v3/_form_options.html.erb +40 -0
- data/app/views/pager_tree/integrations/solar_winds/v3/_show_options.html.erb +66 -0
- data/app/views/pager_tree/integrations/status_gator/v3/_form_options.html.erb +13 -0
- data/app/views/pager_tree/integrations/status_gator/v3/_show_options.html.erb +24 -0
- data/app/views/pager_tree/integrations/uptime_kuma/v3/_form_options.html.erb +0 -0
- data/app/views/pager_tree/integrations/uptime_kuma/v3/_show_options.html.erb +0 -0
- data/app/views/pager_tree/integrations/webhook/v3/_form_options.html.erb +8 -0
- data/app/views/pager_tree/integrations/webhook/v3/_show_options.html.erb +15 -0
- data/app/views/pager_tree/integrations/zabbix/v3/_form_options.html.erb +7 -0
- data/app/views/pager_tree/integrations/zabbix/v3/_show_options.html.erb +12 -0
- data/config/locales/en.yml +158 -10
- data/config/routes.rb +1 -0
- data/lib/pager_tree/integrations/format_converters/yaml_json_converter.rb +67 -0
- data/lib/pager_tree/integrations/version.rb +1 -1
- data/lib/pager_tree/integrations.rb +11 -3
- metadata +84 -8
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
preprocess:
|
|
3
|
+
- type: parse_sns
|
|
4
|
+
rules:
|
|
5
|
+
- match:
|
|
6
|
+
log.data.Type: "Notification"
|
|
7
|
+
log.data.Message.NewStateValue: "ALARM"
|
|
8
|
+
actions:
|
|
9
|
+
- type: create
|
|
10
|
+
title: "{{sanitize log.data.Subject}}"
|
|
11
|
+
description: "{{log.data.Message.NewStateReason}}"
|
|
12
|
+
thirdparty_id: "{{log.data.Message.AlarmArn}}"
|
|
13
|
+
additional_data:
|
|
14
|
+
- format: text
|
|
15
|
+
label: Event Category
|
|
16
|
+
value: "scheduledChange"
|
|
17
|
+
- format: text
|
|
18
|
+
label: Affected Resources
|
|
19
|
+
value: "example-service|example-backend"
|
|
20
|
+
- format: link
|
|
21
|
+
label: Fargate Platform Docs
|
|
22
|
+
value: "https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform-fargate.html"
|
|
23
|
+
- format: link
|
|
24
|
+
label: Task Maintenance Docs
|
|
25
|
+
value: "https://docs.aws.amazon.com/AmazonECS/latest/userguide/task-maintenance.html"
|
|
26
|
+
- format: link
|
|
27
|
+
label: Service Definition Params
|
|
28
|
+
value: "https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service_definition_parameters.html#sd-deploymentconfiguration"
|
|
29
|
+
- format: link
|
|
30
|
+
label: Fargate Notifications Blog
|
|
31
|
+
value: "https://aws.amazon.com/blogs/containers/improving-operational-visibility-with-aws-fargate-task-retirement-notifications/"
|
|
32
|
+
- format: link
|
|
33
|
+
label: Create Deployment CLI
|
|
34
|
+
value: "https://docs.aws.amazon.com/cli/latest/reference/deploy/create-deployment.html"
|
|
35
|
+
- format: link
|
|
36
|
+
label: AWS Support
|
|
37
|
+
value: "https://aws.amazon.com/support"
|
|
38
|
+
|
|
39
|
+
- match:
|
|
40
|
+
log.data.Type: "Notification"
|
|
41
|
+
log.data.Message.NewStateValue: "OK"
|
|
42
|
+
actions:
|
|
43
|
+
- type: resolve
|
|
44
|
+
thirdparty_id: "{{log.data.Message.AlarmArn}}"
|
|
45
|
+
default:
|
|
46
|
+
actions:
|
|
47
|
+
- type: ignore
|
|
48
|
+
reason: "Unhandled AWS Health Event"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"client": null,
|
|
3
|
+
"client_url": null,
|
|
4
|
+
"contexts": null,
|
|
5
|
+
"description": "example-service|example-backend\r\nDescription - You are receiving this notification because AWS Fargate has deployed a new platform version revision (1) and will retire any tasks running on previous platform version revision(s) starting at Wed, 12 Nov 2025 03:00 GMT as part of routine task maintenance (2). Please find the list of affected tasks in the \\\"Affected Resources\\\" tab . There is no action required on your part unless you want to replace these tasks before task maintenance start time. When using the default value of 100% for minimum healthy percent configuration of an Amazon Elastic Container Service (Amazon ECS) service (3), a replacement task will be launched on the most recent platform version revision before the affected task is retired. Any tasks launched after Wed, 5 Nov 2025 03:00 GMT were launched on the new platform version revision.\n\nAWS Fargate is a serverless, pay-as-you-go compute engine that lets you focus on building applications without managing servers. As described in ",
|
|
6
|
+
"event_type": "trigger",
|
|
7
|
+
"incident_key": "example-service|example-backend\r\nDescription - You are receiving this notification because AWS Fargate has deployed a new platform version revision (1) and will retire any tasks running on previous platform version revision(s) starting at Wed",
|
|
8
|
+
"service_key": "generic-service-key",
|
|
9
|
+
"details": {
|
|
10
|
+
"Message": "Account-generic-; Region - us-east-1\r\nEventCategory - scheduledChange\r\nAffected resources - example-service|example-backend\r\nDescription - You are receiving this notification because AWS Fargate has deployed a new platform version revision (1) and will retire any tasks running on previous platform version revision(s) starting at Wed, 12 Nov 2025 03:00 GMT as part of routine task maintenance (2). Please find the list of affected tasks in the \\\"Affected Resources\\\" tab . There is no action required on your part unless you want to replace these tasks before task maintenance start time. When using the default value of 100% for minimum healthy percent configuration of an Amazon Elastic Container Service (Amazon ECS) service (3), a replacement task will be launched on the most recent platform version revision before the affected task is retired. Any tasks launched after Wed, 5 Nov 2025 03:00 GMT were launched on the new platform version revision.\n\nAWS Fargate is a serverless, pay-as-you-go compute engine that lets you focus on building applications without managing servers. As described in the Fargate documentation (2) and (4), Fargate regularly deploys platform version revisions to make new features available and for routine maintenance. The Fargate update includes updates to the underlying Operating System (Linux or Windows as applicable), and to runtime components. Fargate will gradually replace the tasks in your service using your configured deployment settings, ensuring all tasks run on the new Fargate platform version revision.\n\nWe do not expect this update to impact your ECS services. However, if you want to control when your tasks are replaced, you can initiate an ECS service update before Wed, 12 Nov 2025 03:00 GMT by following the instructions below. \n\nIf you are using the rolling deployment type for your service, you can run the update-service command from the AWS command-line interface specifying force-new-deployment:\n\n$ aws ecs update-service --service service_name \\\n--cluster cluster_name --force-new-deployment\n\nIf you are using the Blue/Green deployment type, please refer to the documentation for create-deployment (5) and create a new deployment using the same task definition version.\n\nPlease contact AWS Support (6) if you have any questions or concerns.\n\n(1) https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform-fargate.html\n(2) https://docs.aws.amazon.com/AmazonECS/latest/userguide/task-maintenance.html\n(3) https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service_definition_parameters.html#sd-deploymentconfiguration \n(4) https://aws.amazon.com/blogs/containers/improving-operational-visibility-with-aws-fargate-task-retirement-notifications/\n(5) https://docs.aws.amazon.com/cli/latest/reference/deploy/create-deployment.html\n(6) https://aws.amazon.com/support\n\n",
|
|
11
|
+
"MessageId": "generic-message-id",
|
|
12
|
+
"Signature": "generic-signature",
|
|
13
|
+
"SignatureVersion": "1",
|
|
14
|
+
"SigningCertURL": "https://sns.us-east-1.amazonaws.com/SimpleNotificationService-generic.pem",
|
|
15
|
+
"Subject": "aws-health-scheduled change",
|
|
16
|
+
"Timestamp": "2025-11-19T03:17:38.633Z",
|
|
17
|
+
"TopicArn": "arn:aws:sns:us-east-1:generic-account:generic-health-topic",
|
|
18
|
+
"Type": "Notification",
|
|
19
|
+
"UnsubscribeURL": "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-east-1:generic-account:generic-health-topic:generic-sub-arn"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
preprocess:
|
|
3
|
+
- type: parse_sns
|
|
4
|
+
rules:
|
|
5
|
+
- match:
|
|
6
|
+
log.data.details.Type: "Notification"
|
|
7
|
+
log.data.details.TopicArn: { $regex: "^arn:aws:sns" }
|
|
8
|
+
log.data.details.Subject: "aws-health-scheduled change"
|
|
9
|
+
actions:
|
|
10
|
+
- type: create
|
|
11
|
+
title: "{{log.data.details.Subject}}"
|
|
12
|
+
description: "{{log.data.details.Message}}"
|
|
13
|
+
thirdparty_id: "{{log.data.details.MessageId}}"
|
|
14
|
+
additional_data:
|
|
15
|
+
- format: text
|
|
16
|
+
label: Event Category
|
|
17
|
+
value: "scheduledChange"
|
|
18
|
+
- format: text
|
|
19
|
+
label: Affected Resources
|
|
20
|
+
value: "example-service|example-backend"
|
|
21
|
+
- format: link
|
|
22
|
+
label: Fargate Platform Docs
|
|
23
|
+
value: "https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform-fargate.html"
|
|
24
|
+
- format: link
|
|
25
|
+
label: Task Maintenance Docs
|
|
26
|
+
value: "https://docs.aws.amazon.com/AmazonECS/latest/userguide/task-maintenance.html"
|
|
27
|
+
- format: link
|
|
28
|
+
label: Service Definition Params
|
|
29
|
+
value: "https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service_definition_parameters.html#sd-deploymentconfiguration"
|
|
30
|
+
- format: link
|
|
31
|
+
label: Fargate Notifications Blog
|
|
32
|
+
value: "https://aws.amazon.com/blogs/containers/improving-operational-visibility-with-aws-fargate-task-retirement-notifications/"
|
|
33
|
+
- format: link
|
|
34
|
+
label: Create Deployment CLI
|
|
35
|
+
value: "https://docs.aws.amazon.com/cli/latest/reference/deploy/create-deployment.html"
|
|
36
|
+
- format: link
|
|
37
|
+
label: AWS Support
|
|
38
|
+
value: "https://aws.amazon.com/support"
|
|
39
|
+
|
|
40
|
+
default:
|
|
41
|
+
actions:
|
|
42
|
+
- type: ignore
|
|
43
|
+
reason: "Unhandled AWS Health Event"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"client": null,
|
|
3
|
+
"client_url": null,
|
|
4
|
+
"contexts": null,
|
|
5
|
+
"description": "LAMBDA FUNCTIONS WITH RECENT ERRORS:\n\n• example-lambda-function (us-east-1)\n Last execution: 2025-11-13\n Errors (last 7 runs): 3\n Most recent error: 2025-11-13\n\nDashboard: https://example.com/dashboard\nGenerated: 2025-11-14 08:07 UTC",
|
|
6
|
+
"event_type": "trigger",
|
|
7
|
+
"incident_key": "generic-incident-key",
|
|
8
|
+
"service_key": "generic-service-key",
|
|
9
|
+
"details": {
|
|
10
|
+
"Message": "LAMBDA FUNCTIONS WITH RECENT ERRORS:\n\n• example-lambda-function (us-east-1)\n Last execution: 2025-11-13\n Errors (last 7 runs): 3\n Most recent error: 2025-11-13\n\nDashboard: https://example.com/dashboard\nGenerated: 2025-11-14 08:07 UTC",
|
|
11
|
+
"MessageAttributes": {
|
|
12
|
+
"severity": {
|
|
13
|
+
"Type": "String",
|
|
14
|
+
"Value": "error"
|
|
15
|
+
},
|
|
16
|
+
"source": {
|
|
17
|
+
"Type": "String",
|
|
18
|
+
"Value": "lambda-monitoring"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"MessageId": "generic-message-id",
|
|
22
|
+
"Signature": "generic-signature",
|
|
23
|
+
"SignatureVersion": "1",
|
|
24
|
+
"SigningCertURL": "https://sns.us-east-1.amazonaws.com/SimpleNotificationService-generic.pem",
|
|
25
|
+
"Subject": "AWS Lambda Functions Failing: 1 function with recent errors detected",
|
|
26
|
+
"Timestamp": "2025-11-14T08:07:35.435Z",
|
|
27
|
+
"TopicArn": "arn:aws:sns:us-east-1:generic-account:sns-generic-topic",
|
|
28
|
+
"Type": "Notification",
|
|
29
|
+
"UnsubscribeURL": "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-east-1:generic-account:sns-generic-topic:generic-sub-arn"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
preprocess:
|
|
3
|
+
- type: parse_sns
|
|
4
|
+
rules:
|
|
5
|
+
- match:
|
|
6
|
+
log.data.details.MessageAttributes.severity.Value: "error"
|
|
7
|
+
log.data.details.MessageAttributes.source.Value: "lambda-monitoring"
|
|
8
|
+
actions:
|
|
9
|
+
- type: create
|
|
10
|
+
title: "{{log.data.details.Subject}}"
|
|
11
|
+
description: "{{log.data.details.Message}}"
|
|
12
|
+
thirdparty_id: "{{log.data.details.MessageId}}"
|
|
13
|
+
additional_data:
|
|
14
|
+
- format: link
|
|
15
|
+
label: Dashboard
|
|
16
|
+
value: "https://example.com/dashboard"
|
|
17
|
+
- format: text
|
|
18
|
+
label: Generated
|
|
19
|
+
value: "2025-11-14 08:07 UTC"
|
|
20
|
+
|
|
21
|
+
default:
|
|
22
|
+
actions:
|
|
23
|
+
- type: ignore
|
|
24
|
+
reason: "Unhandled SNS notification type"
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
module PagerTree::Integrations
|
|
2
2
|
class Datadog::V3 < Integration
|
|
3
|
-
OPTIONS = [
|
|
3
|
+
OPTIONS = [
|
|
4
|
+
{key: :support_retriggered_event, type: :boolean, default: false}
|
|
5
|
+
]
|
|
4
6
|
store_accessor :options, *OPTIONS.map { |x| x[:key] }.map(&:to_s), prefix: "option"
|
|
5
7
|
|
|
6
8
|
after_initialize do
|
|
9
|
+
self.option_support_retriggered_event ||= false
|
|
7
10
|
end
|
|
8
11
|
|
|
9
12
|
def adapter_supports_incoming?
|
|
@@ -24,8 +27,12 @@ module PagerTree::Integrations
|
|
|
24
27
|
|
|
25
28
|
def adapter_action
|
|
26
29
|
case _transition
|
|
27
|
-
when "Triggered"
|
|
28
|
-
|
|
30
|
+
when "Triggered"
|
|
31
|
+
:create
|
|
32
|
+
when "Recovered"
|
|
33
|
+
:resolve
|
|
34
|
+
when "Re-Triggered"
|
|
35
|
+
(option_support_retriggered_event == true) ? :recreate : :other
|
|
29
36
|
else
|
|
30
37
|
:other
|
|
31
38
|
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
module PagerTree::Integrations
|
|
2
|
+
class Dynatrace::V3 < Integration
|
|
3
|
+
OPTIONS = []
|
|
4
|
+
store_accessor :options, *OPTIONS.map { |x| x[:key] }.map(&:to_s), prefix: "option"
|
|
5
|
+
|
|
6
|
+
after_initialize do
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def adapter_supports_incoming?
|
|
10
|
+
true
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def adapter_supports_outgoing?
|
|
14
|
+
false
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def adapter_incoming_can_defer?
|
|
18
|
+
true
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def adapter_thirdparty_id
|
|
22
|
+
adapter_incoming_request_params.dig("ProblemID")
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def adapter_action
|
|
26
|
+
state = adapter_incoming_request_params.dig("State")
|
|
27
|
+
return :create if state == "OPEN"
|
|
28
|
+
return :resolve if state == "RESOLVED"
|
|
29
|
+
:other
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def adapter_process_create
|
|
33
|
+
Alert.new(
|
|
34
|
+
title: _title,
|
|
35
|
+
description: _description,
|
|
36
|
+
thirdparty_id: adapter_thirdparty_id,
|
|
37
|
+
dedup_keys: [],
|
|
38
|
+
additional_data: _additional_datums,
|
|
39
|
+
tags: _tags
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
private
|
|
44
|
+
|
|
45
|
+
def _title
|
|
46
|
+
adapter_incoming_request_params.dig("ProblemTitle")
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def _description
|
|
50
|
+
adapter_incoming_request_params.dig("ProblemDetailsHTML").presence ||
|
|
51
|
+
adapter_incoming_request_params.dig("ProblemDetailsText").presence
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def _tags
|
|
55
|
+
(adapter_incoming_request_params.dig("Tags") || "").split(",").map(&:strip).uniq.compact
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def _additional_datums
|
|
59
|
+
[
|
|
60
|
+
AdditionalDatum.new(format: "link", label: "URL", value: adapter_incoming_request_params.dig("ProblemURL")),
|
|
61
|
+
AdditionalDatum.new(format: "text", label: "Impacted Entity", value: adapter_incoming_request_params.dig("ImpactedEntity")),
|
|
62
|
+
AdditionalDatum.new(format: "text", label: "Problem Impact", value: adapter_incoming_request_params.dig("ProblemImpact")),
|
|
63
|
+
AdditionalDatum.new(format: "text", label: "Problem Severity", value: adapter_incoming_request_params.dig("ProblemSeverity"))
|
|
64
|
+
]
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
module PagerTree::Integrations
|
|
2
|
+
class EchoesHq::V3 < Integration
|
|
3
|
+
OPTIONS = [
|
|
4
|
+
{key: :api_key, type: :string, default: nil}
|
|
5
|
+
]
|
|
6
|
+
store_accessor :options, *OPTIONS.map { |x| x[:key] }.map(&:to_s), prefix: "option"
|
|
7
|
+
|
|
8
|
+
validates :option_api_key, presence: true
|
|
9
|
+
|
|
10
|
+
after_initialize do
|
|
11
|
+
self.option_api_key ||= nil
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def adapter_supports_incoming?
|
|
15
|
+
false
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def adapter_supports_outgoing?
|
|
19
|
+
true
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def adapter_show_outgoing_webhook_delivery?
|
|
23
|
+
false
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def adapter_supports_title_template?
|
|
27
|
+
false
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def adapter_supports_description_template?
|
|
31
|
+
false
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def adapter_supports_auto_aggregate?
|
|
35
|
+
false
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def adapter_supports_auto_resolve?
|
|
39
|
+
false
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def adapter_outgoing_interest?(event_name)
|
|
43
|
+
["alert_open", "alert_acknowledged", "alert_resolved"].include?(event_name.to_s)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def adapter_process_outgoing
|
|
47
|
+
@pager_tree_alert = adapter_outgoing_event.alert
|
|
48
|
+
|
|
49
|
+
create_or_update_echoes_hq_incident
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
private
|
|
53
|
+
|
|
54
|
+
def echoes_hq_incident_id
|
|
55
|
+
"PAGERTREE_#{@pager_tree_alert.tiny_id}"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def echoes_hq_status
|
|
59
|
+
case @pager_tree_alert.status.to_s
|
|
60
|
+
when "acknowledged" then "acknowledged"
|
|
61
|
+
when "resolved" then "resolved"
|
|
62
|
+
else
|
|
63
|
+
"triggered"
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def echoes_hq_headers
|
|
68
|
+
{
|
|
69
|
+
Accept: "application/json",
|
|
70
|
+
"Content-Type": "application/json",
|
|
71
|
+
Authorization: "Bearer #{option_api_key}"
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def get_echoes_hq_incident
|
|
76
|
+
url = "https://api.echoeshq.com/v1/signals/incidents/#{echoes_hq_incident_id}"
|
|
77
|
+
response = HTTParty.get(url, headers: echoes_hq_headers, timeout: 3)
|
|
78
|
+
(response.code == 200) ? response.parsed_response : nil
|
|
79
|
+
rescue
|
|
80
|
+
nil
|
|
81
|
+
ensure
|
|
82
|
+
logs.create(level: :info, format: :json, message: {
|
|
83
|
+
message: "GET EchoesHQ Incident for PagerTree alert ##{@pager_tree_alert.tiny_id}",
|
|
84
|
+
url: url,
|
|
85
|
+
response: response
|
|
86
|
+
})
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def create_echoes_hq_incident
|
|
90
|
+
url = "https://api.echoeshq.com/v1/signals/incidents"
|
|
91
|
+
body = {
|
|
92
|
+
id: echoes_hq_incident_id,
|
|
93
|
+
title: @pager_tree_alert.title,
|
|
94
|
+
service: {
|
|
95
|
+
name: @pager_tree_alert.source&.name || name
|
|
96
|
+
},
|
|
97
|
+
started_at: @pager_tree_alert.created_at.iso8601
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
response = HTTParty.post(url, body: body.to_json, headers: echoes_hq_headers, timeout: 3)
|
|
101
|
+
(response.code == 200) ? response.parsed_response : nil
|
|
102
|
+
rescue
|
|
103
|
+
nil
|
|
104
|
+
ensure
|
|
105
|
+
logs.create(level: :info, format: :json, message: {
|
|
106
|
+
message: "CREATE EchoesHQ Incident for PagerTree alert ##{@pager_tree_alert.tiny_id}",
|
|
107
|
+
url: url,
|
|
108
|
+
body: body,
|
|
109
|
+
response: response
|
|
110
|
+
})
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def update_echoes_hq_incident
|
|
114
|
+
url = "https://api.echoeshq.com/v1/signals/incidents/#{echoes_hq_incident_id}"
|
|
115
|
+
body = {
|
|
116
|
+
title: @pager_tree_alert.title,
|
|
117
|
+
status: echoes_hq_status,
|
|
118
|
+
resolved_at: @pager_tree_alert.resolved_at&.iso8601
|
|
119
|
+
}
|
|
120
|
+
response = HTTParty.put(url, body: body.to_json, headers: echoes_hq_headers, timeout: 3)
|
|
121
|
+
(response.code == 200) ? response.parsed_response : nil
|
|
122
|
+
rescue
|
|
123
|
+
nil
|
|
124
|
+
ensure
|
|
125
|
+
logs.create(level: :info, format: :json, message: {
|
|
126
|
+
message: "UPDATE EchoesHQ Incident for PagerTree alert ##{@pager_tree_alert.tiny_id}",
|
|
127
|
+
url: url,
|
|
128
|
+
body: body,
|
|
129
|
+
response: response
|
|
130
|
+
})
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
def create_or_update_echoes_hq_incident
|
|
134
|
+
create_echoes_hq_incident unless get_echoes_hq_incident.present?
|
|
135
|
+
update_echoes_hq_incident
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
end
|
|
@@ -25,6 +25,7 @@ module PagerTree::Integrations
|
|
|
25
25
|
def adapter_action
|
|
26
26
|
case _event_type
|
|
27
27
|
when "create" then :create
|
|
28
|
+
when "acknowledge" then :acknowledge
|
|
28
29
|
when "resolve" then :resolve
|
|
29
30
|
else
|
|
30
31
|
:other
|
|
@@ -41,6 +42,29 @@ module PagerTree::Integrations
|
|
|
41
42
|
)
|
|
42
43
|
end
|
|
43
44
|
|
|
45
|
+
# elastalert will raise an error for any 4xx or 5xx response and then retry for a default of 2 days
|
|
46
|
+
# https://github.com/Yelp/elastalert/blob/master/elastalert/alerts.py#L1496
|
|
47
|
+
# we don't want to get spammy with retries, so we'll just return a 200
|
|
48
|
+
def adapter_response_rate_limit_code
|
|
49
|
+
:ok
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def adapter_response_disabled_code
|
|
53
|
+
:ok
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def adapter_response_inactive_subscription_code
|
|
57
|
+
:ok
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def adapter_response_upgrade_code
|
|
61
|
+
:ok
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def adapter_response_blocked_code
|
|
65
|
+
:ok
|
|
66
|
+
end
|
|
67
|
+
|
|
44
68
|
private
|
|
45
69
|
|
|
46
70
|
# See https://github.com/Yelp/elastalert/pull/2001 for details
|