Skip to content

Commit ea2a0c7

Browse files
DOCSP-43340 Monitoring and Alerts doc (#16)
* DOCSP-43340 Monitoring and Alerts doc * DOCSP-43340 updates for SS' feedback * Update source/includes/examples/cli-example-metrics-disk.rst Co-authored-by: Filipe Constantinov Menezes <[email protected]> * DOCSP-43340 updates for FM's feedback * DOCSP-43340 updates for EA's feedback * DOCSP-43340 updates for EA's feedback --------- Co-authored-by: Filipe Constantinov Menezes <[email protected]>
1 parent 16b37f8 commit ea2a0c7

17 files changed

+785
-12
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.. code-block::
2+
:copyable: true
3+
4+
atlas alerts settings create \
5+
--enabled \
6+
--event "OUTSIDE_METRIC_THRESHOLD" \
7+
--metricName CONNECTIONS \
8+
--metricOperator LESS_THAN \
9+
--metricThreshold 1 \
10+
--metricUnits RAW \
11+
--notificationType GROUP \
12+
--notificationRole "GROUP_DATA_ACCESS_READ_ONLY","GROUP_CLUSTER_MANAGER","GROUP_DATA_ACCESS_ADMIN" \
13+
--notificationEmailEnabled \
14+
--notificationEmailAddress "[email protected]" \
15+
--notificationIntervalMin 5 \
16+
--projectId 6698000acf48197e089e4085
17+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.. code-block::
2+
:copyable: true
3+
4+
atlas alerts settings create \
5+
--enabled \
6+
--event "NO_PRIMARY" \
7+
--matcherFieldName CLUSTER_NAME \
8+
--matcherOperator EQUALS \
9+
--matcherValue ftsTest \
10+
--notificationType EMAIL \
11+
--notificationEmailEnabled \
12+
--notificationEmailAddress "[email protected]" \
13+
--notificationIntervalMin 5 \
14+
--projectId 6698000acf48197e089e4085
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. code-block::
2+
:copyable: true
3+
4+
atlas logs download atlas-lnmtkm-shard-00-00.ajlj3.mongodb.net mongodb.gz --projectId 56fd11f25f23b33ef4c2a331
5+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. code-block::
2+
:copyable: true
3+
4+
atlas metrics disks describe atlas-lnmtkm-shard-00-00.ajlj3.mongodb.net:27017 data \
5+
--granularity P1D \
6+
--period P1D \
7+
--type DISK_PARTITION_SPACE_FREE,DISK_PARTITION_SPACE_USED \
8+
--projectId 6698000acf48197e089e4085 \
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. code-block::
2+
:copyable: true
3+
4+
atlas metrics disks list atlas-lnmtkm-shard-00-00.ajlj3.mongodb.net:27017 --projectId 56fd11f25f23b33ef4c2a331
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. code-block::
2+
:copyable: true
3+
4+
atlas metrics processes atlas-lnmtkm-shard-00-00.ajlj3.mongodb.net:27017 \
5+
--projectId 56fd11f25f23b33ef4c2a331 \
6+
--granularity PT1H \
7+
--period P7D \
8+
--type
9+
CONNECTIONS,OPCOUNTER_DELETE,OPCOUNTER_INSERT,OPCOUNTER_QUERY,OPCOUNTER_UPDATE,TICKETS_AVAILABLE_READS,TICKETS_AVAILABLE_WRITE,CONNECTIONS,QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED,QUERY_TARGETING_SCANNED_PER_RETURNED,SYSTEM_CPU_GUEST,SYSTEM_CPU_IOWAIT,SYSTEM_CPU_IRQ,SYSTEM_CPU_KERNEL,SYSTEM_CPU_NICE,SYSTEM_CPU_SOFTIRQ,SYSTEM_CPU_STEAL,SYSTEM_CPU_USER \
10+
--output json
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. code-block::
2+
:copyable: true
3+
4+
atlas performanceAdvisor slowOperationThreshold enable --projectId 56fd11f25f23b33ef4c2a331
5+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. code-block::
2+
:copyable: true
3+
4+
atlas performanceAdvisor suggestedIndexes list \
5+
--projectId 56fd11f25f23b33ef4c2a331 \
6+
--processName atlas-zqva9t-shard-00-02.2rnul.mongodb.net:27017
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.. code-block::
2+
:copyable: true
3+
4+
resource "mongodbatlas_alert_configuration" "test_alert_notification" {
5+
project_id = var.atlas_project_id
6+
event_type = "NO_PRIMARY"
7+
enabled = true
8+
9+
notification {
10+
type_name = "PROMETHEUS"
11+
integration_id = mongodbatlas_third_party_integration.test_datadog.id # ID of the Atlas Prometheus integration
12+
}
13+
14+
notification {
15+
type_name = "DATADOG"
16+
integration_id = mongodbatlas_third_party_integration.test_prometheus.id # ID of the Atlas Datadog integration
17+
}
18+
19+
matcher {
20+
field_name = "REPLICA_SET_NAME"
21+
operator = "EQUALS"
22+
value = "myReplSet"
23+
}
24+
25+
threshold_config {
26+
operator = "GREATER_THAN"
27+
threshold = 24
28+
units = "HOURS"
29+
}
30+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.. code-block::
2+
:copyable: true
3+
4+
resource "mongodbatlas_alert_configuration" "test" {
5+
project_id = var.atlas_project_id
6+
event_type = "REPLICATION_OPLOG_WINDOW_RUNNING_OUT"
7+
enabled = true
8+
9+
notification {
10+
type_name = "GROUP"
11+
interval_min = 5
12+
delay_min = 0
13+
sms_enabled = false
14+
email_enabled = true
15+
roles = ["GROUP_CLUSTER_MANAGER"]
16+
}
17+
18+
matcher {
19+
field_name = "CLUSTER_NAME"
20+
operator = "EQUALS"
21+
value = "myCluster"
22+
}
23+
24+
threshold_config {
25+
operator = "LESS_THAN"
26+
threshold = 1
27+
units = "HOURS"
28+
}
29+
}

0 commit comments

Comments
 (0)