Skip to content

[Uptime] Add certificate expiration dates to uptime GQL schema - #43352

Merged
justinkambic merged 3 commits into
elastic:masterfrom
justinkambic:uptime_cert-expiry
Aug 30, 2019
Merged

justinkambic merged 3 commits into
elastic:masterfrom
justinkambic:uptime_cert-expiry

Conversation

@justinkambic

Copy link
Copy Markdown
Contributor

Summary

The purpose of this patch is to add TLS certificate expiration date/time to our GraphQL schema.

We can now get this information in a format like:

{
  "state": {
    "monitor": {
      "name": "elastic-website"
    },
    "tls": {
      "certificate_not_valid_after": [
        "2020-07-16T03:15:39.000Z"
      ]
    }
  }
}

Testing this PR

  1. Set up Heartbeat/Kibana/ES (ping me if further instruction needed)
  2. Configure a monitor for a TLS-enabled website (you can use Elastic's website):
- type: http
  schedule: '@every 10s'
  urls: ['https://www.elastic.co/']
  name: 'elastic-website'
  1. Use GraphiQL or some other GQL querying tool to query our endpoint like:
{
  getMonitorStates(dateRangeStart: "now-15m", dateRangeEnd: "now") {
    summaries {
      state {
        monitor {
          name
        }
        tls {
          certificate_not_valid_after
        }
      }
    }
  }
}

@justinkambic justinkambic added release_note:enhancement v8.0.0 Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.4.0 labels Aug 15, 2019
@justinkambic justinkambic self-assigned this Aug 15, 2019
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/uptime

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@shahzad31 shahzad31 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@andrewvc andrewvc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This generally looks good, but is there a reason the indentation on the scripted metric query was changed? Did the formatter do that?

@andrewvc andrewvc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@justinkambic
justinkambic merged commit 890fb67 into elastic:master Aug 30, 2019
justinkambic added a commit to justinkambic/kibana that referenced this pull request Sep 10, 2019
…ic#43352)

* Add certificate expiration date to uptime GQL schema.

* Update test fixture/snapshot for broken unit test.
justinkambic added a commit that referenced this pull request Sep 12, 2019
… (#45221)

* Add certificate expiration date to uptime GQL schema.

* Update test fixture/snapshot for broken unit test.
@justinkambic

Copy link
Copy Markdown
Contributor Author

Backported to:
7.x/7.5.0 e14a46b
#45221

@justinkambic
justinkambic deleted the uptime_cert-expiry branch September 12, 2019 18:13
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
…ic#43352)

* Add certificate expiration date to uptime GQL schema.

* Update test fixture/snapshot for broken unit test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:enhancement Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.5.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants