Skip to content

Commit 343c5f6

Browse files
authored
Merge pull request #165 from boutetnico/free_monitoring
Add option to configure free monitoring
2 parents fb8c3f1 + 872aaaa commit 343c5f6

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ mongodb_systemlog_path: /var/log/mongodb/{{ mongodb_daemon_name }}.log # Log f
7171
mongodb_operation_profiling_slow_op_threshold_ms: 100
7272
mongodb_operation_profiling_mode: "off"
7373

74+
## cloud options (MongoDB >= 4.0)
75+
mongodb_cloud_monitoring_free_state: "runtime"
76+
7477
## replication Options
7578
mongodb_replication_replset: "" # Enable replication
7679
mongodb_replication_replindexprefetch: "all" # specify index prefetching behavior (if secondary) [none|_id_only|all]

templates/mongod.conf.j2

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ operationProfiling:
7171
slowOpThresholdMs: {{ mongodb_operation_profiling_slow_op_threshold_ms }}
7272
mode: {{ mongodb_operation_profiling_mode }}
7373

74+
{% if mongodb_major_version is version("4.0", ">=") -%}
75+
cloud:
76+
monitoring:
77+
free:
78+
state: {{ mongodb_cloud_monitoring_free_state }}
79+
{% endif -%}
80+
7481
{% if mongodb_set_parameters -%}
7582
setParameter:
7683
{% for key, value in mongodb_set_parameters.items() -%}

0 commit comments

Comments
 (0)