Tuesday, October 4, 2022

grafana - create contact point using API

 

curl -X POST --insecure -H "Authorization: Bearer eyJrIjoiMXZtdDM2bzFSUnlMQ0lxUXdyeE1QQXROVGxpZ1gyMTgiLCJuIjoidGVzdCIsImlkIjoxfQ==" -H "Content-Type: application/json" -d '{
  "contactPoints": [
    {
      "orgId": 1,
      "name": "test1",
      "receivers": [
        {
          "uid": "test1",
          "type": "pagerduty",
          "settings": {
            "integrationKey": "3459d06b58fa4303d078effd37bb0ea3",
            "severity": "critical",
            "class": "ping failure",
            "component": "Grafana",
            "group": "app-stack",
            "summary": "{{ `{{ template \"default.message\" . }}` }}"
          }
        }
      ]
    }
  ]
},
  "overwrite": false
}' http://a742c59453e01409bb7ce714088dc22b-507200259.us-east-2.elb.amazonaws.com/api/v1/provisioning/contact-points

No comments:

Post a Comment