Merge "Fix Python version for Travis CI tests"
diff --git a/metadata/service/support.yml b/metadata/service/support.yml
index 36be45d..6e2a48e 100644
--- a/metadata/service/support.yml
+++ b/metadata/service/support.yml
@@ -8,4 +8,8 @@
sensu:
enabled: true
sphinx:
- enabled: false
\ No newline at end of file
+ enabled: false
+ prometheus:
+ enabled: true
+ telegraf:
+ enabled: true
\ No newline at end of file
diff --git a/mongodb/meta/prometheus.yml b/mongodb/meta/prometheus.yml
new file mode 100644
index 0000000..6da2924
--- /dev/null
+++ b/mongodb/meta/prometheus.yml
@@ -0,0 +1,37 @@
+{%- from "mongodb/map.jinja" import server with context %}
+{%- if server.get('enabled', False) %}
+{%- raw %}
+server:
+ alert:
+ MongoDBServiceDown:
+ if: >-
+ mongodb_up == 0
+ for: 1m
+ labels:
+ severity: minor
+ service: mongodb
+ annotations:
+ summary: "MongoDB service is down"
+ description: "The MongoDB service on the {{ $labels.host }} node is down for 1 minute."
+ MongoDBServiceOutage:
+ if: >-
+ count(mongodb_up == 0) == count(mongodb_up)
+ for: 1m
+ labels:
+ severity: critical
+ service: mongodb
+ annotations:
+ summary: "MongoDB service outage"
+ description: "All MongoDB services are down for 1 minute."
+ MongoDBNoPrimaryMember:
+ if: >-
+ absent({__name__=~"mongodb.*",state="PRIMARY"})
+ for: 1m
+ labels:
+ severity: critical
+ service: mongodb
+ annotations:
+ summary: "MongoDB cluster has no primary member"
+ description: "MongoDB cluster has no primary member for 1 minute."
+{%- endraw %}
+{%- endif %}
\ No newline at end of file
diff --git a/mongodb/meta/telegraf.yml b/mongodb/meta/telegraf.yml
new file mode 100644
index 0000000..ea60745
--- /dev/null
+++ b/mongodb/meta/telegraf.yml
@@ -0,0 +1,6 @@
+{%- from "mongodb/map.jinja" import server with context %}
+{%- if server.get('enabled', False) %}
+agent:
+ input:
+ mongodb:
+{%- endif %}