Skip to content

Commit

Permalink
migrate mongo db atlas assets (DataDog#1789)
Browse files Browse the repository at this point in the history
* migrate mongo db atlas assets

* Reorder links

* add messages to monitors

* fix metadata path

* add mongodb to code owners

---------

Co-authored-by: Rosa Trieu <[email protected]>
  • Loading branch information
alpinet and rtrieu authored Mar 30, 2023
1 parent 7391af4 commit f42e594
Show file tree
Hide file tree
Showing 13 changed files with 400 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
/lighthouse/ @DataDog/agent-integrations
/logstash/ @ervansetiawan [email protected]
/logzio/ @DataDog/agent-integrations
/mongodb_atlas/ @DataDog/web-integrations
/n2ws/ @eliadeini [email protected]
/neo4j/ @davidfauth [email protected]
/neoload/ @Neotys-Labs/r-d @DataDog/marketplace-review
Expand Down
6 changes: 6 additions & 0 deletions mongodb_atlas/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# CHANGELOG - MongoDB Atlas

## 1.0.0 / 2023-03-21

* [Added] Added changelog

47 changes: 47 additions & 0 deletions mongodb_atlas/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
## Overview

MongoDB Atlas can push calculated metrics into Datadog to:

- Visualize key MongoDB Atlas metrics.
- Correlate MongoDB Atlas performance with the rest of your applications.

**Note: This integration is only available on M10+ clusters.**

## Setup

### Installation

You can install the MongoDB Atlas integration by logging into your Atlas portal.

### Configuration

1. Retrieve or create a Datadog [API key][1].
2. In the [Atlas portal][2], enter a Datadog API key under **Integrations** -> **Datadog Settings**.

## Data Collected

### Metrics

See [metadata.csv][3] for a list of metrics provided by this integration.

### Events

MongoDB Atlas can push [alerts][4] to Datadog as events.

### Service Checks

The MongoDB Atlas integration does not include any service checks.

## Troubleshooting

Need help? [Contact Datadog Support][5]

## Further Reading

{{< partial name="whats-next/whats-next.html" >}}

[1]: https://app.datadoghq.com/organization-settings/api-keys
[2]: https://docs.atlas.mongodb.com/tutorial/monitoring-integrations/#procedure
[3]: https://github.com/DataDog/integrations-extras/blob/master/mongodb_atlas/metadata.csv
[4]: https://www.mongodb.com/blog/post/push-your-mongodb-atlas-alerts-to-datadog
[5]: https://docs.datadoghq.com/help/
29 changes: 29 additions & 0 deletions mongodb_atlas/assets/monitors/high_cpu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "[MongoDB Atlas] CPU usage is higher than average on host: {{host.name}} ",
"type": "query alert",
"query": "avg(last_4h):anomalies(avg:mongodb.atlas.system.cpu.norm.irq{*} by {host} + avg:mongodb.atlas.system.cpu.norm.nice{*} by {host} + avg:mongodb.atlas.system.cpu.norm.user{*} by {host} + avg:mongodb.atlas.system.cpu.norm.guest{*} by {host} + avg:mongodb.atlas.system.cpu.norm.steal{*} by {host} + avg:mongodb.atlas.system.cpu.norm.iowait{*} by {host} + avg:mongodb.atlas.system.cpu.norm.kernel{*} by {host} + avg:mongodb.atlas.system.cpu.norm.softirq{*} by {host}, 'agile', 2, direction='above', interval=60, alert_window='last_15m', count_default_zero='true', seasonality='hourly') >= 1",
"message": "Notify your team when CPU usage is higher than normal ({{value}} %)",
"tags": [
"integration:mongodb-atlas"
],
"options": {
"thresholds": {
"critical": 1,
"critical_recovery": 0
},
"notify_audit": false,
"require_full_window": false,
"notify_no_data": false,
"no_data_timeframe": 10,
"renotify_interval": 0,
"threshold_windows": {
"trigger_window": "last_15m",
"recovery_window": "last_15m"
},
"escalation_message": "",
"new_group_delay": 60
},
"recommended_monitor_metadata": {
"description": "Notify your team when CPU usage is higher than normal ({{value}} %)"
}
}
29 changes: 29 additions & 0 deletions mongodb_atlas/assets/monitors/memory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "[MongoDB Atlas] Memory usage is higher than average on host: {{host.name}} ",
"type": "query alert",
"query": "avg(last_4h):anomalies(avg:mongodb.atlas.mem.virtual{*} by {host} + avg:mongodb.atlas.mem.resident{*} by {host}, 'agile', 2, direction='above', interval=60, alert_window='last_15m', count_default_zero='true', seasonality='hourly') >= 1",
"message": "Notify your team when memory usage is higher than normal ({{value}} %)",
"tags": [
"integration:mongodb-atlas"
],
"options": {
"thresholds": {
"critical": 1,
"critical_recovery": 0
},
"notify_audit": false,
"require_full_window": false,
"notify_no_data": false,
"no_data_timeframe": 10,
"renotify_interval": 0,
"threshold_windows": {
"trigger_window": "last_15m",
"recovery_window": "last_15m"
},
"escalation_message": "",
"new_group_delay": 60
},
"recommended_monitor_metadata": {
"description": "Notify your team when memory usage is higher than normal ({{value}} %)"
}
}
28 changes: 28 additions & 0 deletions mongodb_atlas/assets/monitors/query_efficiency.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "[MongoDB Atlas] Efficiency of queries is degrading",
"type": "query alert",
"query": "avg(last_4h):anomalies(avg:mongodb.atlas.metrics.queryexecutor.scannedobjectsperreturned{*}, 'agile', 2, direction='above', interval=60, alert_window='last_15m', count_default_zero='true', seasonality='hourly') >= 1",
"message": "Notify your team when average query efficiency is degraded\n",
"tags": [
"integration:mongodb-atlas"
],
"options": {
"thresholds": {
"critical": 1,
"critical_recovery": 0
},
"notify_audit": false,
"require_full_window": false,
"notify_no_data": false,
"no_data_timeframe": 10,
"renotify_interval": 0,
"threshold_windows": {
"trigger_window": "last_15m",
"recovery_window": "last_15m"
},
"escalation_message": ""
},
"recommended_monitor_metadata": {
"description": "Notify your team when average query efficiency is degraded\n."
}
}
29 changes: 29 additions & 0 deletions mongodb_atlas/assets/monitors/read_latency.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "[MongoDB Atlas] Read Latency is higher than average for host: {{host.name}} ",
"type": "query alert",
"query": "avg(last_4h):anomalies(avg:mongodb.atlas.oplatencies.reads.avg{*} by {host}, 'basic', 2, direction='above', interval=60, alert_window='last_15m', count_default_zero='true') >= 1",
"message": "Notify your team when read latency is higher than usual ({{value}} ms)\n",
"tags": [
"integration:mongodb-atlas"
],
"options": {
"thresholds": {
"critical": 1,
"critical_recovery": 0
},
"notify_audit": false,
"require_full_window": false,
"notify_no_data": false,
"no_data_timeframe": 10,
"renotify_interval": 0,
"threshold_windows": {
"trigger_window": "last_15m",
"recovery_window": "last_15m"
},
"escalation_message": "",
"new_group_delay": 60
},
"recommended_monitor_metadata": {
"description": "Notify your team when read latency is higher than usual ({{value}} ms)\n"
}
}
29 changes: 29 additions & 0 deletions mongodb_atlas/assets/monitors/write_latency.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "[MongoDB Atlas] Write Latency is higher than average for host: {{host.name}} ",
"type": "query alert",
"query": "avg(last_4h):anomalies(avg:mongodb.atlas.oplatencies.writes.avg{*} by {host}, 'basic', 2, direction='above', interval=60, alert_window='last_15m', count_default_zero='true') >= 1",
"message": "Notify your team when write latency is higher than usual ({{value}} ms)\n",
"tags": [
"integration:mongodb-atlas"
],
"options": {
"thresholds": {
"critical": 1,
"critical_recovery": 0
},
"notify_audit": false,
"require_full_window": false,
"notify_no_data": false,
"no_data_timeframe": 10,
"renotify_interval": 0,
"threshold_windows": {
"trigger_window": "last_15m",
"recovery_window": "last_15m"
},
"escalation_message": "",
"new_group_delay": 60
},
"recommended_monitor_metadata": {
"description": "Notify your team when write latency is higher than usual ({{value}} ms)\n"
}
}
1 change: 1 addition & 0 deletions mongodb_atlas/assets/service_checks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
27 changes: 27 additions & 0 deletions mongodb_atlas/desc.mako
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<%page expression_filter="h"/>
<%inherit file="/desc_base.mako"/>
<%def name="title()">
MongoDB Atlas Integration
</%def>

<div id="int-overview">
<h2>Overview</h2>
MongoDB Atlas can push calculated metrics into Datadog to:
<ul>
<li>Visualize key MongoDB Atlas metrics.</li>
<li>Correlate MongoDB Atlas performance with the rest of your applications.</li>
</ul>

</div>

<div id="int-configuration">
<h2>Configuration</h2>
<p><em>You can install the MongoDB Atlas integration by logging into your Atlas portal.</em></p>

<ol>
<li>Retrieve or create a Datadog <a href="/account/settings#api">API key</a>.
<li>In the Atlas portal, enter a Datadog API key under <strong>Integrations</strong> -> <strong>Datadog Settings</strong>.
</ol>
</div>

<%include file="/metrics_list.mako"/>
46 changes: 46 additions & 0 deletions mongodb_atlas/images/IMAGES_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Marketplace Media Carousel Guidelines

## Using the media gallery

To use the media gallery, you must upload a minimum of one image. The gallery
can hold a maximum of 8 pieces of media total, and one of these pieces of media
can be a video (guidelines and submission steps below). Images should be
added to your /images directory and referenced in the manifest.json file.


## Image and video requirements

### Images

```
File type : .jpg or .png
File size : ~500 KB per image, with a max of 1 MB per image
File dimensions : The aspect ratio must be 16:9 minimum, with these constraints:
Width: 1440px
Min height: 810px
Max height: 2560px
File name : Use only letters, numbers, underscores, and hyphens
Color mode : RGB
Color profile : sRGB
Description : 300 characters maximum
```

### Video

To display a video in your media gallery, please send our team the zipped file
or a link to download the video at `[email protected]`. In addition,
please upload a thumbnail image for your video as a part of the pull request.
Once approved, we will upload the file to Vimeo and provide you with the
vimeo_id to add to your manifest.json file. Please note that the gallery can
only hold one video.

```
File type : MP4 H.264
File size : Max 1 video; 1 GB maximum size
File dimensions : The aspect ratio must be exactly 16:9, and the resolution must be 1920x1080 or higher
File name : partnerName-appName.mp4
Run time : Recommendation of 60 seconds or less
Description : 300 characters maximum
```
53 changes: 53 additions & 0 deletions mongodb_atlas/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"manifest_version": "2.0.0",
"app_uuid": "d7f734da-a1f7-4e3f-a590-ea154018a8d8",
"app_id": "mongodb-atlas",
"display_on_public_website": true,
"tile": {
"overview": "README.md#Overview",
"configuration": "README.md#Setup",
"support": "README.md#Support",
"changelog": "CHANGELOG.md",
"description": "MongoDB Atlas",
"title": "MongoDB Atlas",
"media": [],
"classifier_tags": [
"Supported OS::Linux",
"Supported OS::Windows",
"Supported OS::macOS",
"Category::Metrics"
]
},
"assets": {
"integration": {
"auto_install": true,
"source_type_name": "MongoDB Atlas",
"configuration": {},
"events": {
"creates_events": true
},
"metrics": {
"prefix": "mongodb.atlas.",
"check": "mongodb.atlas.connections.current",
"metadata_path": "metadata.csv"
},
"service_checks": {
"metadata_path": "assets/service_checks.json"
}
},
"monitors": {
"[MongoDB Atlas] CPU usage is higher than average on host: {{host.name}}": "assets/monitors/high_cpu.json",
"[MongoDB Atlas] Memory usage is higher than average on host: {{host.name}}": "assets/monitors/memory.json",
"[MongoDB Atlas] Efficiency of queries is degrading": "assets/monitors/query_efficiency.json",
"[MongoDB Atlas] Read Latency is higher than average for host: {{host.name}}": "assets/monitors/read_latency.json",
"[MongoDB Atlas] Write Latency is higher than average for host: {{host.name}}": "assets/monitors/write_latency.json"
}
},
"author": {
"support_email": "[email protected]",
"name": "Datadog",
"homepage": "https://www.datadoghq.com",
"sales_email": "[email protected]"
},
"oauth": {}
}
Loading

0 comments on commit f42e594

Please sign in to comment.