Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Add tls certs to the "curl" example command for silencing #268

Open
mpursley opened this issue Aug 23, 2018 · 0 comments
Open

Add tls certs to the "curl" example command for silencing #268

mpursley opened this issue Aug 23, 2018 · 0 comments

Comments

@mpursley
Copy link

This line...

d.push("curl " + alertmanagerSilencesAPIUrl(uri));

 d.push("curl " + alertmanagerSilencesAPIUrl(uri));

Produces a curl command like this, which is super handy!

curl https://alertmanager1.internal.net:9093//api/v1/silences
  -X POST --data {
  "matchers": [
    {
      "name": "alertname",
      "value": "SshProbeFailing",
      "isRegex": false
    }
  ],
  "startsAt": "2018-08-23T21:34:50.845Z",
  "endsAt": "2018-08-23T22:34:50.989Z",
  "createdBy": "test_user@test.com",
  "comment": "I'm fixing this..."
}

But, it doesn't include the TLS settings (e.g. from the config file or commandline args). If TLS options are included, it should look more like this...

curl https://alertmanager1.internal.net:9093//api/v1/silences --cert /var/certs/cert.pem --key /var/certs/pkey.pem
  -X POST --data {
  "matchers": [
    {
      "name": "alertname",
      "value": "SshProbeFailing",
      "isRegex": false
    }
  ],
  "startsAt": "2018-08-23T21:34:50.845Z",
  "endsAt": "2018-08-23T22:34:50.989Z",
  "createdBy": "test_user@test.com",
  "comment": "I'm fixing this..."
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant