added repo
This commit is contained in:
@@ -0,0 +1,231 @@
|
||||
global:
|
||||
|
||||
route:
|
||||
repeat_interval: 60m
|
||||
receiver: alerts
|
||||
group_by: ['groupId', 'name', 'envoy_cluster_name', 'namespace', 'pod', 'service', 'instance', 'subnet_id', 'cluster']
|
||||
routes:
|
||||
- match:
|
||||
team: sre
|
||||
receiver: 'eks-common-alerts'
|
||||
|
||||
- match:
|
||||
alertgroup: farmiso_gke
|
||||
receiver: 'farmiso-devops-alerts'
|
||||
|
||||
|
||||
- match_re:
|
||||
job: .*(kube-state-metrics-).*
|
||||
receiver: 'eks-common-alerts'
|
||||
|
||||
|
||||
- match:
|
||||
alerts: farmiso-devops-alerts
|
||||
receiver: 'farmiso-devops-alerts'
|
||||
|
||||
|
||||
- match_re:
|
||||
dbinstance_identifier: "(bac-p-farmiso|bac-p-farmiso-slave-01)"
|
||||
receiver: 'farmiso-devops-alerts'
|
||||
|
||||
|
||||
- match_re:
|
||||
cache_cluster_id: .*(front-p-farmiso).*
|
||||
receiver: 'farmiso-devops-alerts'
|
||||
|
||||
|
||||
- match_re:
|
||||
target_group: .*(targetgroup/bac-p-edge-proxy-farmiso-ext-tg).*
|
||||
receiver: 'farmiso-devops-alerts'
|
||||
|
||||
|
||||
receivers:
|
||||
- name: 'alerts'
|
||||
slack_configs:
|
||||
- api_url: "https://hooks.slack.com/services/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"
|
||||
channel: "#alerts"
|
||||
send_resolved: true
|
||||
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
|
||||
text: >-
|
||||
{{ range .Alerts }}
|
||||
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
|
||||
*Status:* `{{ .Status | toUpper }}`
|
||||
*Details:*
|
||||
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
|
||||
{{ end }}
|
||||
*Description:* {{ .Annotations.description }}
|
||||
{{ end }}
|
||||
pagerduty_configs:
|
||||
- url: https://events.pagerduty.com/v2/enqueue
|
||||
routing_key: R011TWRG2LB13YBEOPNKJ7EI11LQXYGU
|
||||
send_resolved: true
|
||||
client: AlertManager
|
||||
description: '{{ (index .Alerts 0).Labels.severity | toUpper }} - {{ (index .Alerts 0).Labels.env | toUpper }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env | toUpper }}{{ end }} - {{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }} - {{ (index .Alerts 0).Labels.alertname }} - {{ (index .Alerts 0).Labels.bu }}{{ if eq (index .Alerts 0).Labels.bu "" }}{{ (index .Alerts 0).Labels.label_bu }}{{ end }} - {{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }} - {{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.namespace }}{{ end }}'
|
||||
severity: '{{ (index .Alerts 0).Labels.severity }}'
|
||||
class: '{{ (index .Alerts 0).Labels.alertname }}'
|
||||
component: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
|
||||
group: '{{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }}'
|
||||
details:
|
||||
alert_name: '{{ (index .Alerts 0).Labels.alertname }}'
|
||||
description: '{{ (index .Alerts 0).Annotations.description }}'
|
||||
meesho_env: '{{ (index .Alerts 0).Labels.env }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env }}{{ end }}'
|
||||
meesho_bu: '{{ (index .Alerts 0).Labels.bu }}{{ if eq (index .Alerts 0).Labels.bu "" }}{{ (index .Alerts 0).Labels.label_bu }}{{ end }}'
|
||||
meesho_team: '{{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }}'
|
||||
meesho_service: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
|
||||
meesho_type: '{{ (index .Alerts 0).Labels.type }}{{ if eq (index .Alerts 0).Labels.type "" }}{{ (index .Alerts 0).Labels.label_type }}{{ end }}'
|
||||
meesho_priority: '{{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }}'
|
||||
meesho_alert_route: '{{ (index .Alerts 0).Labels.alerts }}'
|
||||
meesho_job: '{{ (index .Alerts 0).Labels.job }}'
|
||||
meesho_private_ip: '{{ (index .Alerts 0).Labels.private_ip }}'
|
||||
meesho_instance: '{{ (index .Alerts 0).Labels.instance }}'
|
||||
meesho_z_all: |
|
||||
{{ range (index .Alerts 0).Labels.SortedPairs }}
|
||||
• {{ .Name }}: {{ .Value }}
|
||||
{{ end }}
|
||||
firing: ''
|
||||
|
||||
- name: 'farmiso-devops-alerts'
|
||||
slack_configs:
|
||||
- api_url: "https://hooks.slack.com/services/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"
|
||||
channel: "#farmiso-devops-alerts"
|
||||
send_resolved: true
|
||||
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
|
||||
text: >-
|
||||
{{ range .Alerts }}
|
||||
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
|
||||
*Status:* `{{ .Status | toUpper }}`
|
||||
*Details:*
|
||||
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
|
||||
{{ end }}
|
||||
*Description:* {{ .Annotations.description }}
|
||||
{{ end }}
|
||||
- api_url: "https://hooks.slack.com/services/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"
|
||||
channel: "#alerts"
|
||||
send_resolved: true
|
||||
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
|
||||
text: >-
|
||||
{{ range .Alerts }}
|
||||
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
|
||||
*Status:* `{{ .Status | toUpper }}`
|
||||
*Details:*
|
||||
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
|
||||
{{ end }}
|
||||
*Description:* {{ .Annotations.description }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
- name: 'growth-infra-engagement-infra-transact-infra-farmiso-devops-common-alerts'
|
||||
slack_configs:
|
||||
- api_url: "https://hooks.slack.com/services/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"
|
||||
channel: "#growth-infra-alerts"
|
||||
send_resolved: true
|
||||
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
|
||||
text: >-
|
||||
{{ range .Alerts }}
|
||||
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
|
||||
*Status:* `{{ .Status | toUpper }}`
|
||||
*Details:*
|
||||
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
|
||||
{{ end }}
|
||||
*Description:* {{ .Annotations.description }}
|
||||
{{ end }}
|
||||
- api_url: "https://hooks.slack.com/services/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"
|
||||
channel: "#transact-infra-alerts"
|
||||
send_resolved: true
|
||||
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
|
||||
text: >-
|
||||
{{ range .Alerts }}
|
||||
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
|
||||
*Status:* `{{ .Status | toUpper }}`
|
||||
*Details:*
|
||||
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
|
||||
{{ end }}
|
||||
*Description:* {{ .Annotations.description }}
|
||||
{{ end }}
|
||||
- api_url: "https://hooks.slack.com/services/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"
|
||||
channel: "#engagement-infra-alerts"
|
||||
send_resolved: true
|
||||
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
|
||||
text: >-
|
||||
{{ range .Alerts }}
|
||||
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
|
||||
*Status:* `{{ .Status | toUpper }}`
|
||||
*Details:*
|
||||
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
|
||||
{{ end }}
|
||||
*Description:* {{ .Annotations.description }}
|
||||
{{ end }}
|
||||
- api_url: "https://hooks.slack.com/services/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"
|
||||
channel: "#farmiso-devops-alerts"
|
||||
send_resolved: true
|
||||
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
|
||||
text: >-
|
||||
{{ range .Alerts }}
|
||||
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
|
||||
*Status:* `{{ .Status | toUpper }}`
|
||||
*Details:*
|
||||
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
|
||||
{{ end }}
|
||||
*Description:* {{ .Annotations.description }}
|
||||
{{ end }}
|
||||
- api_url: "https://hooks.slack.com/services/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"
|
||||
channel: "#alerts"
|
||||
send_resolved: true
|
||||
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
|
||||
text: >-
|
||||
{{ range .Alerts }}
|
||||
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
|
||||
*Status:* `{{ .Status | toUpper }}`
|
||||
*Details:*
|
||||
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
|
||||
{{ end }}
|
||||
*Description:* {{ .Annotations.description }}
|
||||
{{ end }}
|
||||
|
||||
- name: 'eks-common-alerts'
|
||||
slack_configs:
|
||||
- api_url: "https://hooks.slack.com/services/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"
|
||||
channel: "#eks-common-alerts"
|
||||
send_resolved: true
|
||||
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
|
||||
text: >-
|
||||
{{ range .Alerts }}
|
||||
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
|
||||
*Status:* `{{ .Status | toUpper }}`
|
||||
*Details:*
|
||||
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
|
||||
{{ end }}
|
||||
*Description:* {{ .Annotations.description }}
|
||||
{{ end }}
|
||||
pagerduty_configs:
|
||||
- url: https://events.pagerduty.com/v2/enqueue
|
||||
routing_key: R011TWRG2LB13YBEOPNKJ7EI11LQXYGU
|
||||
send_resolved: true
|
||||
client: AlertManager
|
||||
description: '{{ (index .Alerts 0).Labels.severity | toUpper }} - {{ (index .Alerts 0).Labels.env | toUpper }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env | toUpper }}{{ end }} - {{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }} - {{ (index .Alerts 0).Labels.alertname }} - {{ (index .Alerts 0).Labels.bu }}{{ if eq (index .Alerts 0).Labels.bu "" }}{{ (index .Alerts 0).Labels.label_bu }}{{ end }} - {{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }} - {{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.namespace }}{{ end }}'
|
||||
severity: '{{ (index .Alerts 0).Labels.severity }}'
|
||||
class: '{{ (index .Alerts 0).Labels.alertname }}'
|
||||
component: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
|
||||
group: '{{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }}'
|
||||
details:
|
||||
alert_name: '{{ (index .Alerts 0).Labels.alertname }}'
|
||||
description: '{{ (index .Alerts 0).Annotations.description }}'
|
||||
meesho_env: '{{ (index .Alerts 0).Labels.env }}{{ if eq (index .Alerts 0).Labels.env "" }}{{ (index .Alerts 0).Labels.label_env }}{{ end }}'
|
||||
meesho_bu: '{{ (index .Alerts 0).Labels.bu }}{{ if eq (index .Alerts 0).Labels.bu "" }}{{ (index .Alerts 0).Labels.label_bu }}{{ end }}'
|
||||
meesho_team: '{{ (index .Alerts 0).Labels.team }}{{ if eq (index .Alerts 0).Labels.team "" }}{{ (index .Alerts 0).Labels.label_team }}{{ end }}'
|
||||
meesho_service: '{{ (index .Alerts 0).Labels.service }}{{ if eq (index .Alerts 0).Labels.service "" }}{{ (index .Alerts 0).Labels.label_service }}{{ end }}'
|
||||
meesho_type: '{{ (index .Alerts 0).Labels.type }}{{ if eq (index .Alerts 0).Labels.type "" }}{{ (index .Alerts 0).Labels.label_type }}{{ end }}'
|
||||
meesho_priority: '{{ (index .Alerts 0).Labels.priority }}{{ if eq (index .Alerts 0).Labels.priority "" }}{{ (index .Alerts 0).Labels.label_priority }}{{ end }}'
|
||||
meesho_alert_route: '{{ (index .Alerts 0).Labels.alerts }}'
|
||||
meesho_job: '{{ (index .Alerts 0).Labels.job }}'
|
||||
meesho_private_ip: '{{ (index .Alerts 0).Labels.private_ip }}'
|
||||
meesho_instance: '{{ (index .Alerts 0).Labels.instance }}'
|
||||
meesho_z_all: |
|
||||
{{ range (index .Alerts 0).Labels.SortedPairs }}
|
||||
• {{ .Name }}: {{ .Value }}
|
||||
{{ end }}
|
||||
firing: ''
|
||||
|
||||
|
||||
templates:
|
||||
- '/etc/alertmanager/template/gchat.tmpl'
|
||||
Reference in New Issue
Block a user