Skip to content

Commit 99795c9

Browse files
committed
update docs
1 parent 46964a9 commit 99795c9

File tree

5 files changed

+39
-15
lines changed

5 files changed

+39
-15
lines changed

docs/configuration.md

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,6 @@ This tracing config generates timelines for following events:
175175

176176
This feature has been disabled by default.
177177

178-
## Termination watcher
179-
180-
This feature is in early stage and therefore disabled by default.
181-
182-
The termination watcher is currently watchting for spot termination notifications. The module is only taken events into account for instances tagged with `ghr:environment` by default when deployment the module as part of one of the main modules (root or multi-runner). The module can also be deployed stand-alone, in that case the tag filter needs to be tunned.
183-
184-
- Logs: The module will log all termination notificatons. For each warning it will look up instance details and log the environment, instance type and time the instance is running. As well some other details.
185-
- Metrics: Metrics are disabled by default, this to avoid costs. Once enabled a metric will be created for each warning with at least dimensions for the environment and instance type.
186-
187-
188178
### Multiple runner module in your AWS account
189179

190180
The watcher will act on all spot termination notificatins and log all onses relevant to the runner module. Therefor we suggest to only deploy the watcher once. You can either deploy the watcher by enabling in one of your deployments or deploy the watcher as a stand alone module.
@@ -202,6 +192,38 @@ In case the setup does not work as intended, trace the events through this seque
202192

203193
## Experimental features
204194

195+
### Termination watcher
196+
197+
This feature is in early stage and therefore disabled by default.
198+
199+
The termination watcher is currently watchting for spot termination notifications. The module is only taken events into account for instances tagged with `ghr:environment` by default when deployment the module as part of one of the main modules (root or multi-runner). The module can also be deployed stand-alone, in that case the tag filter needs to be tunned.
200+
201+
- Logs: The module will log all termination notificatons. For each warning it will look up instance details and log the environment, instance type and time the instance is running. As well some other details.
202+
- Metrics: Metrics are disabled by default, this to avoid costs. Once enabled a metric will be created for each warning with at least dimensions for the environment and instance type. THe metric name space can be configured via the variables. The metric name used is `SpotInterruptionWarning`.
203+
204+
#### Log example
205+
206+
Below an example of the the log messages created.
207+
208+
```
209+
{
210+
"level": "INFO",
211+
"message": "Received spot notification warning:",
212+
"environment": "default",
213+
"instanceId": "i-0039b8826b3dcea55",
214+
"instanceType": "c5.large",
215+
"instanceLaunchTime": "2024-03-15T08:10:34.000Z",
216+
"instanceRunningTimeInSeconds": 68,
217+
"tags": [
218+
{
219+
"Key": "ghr:environment",
220+
"Value": "default"
221+
}
222+
... all tags ...
223+
]
224+
}
225+
```
226+
205227
### Queue to publish workflow job events
206228

207229
This queue is an experimental feature to allow you to receive a copy of the wokflow_jobs events sent by the GitHub App. This can be used to calculate a matrix or monitor the system.

docs/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@ The control plane (scale up lambda) will store the runner registration configura
6464

6565
The AMI cleaner is a lambda that will clean up AMIs that are older than a configurable amount of days. This is useful when using the AMI builder to create AMIs. The cleaner will also check which AMIs are used the latest version of the launch template. And you can provide SSM config paths pointing to AMI IDs. The cleaner will not delete these AMIs. The AMI cleaner is opt in, it will not be created by default.
6666

67-
### Spot Instance Termination Watcher
67+
### Instance Termination Watcher
6868

69-
The Spot Instance Termination Wachter is creating log and optional merrics for Spot Instance Termination warning sent by AWS two minutes before termination. The Lambda only will log instances details for instances tagged with `ghr:createdBy`. The module is by default not enabled.
69+
> This feature is Beta, changes will not trigger a major release as long in beta.
70+
71+
The Instance Termination Wachter is creating log and optional merrics for termination of instances. Currently only spot termination warnings are watched. See [confgiuration](configuration/) for more details.
7072

7173
### Security
7274

examples/termination-watcher/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ No inputs.
5050
## Outputs
5151

5252
No outputs.
53-
<!-- END_TF_DOCS -->
53+
<!-- END_TF_DOCS -->

modules/multi-runner/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ variable "metrics_namespace" {
619619

620620
variable "instance_termination_watcher" {
621621
description = <<-EOF
622-
Configuration for the spot termination watcher lambda function.
622+
Configuration for the spot termination watcher lambda function. This feature is Beta, changes will not trigger a major release as long in beta.
623623
624624
`enable`: Enable or disable the spot termination watcher.
625625
'enable_metrics': Enable metric for the lambda. If `spot_warning` is set to true, the lambda will emit a metric when it detects a spot termination warning.

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ variable "metrics_namespace" {
854854

855855
variable "instance_termination_watcher" {
856856
description = <<-EOF
857-
Configuration for the instance termination watcher.
857+
Configuration for the instance termination watcher. This feature is Beta, changes will not trigger a major release as long in beta.
858858
859859
`enable`: Enable or disable the spot termination watcher.
860860
'enable_metrics': Enable or disable the metrics for the spot termination watcher.

0 commit comments

Comments
 (0)