Skip to content
This repository was archived by the owner on Jul 22, 2020. It is now read-only.
This repository was 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

Description

@mpursley

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..."
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions