Migrating from Nagios to Prometheus
NOV 07, 2019
Migrating from Nagios to Prometheus Runtastic Infrastructure Base - - PowerPoint PPT Presentation
NOV 07, 2019 Migrating from Nagios to Prometheus Runtastic Infrastructure Base Virtualization Core DBs Technologies Linux (Ubuntu) Linux KVM Physical Really a lot open source OpenNebula Hybrid SDN (Cisco) 3600 CPU Cores Big Chef
NOV 07, 2019
2
Linux (Ubuntu) SDN (Cisco) Chef Terraform
Base
Linux KVM OpenNebula 3600 CPU Cores 20 TB Memory 100 TB Storage
Virtualization
Physical Hybrid Big
Core DBs
Really a lot
Technologies
3
4
5
6
8
9
11
12
13
14
15
{ "service": { "name": "prd-sharing-server-001-mongodbexporter", "tags": [ "prometheus", "role:trinidad", "service:sharing", "exporter:mongodb" ], "port": 9216 } }
16
consul_sd_configs:
token: 'ourconsultoken' datacenter: 'lnz' relabel_configs:
regex: .*,prometheus,.* action: keep
target_label: hostname
regex: .*,service:([^,]+),.* replacement: '${1}' target_label: service
17
18
19
metrics_path: /probe params: module: [http_health_monitor] consul_sd_configs:
token: 'ourconsultoken' datacenter: 'lnz' relabel_configs:
regex: .*,healthcheck,.* action: keep
regex: .*,url:([^,]+),.* replacement: '${1}' target_label: __param_target
20
resource "null_resource" "prometheus_silence" { provisioner "local-exec" { command = <<EOF ${var.amtool_path} silence add 'service=~SERVICENAME' \
EOF }
22
23
24
25
26
api_key: "ourapitoken" priority: "{{ range .Alerts }}{{ .Labels.priority }}{{ end }}" message: "{{ range .Alerts }}{{ .Annotations.title }}{{ end }}" description: "{{ range .Alerts }}\n{{ .Annotations.summary }}\n\n{{ if ne .Annotations.dashboard \"\" -}}\nDashboard:\n{{ .Annotations.dashboard }}\n{{- end }}{{ end }}" tags: "{{ range .Alerts }}{{ .Annotations.instance }}{{ end }}"
27
28
expr: max by(instance,service)(probe_success) < 1 for: 1m labels:
priority: "P1" annotations: title: "{{ $labels.service }} DOWN" summary: "HTTP Probe for {{ $labels.service }} FAILED.\nHealth Check URL: {{ $labels.instance }}"
29
expr: max by(hostname, service)(rate(mongodb_mongod_metrics_query_executor_total[30m])) > 500000 for: 1m labels: priority: "P3" annotations: title: "MongoDB - Scanned Objects detected on {{ $labels.service }}" summary: "High value of scanned objects on {{ $labels.hostname }} for service {{ $labels.service }}" dashboard: "https://prd-prometheus.runtastic.com/d/oCziI1Wmk/mongodb"
30
31
32
repeat_interval: 5m group_wait: 10s match: heartbeat: 'true'
webhook_configs:
'https://api.eu.opsgenie.com/v2/heartbeats/prd_prometheus/pi ng' send_resolved: false http_config: basic_auth: password: "opsgenieAPIkey"
34
35
36
runtastic.com
Niko Dominkowitsch
Infrastructure Engineer
niko.dominkowitsch@runtastic.com