0

How to make 2 events from one body

I got Body form Prometheus

{"receiver":"xmatters-receiver","status":"firing","alerts":[{"status":"firing","labels":{"alertname":"BOSHJobEphemeralDiskFull","bosh_deployment":"concourse","bosh_job_index":"0","bosh_job_name":"worker-pcf-backup","bosh_name":"gp2-dev-infraservices","env":"dev-gp2","environment":"dev-gp2","service":"bosh-job","severity":"critical"},"annotations":{"description":"BOSH Job `dev-gp2/gp2-dev-infraservices/concourse/worker-pcf-backup/0` has used more than 80% of its ephemeral disk for 30ms: 90%","summary":"BOSH Job `dev-gp2/gp2-dev-infraservices/concourse/worker-pcf-backup/0` is running out of ephemeral disk"},"startsAt":"2018-11-16T09:02:16.538555134Z","endsAt":"2018-11-17T09:31:16.538555134Z","generatorURL":"https://prometheus-dev.gp2.axadmin.net/graph?g0.expr=avg+by%28environment%2C+bosh_name%2C+bosh_deployment%2C+bosh_job_name%2C+bosh_job_index%29+%28bosh_job_ephemeral_disk_percent%7Bbosh_deployment%21%3D%22bosh-health-check%22%2Cbosh_job_name%21~%22%5Ecompilation.%2A%22%7D%29+%3E+80\u0026g0.tab=1"},{"status":"firing","labels":{"alertname":"BOSHJobEphemeralDiskFull","bosh_deployment":"shield-v8","bosh_job_index":"0","bosh_job_name":"dedicated_backupnode","bosh_name":"gp2-dev-infraservices","env":"dev-gp2","environment":"dev-gp2","service":"bosh-job","severity":"critical"},"annotations":{"description":"BOSH Job `dev-gp2/gp2-dev-infraservices/shield-v8/dedicated_backupnode/0` has used more than 80% of its ephemeral disk for 30ms: 96%","summary":"BOSH Job `dev-gp2/gp2-dev-infraservices/shield-v8/dedicated_backupnode/0` is running out of ephemeral disk"},"startsAt":"2018-11-15T23:02:16.538555134Z","endsAt":"2018-11-17T09:31:16.538555134Z","generatorURL":"https://prometheus-dev.gp2.axadmin.net/graph?g0.expr=avg+by%28environment%2C+bosh_name%2C+bosh_deployment%2C+bosh_job_name%2C+bosh_job_index%29+%28bosh_job_ephemeral_disk_percent%7Bbosh_deployment%21%3D%22bosh-health-check%22%2Cbosh_job_name%21~%22%5Ecompilation.%2A%22%7D%29+%3E+80\u0026g0.tab=1"}],"groupLabels":{},"commonLabels":{"alertname":"BOSHJobEphemeralDiskFull","bosh_job_index":"0","bosh_name":"gp2-dev-infraservices","env":"dev-gp2","environment":"dev-gp2","service":"bosh-job","severity":"critical"},"commonAnnotations":{},"externalURL":"https://alertmanager-dev.gp2.axadmin.net","version":"4","groupKey":"{}/{alertname=~\"^(?:BOSHJobEphemeralDiskFull)$\"}:{}"}

and Xmatters create only one Event for it with:

Prometheus Alert: 2 firing for
[FIRING:2] BOSHJobEphemeralDiskFull bosh-job(alertname = BOSHJobEphemeralDiskFull bosh_deployment = concourse bosh_job_index = 0 bosh_job_name = worker-pcf-backup bosh_name = gp2-dev-infraservices env = dev-gp2 environment = dev-gp2 service = bosh-job severity = critical )

How to make it a separate events for each Alert?

3 comments

Please sign in to leave a comment.