prometheus / alertmanager

Prometheus Alertmanager
https://prometheus.io
Apache License 2.0
6.66k stars 2.16k forks source link

webhook custom style #3110

Open xuchongchong opened 2 years ago

xuchongchong commented 2 years ago

Is it possible to make alertmanager webhook like this https://github.com/opsgenie/kubernetes-event-exporter#webhookshttp https://github.com/opsgenie/kubernetes-event-exporter/blob/master/config.example.yaml

  - name: "pipe"
    webhook:
      endpoint: "http://localhost:3000"
      headers:
        X-API-KEY: "123-456-OPSGENIE-789-ABC"
        User-Agent: "kube-event-exporter 1.0"
      streamName: "applicationMetric"
      layout:
        endpoint: "localhost2"
        eventType: "kube-event"
        createdAt: "{{ .GetTimestampMs }}"
        details:
          message: "{{ .Message }}"
          reason: "{{ .Reason }}"
          tip: "{{ .Type }}"
          count: "{{ .Count }}"
          kind: "{{ .InvolvedObject.Kind }}"
          name: "{{ .InvolvedObject.Name }}"
          namespace: "{{ .Namespace }}"
          component: "{{ .Source.Component }}"
          host: "{{ .Source.Host }}"
          labels: "{{ toJson .InvolvedObject.Labels}}"
xuchongchong commented 2 years ago

Or any other opensource alert manage can implement ?

simonpasquier commented 1 year ago

Your request looks similar to https://github.com/prometheus/alertmanager/issues/1496?