From c94bedc359963b3a85eb28e940b1d86f84a4a8e6 Mon Sep 17 00:00:00 2001 From: James Buchanan Date: Tue, 9 Jul 2024 13:12:06 +0100 Subject: [PATCH] Update readme.md --- readme.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index f32203f..254a96d 100644 --- a/readme.md +++ b/readme.md @@ -63,4 +63,17 @@ The application comes with a built in dashboard. Set up alerts as you require. ![dashboard-example](dashboard.png) ## Getting started (Copy and Paste) -Simply copy and paste the [`copy-paste-example.js`](./copy-paste-example.js) into a Scripted API synthetic monitor. You will need to provide an ingest API key (prefereably via a secure credential) and define your getTargets() function. Refer to the [example scripts](./terraform/targetdata/) for configuration ideas. \ No newline at end of file +Simply copy and paste the [`copy-paste-example.js`](./copy-paste-example.js) into a Scripted API synthetic monitor. You will need to provide an ingest API key (prefereably via a secure credential) and define your getTargets() function. Refer to the [example scripts](./terraform/targetdata/) for configuration ideas. + + +## Alerting +You may wish to be alerted if your certificates are about to expire. The script will assert a failure if the number of days remaining for any target is below that configured by the WARNING or CRITICAL thresholds specified in the script. + +## Exploring the data +If you deployed using terraform you will find a dashbaord that lets you explore the data easily. If not you may explore the data manually using NRQL. The following data is available: + +**Synthetic Check Data** +The summary information about each run of the script is stored as custom attributes against the SyntheticCheck event type. This includes the total number of critical and warning errors amongths other useful meta data. You can query this for example: `SELECT latest(custom.criticalErrors), latest(custom.warningErrors) from SyntheticCheck where monitorName = 'your-monitor-name' + +**Target Data** +Data about each target is recorded as a metric in the Metric event type called `{NAMESPACE}.days`. The name of the metric varies depending on the value set for `NAMESPACE` for which the default is `SSLCHKR`. The data includes dimensional meta attributes for each target including issuer and expir date. You can query the data as follows: `SELECT getField(SSLCHKR.days, 'latest') as 'Days Left', * from Metric where tool='SSLCHKR'`