Quellcode durchsuchen

Enable telegraf and prometheus for mongodb

Change-Id: I1c7ba61e72cb733f2d1f061faa70edd62afed184
PROD-Related: PROD-21195
master
Dmitry Kalashnik vor 6 Jahren
Ursprung
Commit
c836872022
3 geänderte Dateien mit 48 neuen und 1 gelöschten Zeilen
  1. +5
    -1
      metadata/service/support.yml
  2. +37
    -0
      mongodb/meta/prometheus.yml
  3. +6
    -0
      mongodb/meta/telegraf.yml

+ 5
- 1
metadata/service/support.yml Datei anzeigen

@@ -8,4 +8,8 @@ parameters:
sensu:
enabled: true
sphinx:
enabled: false
enabled: false
prometheus:
enabled: true
telegraf:
enabled: true

+ 37
- 0
mongodb/meta/prometheus.yml Datei anzeigen

@@ -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 %}

+ 6
- 0
mongodb/meta/telegraf.yml Datei anzeigen

@@ -0,0 +1,6 @@
{%- from "mongodb/map.jinja" import server with context %}
{%- if server.get('enabled', False) %}
agent:
input:
mongodb:
{%- endif %}

Laden…
Abbrechen
Speichern