Skip to content

Commit

Permalink
[PLINT-438] Add fly recommended monitor (DataDog#18291)
Browse files Browse the repository at this point in the history
* Add fly monitor

* move monitor json

* add fields

* use right app id

* Update fly_io/assets/monitors/app_suspended.json

Co-authored-by: Jen Gilbert <[email protected]>

* Add integration tag

* fix integration id

* revert tag change

* test

* update tags

* Add title tag

* revert to original

* test fly.io

* revert

---------

Co-authored-by: Jen Gilbert <[email protected]>
  • Loading branch information
sarah-witt and jhgilbert authored Sep 4, 2024
1 parent b368530 commit 6fea0a5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
28 changes: 28 additions & 0 deletions fly_io/assets/monitors/app_suspended.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": 2,
"created_at": "2024-07-31",
"last_updated_at": "2024-07-31",
"title": "Fly.io App Suspended",
"tags": [
"integration:fly-io"
],
"description": "A Fly.io app can be suspended if the app exits or if the app does not have any traffic. This monitor tracks whether an app status is suspended for the last 10 minutes.",
"definition": {
"name": "Fly.io app {{app_name.name}} is suspended",
"message": "{{#is_alert}} Fly.io app {{app_name.name}} has been suspended for the last 10 minutes.{{/is_alert}}\n\n{{#is_recovery}} Fly.io app {{app_name.name}} has recovered from suspended status for the last 10 mins.{{/is_recovery}}",
"query": "min(last_10m):avg:fly_io.app.count{app_status:suspended} by {app_name} >= 1",
"options": {
"thresholds": {
"critical": 1
},
"notify_audit": false,
"include_tags": false,
"new_group_delay": 60,
"timeout_h": 0
},
"tags": [
"integration:fly-io"
],
"type": "query alert"
}
}
3 changes: 3 additions & 0 deletions fly_io/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
"metadata_path": "assets/service_checks.json"
}
},
"monitors": {
"app_suspended": "assets/monitors/app_suspended.json"
},
"dashboards": {
"Fly.io Overview ": "assets/dashboards/overview.json"
}
Expand Down

0 comments on commit 6fea0a5

Please sign in to comment.