Prometheus: Alertmanager Curl로 Silence 요청하는 법

2026. 3. 22. 09:27·🖥️Monitoring/Prometheus

  • 해당 기능: Jenkins 사용해서 shell schedule로 돌림.

먼저, 프로메테우스 — alertmanager 서버 방화벽이 뚫려 있어야 함.

curl -XPOST -H "Content-Type: application/json" \
  -d '{
        "matchers": [
          {
            "name": "instance",
            "value": "서버_IP:9100",
            "isRegex": false
          },
          {
            "name": "job",
            "value": "서버JOB이름",
            "isRegex": false
          }
        ],
        "startsAt": "'$(date -u -d "16:00 tomorrow" +"%Y-%m-%dT%H:%M:%SZ")'",
        "endsAt": "'$(date -u -d "21:00 tomorrow" +"%Y-%m-%dT%H:%M:%SZ")'",
        "createdBy": "Jenkins",
        "comment": "Scheduled silence from Jenkins for SS-API-03"
      }' \
  http://alertmanager서버_IP:9093/api/v2/silences

해당 명령어를 실행하면 alertmanager에 내가 설정한 시간에 Silence가 생김

저작자표시 비영리 변경금지 (새창열림)

'🖥️Monitoring > Prometheus' 카테고리의 다른 글

Prometheus: Node Exporter 설치가이드  (0) 2026.03.22
Prometheus: 설치가이드  (0) 2026.03.22
Prometheus: Blackbox Exporter 사용기  (0) 2026.03.22
Prometheus: alertmanager 오류 대처법  (0) 2026.03.22
Prometheus: Python HTTP 서버와 프로세스 체크  (0) 2026.03.22
'🖥️Monitoring/Prometheus' 카테고리의 다른 글
  • Prometheus: Node Exporter 설치가이드
  • Prometheus: 설치가이드
  • Prometheus: Blackbox Exporter 사용기
  • Prometheus: alertmanager 오류 대처법
Diven
Diven
  • Diven
    Diven
    Diven
  • 전체
    오늘
    어제
    • 분류 전체보기 (110) N
      • ☁️Cloud (21) N
        • AWS (2)
        • Alibaba (14) N
        • OCI (1)
        • AWS: Certified Solution Arc.. (0)
        • AWS: Certificate Advanced N.. (2) N
      • 📊DB (13)
        • MongoDB (8)
        • MariaDB (2)
        • PostgreSQL (2)
        • MySQL (1)
      • 🧑🏽‍💻Dev:Lang (9)
        • C++ (0)
        • GO (1)
        • Python (8)
      • ⚙️DevOps (4)
        • CICD (0)
        • Jenkins (4)
      • 🐳Docker (15)
      • 🪢laC (0)
      • ⚓K8s (7)
      • 🐧Linux (25)
      • 🖥️Monitoring (10)
        • Grafana (1)
        • Prometheus (6)
        • Loki (1)
        • ELK (2)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    NGINX
    linux
    Python
    AWS
    jenkins
    alertmanager
    SSL
    alb
    db
    prometheus
    Alibaba
    centOS7
    k8s
    MySQL
    알리바바 클라우드
    PolarDB
    docker
    mariadb
    mongoDB
    Cloud
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.6
Diven
Prometheus: Alertmanager Curl로 Silence 요청하는 법
상단으로

티스토리툴바