You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`allowUnauthorized`: Optional - if `true` then cert will not be validated against CA (useful for self-signed)
37
42
38
43
39
-
## Getting started (terraform)
44
+
## Getting started (Terraform)
40
45
41
46
1. Checkout the repo
42
47
2. Copy `runtf.sh.sample` to `runtf.sh` and add your API keys
@@ -49,11 +54,13 @@ The targets to test are provided by calling the function getTargets(). You can p
49
54
* Target Data Sources - `./terraform/main.tf`
50
55
* Thresholds and timeouts - `./terraform/modules/sslchecker/modules/sslminion/src/synthetic.js` (built)
51
56
57
+
The boilerplate example references [static_small.js](./terraform/targetdata/static_small.js) from `main.tf` which is a small java script funciton that defines the SSL (TLS) domains to test. There are some other exmaples here of how to specify these. You can event query an API to drive the configuration as demonstrated in [api-driven.js](./terraform/targetdata/api-driven.js).
58
+
52
59
### Dashboard
53
60
54
61
The application comes with a built in dashboard. Set up alerts as you require.
55
62
56
63

57
64
58
65
## Getting started (Copy and Paste)
59
-
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.
66
+
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.
rejectUnauthorized: target.allowUnauthorized===undefined ? true : target.allowUnauthorized===true ? false : true// allow domain's to be self cert: the server certificate is verified against the list of supplied CAs. An 'error' event is emitted if verification fails; err.code contains the OpenSSL error code. Default: false, will be checked). https://nodejs.org/docs/latest/api/tls.html#tlssocketrenegotiateoptions-callback
85
85
}
86
86
promises.push(getSSLExpiration(connectionConfig,
87
87
(certData)=>{
@@ -110,7 +110,7 @@ async function run() {
110
110
(error)=>{
111
111
target.error=error
112
112
target.state="ERROR"
113
-
scriptErrors.push(`Target '${target.name}' (${target.url}failed cert info lookup)`)
113
+
scriptErrors.push(`Target '${target.name}' failed cert info lookup: ${target.error}`)
console.log("TIP: Some domains caused a socket error. You may need to consider ignoring authorization, e.g. for self signed certs. This can be configured by providing 'allowUnauthorized:true' option for the target.")
199
+
}
198
200
assertMessage.push("SSL checker script error or some targets are in ERROR state")
0 commit comments