7.3. Alertmanager Webhook 추가


기존 Alertmanager 구성에 새 Webhook를 추가하여 스토리지 클러스터 상태에 대한 실시간 경고를 수신할 수 있습니다. 들어오는 웹 후크를 활성화하여 타사 애플리케이션에 비동기 메시지를 허용해야 합니다.

예를 들어 Red Hat Ceph Storage 클러스터에서 OSD가 다운된 경우 Google 채팅에서 알림을 전송하도록 Alertmanager를 구성할 수 있습니다.

사전 요구 사항

  • 모니터링 스택 구성 요소가 활성화된 Red Hat Ceph Storage 클러스터.
  • 수신 타사 애플리케이션에 구성된 들어오는 Webhook입니다.

절차

  1. cephadm 쉘에 로그인합니다.

    예제

    [root@host01 ~]# cephadm shell
    Copy to Clipboard

  2. 알림에 Webhook를 사용하도록 Alertmanager를 구성합니다.

    구문

    service_type: alertmanager
    spec:
      user_data:
        default_webhook_urls:
        - "_URLS_"
    Copy to Clipboard

    default_webhook_urls 는 기본 수신자의 webhook_configs 구성에 추가된 추가 URL 목록입니다.

    예제

    service_type: alertmanager
    spec:
      user_data:
        webhook_configs:
        - url: 'http:127.0.0.10:8080'
    Copy to Clipboard

  3. 업데이트 Alertmanager 설정:

    예제

    [ceph: root@host01 /]#  ceph orch reconfig alertmanager
    Copy to Clipboard

검증

  • Alertmanager에서 Gchat까지의 알림 예:

    예제

    using: https://chat.googleapis.com/v1/spaces/(xx- space identifyer -xx)/messages
    posting: {'status': 'resolved', 'labels': {'alertname': 'PrometheusTargetMissing', 'instance': 'postgres-exporter.host03.chest
    response: 200
    response: {
    "name": "spaces/(xx- space identifyer -xx)/messages/3PYDBOsIofE.3PYDBOsIofE",
    "sender": {
    "name": "users/114022495153014004089",
    "displayName": "monitoring",
    "avatarUrl": "",
    "email": "",
    "domainId": "",
    "type": "BOT",
    "isAnonymous": false,
    "caaEnabled": false
    },
    "text": "Prometheus target missing (instance postgres-exporter.cluster.local:9187)\n\nA Prometheus target has disappeared. An e
    "cards": [],
    "annotations": [],
    "thread": {
    "name": "spaces/(xx- space identifyer -xx)/threads/3PYDBOsIofE"
    },
    "space": {
    "name": "spaces/(xx- space identifyer -xx)",
    "type": "ROOM",
    "singleUserBotDm": false,
    "threaded": false,
    "displayName": "_privmon",
    "legacyGroupChat": false
    },
    "fallbackText": "",
    "argumentText": "Prometheus target missing (instance postgres-exporter.cluster.local:9187)\n\nA Prometheus target has disappea
    "attachment": [],
    "createTime": "2022-06-06T06:17:33.805375Z",
    "lastUpdateTime": "2022-06-06T06:17:33.805375Z"
    Copy to Clipboard

맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat, Inc.