convert to gitea

This commit is contained in:
2025-09-15 13:56:20 +09:00
commit 07eb8d9ca4
17 changed files with 5350 additions and 0 deletions

View File

@ -0,0 +1,16 @@
route:
group_by: ['...']
group_wait: 15s
group_interval: 1m
repeat_interval: 10m
receiver: "resource_alert"
receivers:
- name: "resource_alert"
webhook_configs:
- url: "http://127.0.0.1:2000/resource_alert"
send_resolved: false
templates:
- '/etc/alertmanager/templates/msteams.tmpl'

View File

@ -0,0 +1,53 @@
{{ define "teams.card" }}
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"summary": "{{ .CommonAnnotations.summary }}",
"themeColor": "0078D7",
"title": "🚨 {{ .CommonAnnotations.summary }}",
"sections": [
{{- /* add 함수 대신 .CommonAnnotations를 사용하여 쉼표를 처리하는 안정적인 방식 */ -}}
{{- range .Alerts }}
{
"activityTitle": "{{ .Annotations.description }}",
"facts": [
{
"name": "상태",
"value": "**{{ printf "%.0f" .Annotations.value }}%**"
},
{
"name": "심각도",
"value": "{{ .Labels.severity }}"
},
{
"name": "호스트명",
"value": "{{ .Labels.hostname }}"
},
{
"name": "IP 주소",
"value": "{{ .Labels.ip }}"
},
{
"name": "발생 일시",
"value": "{{ .StartsAt }}"
}
],
"markdown": true
}
{{- if .CommonAnnotations -}},{{- end }}
{{- end }}
],
"potentialAction": [
{
"@type": "OpenUri",
"name": "Grafana에서 보기",
"targets": [
{
"os": "default",
"uri": "{{ .CommonAnnotations.runbook_url }}"
}
]
}
]
}
{{ end }}