The Alertmanager will send HTTP POST requests in the following JSON format to the configured endpoint: reference: https://prometheus.io/docs/alerting/latest/configuration/
SO I wrote a webhook API interface, but I can't recive data. <QueryDict: {}> <class 'django.http.request.QueryDict'> [09/Sep/2020 12:41:39] "POST /hook/send HTTP/1.1" 200 2 POST no post data.. alert version: alertmanager, version 0.21.0 Linux version: centos 7.8 Linux 3.10.0-1127.10.1.el7.x86_64 x86_64 Prometheus version: prometheus, version 2.19.2 (branch: HEAD, revision: c448ada63d83002e9c1d2c9f84e09f55a61f0ff7) - Alertmanager configuration file: ``` global: resolve_timeout: 5m route: #group_by: ['instance'] group_wait: 10s group_interval: 1m repeat_interval: 4m receiver: 'webhook' receivers: - name: 'webhook' webhook_configs: - url: 'http://10.100.93.117:8009/hook/send' ``` - Prometheus configuration file: global: evaluation_interval: 15s scrape_interval: 15s scrape_timeout: 10s external_labels: environment: prometheus alerting: alertmanagers: - static_configs: - targets: - 10.100.93.23:9093 rule_files: - /etc/prometheus/rules/*.rules - /etc/prometheus/rules/*.yml scrape_configs: - job_name: prometheus metrics_path: /metrics static_configs: - targets: - prometheus:9090 - job_name: node2 static_configs: - targets: ["10.100.93.117:9100"] params: collect[]: - cpu - meminfo - diskstats - meminfo - diskstats - netdev - filefd - filesystem - job_name: docker static_configs: - targets: ["120.131.2.113:8010"] metric_relabel_configs: - source_labels: [id] regex: '/docker/([a-z0-9]+)' replacement: '$1' target_label: container_id - source_labels: [__name__] separator: ',' regex: "(container_tasks_state|container_memory_failures_total)" #regex: "(container_memory_failures_total)" action: drop - file_sd_configs: - files: - /etc/prometheus/file_sd/node.yml job_name: node - job_name: alertmanager static_configs: - targets: ["10.100.93.23:9093"] -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/74bfb026-a6bb-43e2-bf31-58ee5ee1b9bfn%40googlegroups.com.