This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.6.7. 사용자 정의 Alertmanager 설정 적용
openshift-monitoring
프로젝트 내에서 alertmanager-main
시크릿을 편집하여 기본 Alertmanager 설정을 덮어쓸 수 있습니다.
사전 요구 사항
-
cluster-admin
역할의 사용자로 클러스터에 액세스할 수 있어야 합니다.
절차
CLI에서 Alertmanager 설정을 변경하려면 다음을 수행합니다.
현재 활성화된 Alertmanager 구성을 파일
alertmanager.yaml
로 출력합니다.oc -n openshift-monitoring get secret alertmanager-main --template='{{ index .data "alertmanager.yaml" }}' | base64 --decode > alertmanager.yaml
$ oc -n openshift-monitoring get secret alertmanager-main --template='{{ index .data "alertmanager.yaml" }}' | base64 --decode > alertmanager.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow alertmanager.yaml
에서 설정을 편집합니다.Copy to Clipboard Copied! Toggle word wrap Toggle overflow 참고일치자
키 이름을 사용하여 노드와 일치하도록 경고가 충족해야 하는 일치 항목을 나타냅니다. 더 이상 사용되지 않고 향후 릴리스에서 제거될 예정인match
또는match_re
키 이름을 사용하지 마십시오.또한 억제 규칙을 정의하는 경우
target_matchers
키 이름을 사용하여 대상 일치 항목과source_matchers
키 이름을 지정하여 소스 일치 항목을 나타냅니다. target_match ,target_match
_resource_match
또는source_match_re
키 이름을 사용하지 마십시오. 이 이름은 더 이상 사용되지 않고 향후 릴리스에서 제거될 예정입니다.다음 Alertmanager 설정 예제에서는 PagerDuty를 경고 수신자로 구성합니다.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 이 설정을 사용하면
example-app
서비스에서 실행되는critical
심각도 경고가team-frontend-page
수신자를 사용하여 전송됩니다. 일반적으로 이러한 유형의 경고는 개인 또는 문제 대응팀으로 호출됩니다.파일에 새 설정을 적용합니다.
oc -n openshift-monitoring create secret generic alertmanager-main --from-file=alertmanager.yaml --dry-run=client -o=yaml | oc -n openshift-monitoring replace secret --filename=-
$ oc -n openshift-monitoring create secret generic alertmanager-main --from-file=alertmanager.yaml --dry-run=client -o=yaml | oc -n openshift-monitoring replace secret --filename=-
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
OpenShift Container Platform 웹 콘솔에서 Alertmanager 설정을 변경하려면 다음을 수행합니다.
-
웹 콘솔의 관리 → 클러스터 설정
구성 Alertmanager YAML 페이지로 이동합니다. - YAML 설정 파일을 수정합니다.
- 저장을 선택합니다.