Skip to content

Commit 6305595

Browse files
authored
Moshloop (#208)
* wip * chore: updates * chore: updates * chore: docs * chore: wip * chore update * chore: doc updates * chore: doc updates * chore: markdown and spelling fixes * chore: add submodules * chore: markdown fixes
1 parent 7c505f4 commit 6305595

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+367
-478
lines changed

.gitmodules

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
[submodule "mission-control/modules/canary-checker"]
2-
path = mission-control/modules/canary-checker
3-
url = https://github.com/flanksource/canary-checker.git
1+
[submodule "mission-control/canary-checker/canary-checker"]
2+
path = mission-control/canary-checker/canary-checker
3+
url = https://github.com/flanksource/canary-checker
44
[submodule "mission-control/modules/config-db"]
55
path = mission-control/modules/config-db
66
url = https://github.com/flanksource/config-db.git
77
[submodule "mission-control/modules/mission-control"]
88
path = mission-control/modules/mission-control
99
url = https://github.com/flanksource/mission-control.git
10-
[submodule "mission-control/canary-checker/canary-checker"]
11-
path = mission-control/canary-checker/canary-checker
10+
[submodule "mission-control/modules/canary-checker"]
11+
path = mission-control/modules/canary-checker
1212
url = https://github.com/flanksource/canary-checker

.markdownlint.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"MD033": false,
3+
"MD004": false,
4+
"MD045": false,
5+
"MD013": false,
6+
"MD012": false,
7+
"MD024": false,
8+
"MD040": false
9+
}

canary-checker/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Metrics exposed by. anary-checler
140140

141141
| Metric | Type | Description |
142142
| ---------------------------------------------- | --------- | ------------------------------------------- |
143-
| canary_check | Guage | Set to 0 when passing and 1 when failing |
143+
| canary_check | Gauge | Set to 0 when passing and 1 when failing |
144144
| canary_check_success_count | Counter | |
145145
| canary_check_failed_count | Counter | |
146146
| canary_check_info | Info | |

canary-checker/docs/comparisons/blackbox-exporter.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
# Canary-Checker vs Prometheus blackbox exporter
22

3-
4-
53
[Prometheus Blackbox Exporter](https://github.com/prometheus/blackbox_exporter) is a prometheus exporter for probing HTTP, HTTPS, DNS, TCP, ICMP and gRPC.
64

7-
85
| | Blackbox Exporter | Canary Checker |
96
| ------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
107
| Prometheus Exporter | Yes | Yes |
@@ -22,8 +19,7 @@
2219
| Secrets | Via [Probe](https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.Probe) | |
2320
| **Check Types** | | |
2421
| Synthetic | No | Builtin check types for any test exporting JUnit test results e.g. (k6, playwright, robot, postman, etc) |
25-
| Infrastructre | No | Verify the ability to launch new pods, create new EC2 instances or push and pull from docker / helm / git repositories |
22+
| Infrastructure | No | Verify the ability to launch new pods, create new EC2 instances or push and pull from docker / helm / git repositories |
2623
| Backup | No | Check backups via Restic, S3, SMB, SFTP, GCS |
2724
| Compliance | No | AWS Config Rules, Flanksource Config DB |
2825
| Alert Aggregation | No | Alert Manager, AWS Cloudwatch, Dynatrace |
29-

canary-checker/docs/concepts/grafana.md

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Default grafana dashboards are available. After you deploy Grafana, these dashbo
1010

1111
![](/img/grafana-dashboard.png)
1212

13-
14-
1513
### Prometheus
1614

1715
The helm chart can install a `ServiceMonitor` for the prometheus operator, by enabling the serviceMonitor flag

canary-checker/docs/concepts/image-variants.md

-1
This file was deleted.

canary-checker/docs/concepts/metrics-exporter.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ metadata:
140140
```
141141
142142
This snippet will retrieve the `last_result.results.max` value from the last execution ensuring data is not duplicated or missed
143+
143144
```go
144145
"@timestamp" : {
145146
{{- if last_result.results.max }}
@@ -183,7 +184,7 @@ The max value is saved in the `transform` section using:
183184
| `valueExpr` | An expression to derive the header value from | `Expression` | |
184185
| `labels` | Labels for prometheus metric (values can be templated) | `map[string]string` | |
185186

186-
Expresions can make use of the following variables:
187+
Expressions can make use of the following variables:
187188

188189
### **Expression Variables**
189190

@@ -194,7 +195,7 @@ Expresions can make use of the following variables:
194195
| `check.name` | Check name | `string` |
195196
| `check.description` | Check description | `string` |
196197
| `check.labels` | Dynamic labels attached to the check | `map[string]string` |
197-
| `check.endpoint` | Endpoint (usally a URL) | `string` |
198+
| `check.endpoint` | Endpoint (usually a URL) | `string` |
198199
| `check.duration` | Duration in milliseconds | `int64` |
199200
| `canary.name` | Canary name | `string` |
200201
| `canary.namespace` | Canary namespace | `string` |

canary-checker/docs/concepts/secret-management.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ rules:
186186

187187
:::
188188

189-
# Recommendations
189+
## Recommendations
190190

191191
Kubernetes Secrets are, by default, stored unencrypted in the API server's underlying data store (etcd). Anyone with API access can retrieve or modify a Secret, and so can anyone with access to etcd. With this in mind, it is recommended to implement some level of security to prevent unauthorized access to your Kubernetes secrets.
192192
You may consider the following for your encryption and security needs:

canary-checker/docs/examples/newman.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ spec:
3232
command: ["/start.sh"]
3333
```
3434
35-
By configuring newman to export JUnit to the `testResults` folder, canary-checker will pick up the results and make then available display formating and health evaluation.
35+
By configuring newman to export JUnit to the `testResults` folder, canary-checker will pick up the results and make then available display formatting and health evaluation.
3636

3737
```bash title="start.sh"
3838
set -x

canary-checker/docs/examples/playwright.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ spec:
3232
command: ["/start.sh"]
3333
```
3434
35-
By configuring playwright to export JUnit to the `testResults` folder, canary-checker will pick up the results and make then available display formating and health evaluation.
35+
By configuring playwright to export JUnit to the `testResults` folder, canary-checker will pick up the results and make then available display formatting and health evaluation.
3636

3737
```bash title="start.sh"
3838
mkdir -p /tmp/junit-results

canary-checker/docs/health-checks.mdx

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
pagination_next: notifications/index
3+
pagination_prev: topology/index
24
slug: /canary-checker
35
title: Health Checks
46
---
@@ -22,7 +24,7 @@ Active infrastructure checks provision infrastructure (e.g. EC2 Instances, Kuber
2224

2325
</Step>
2426

25-
<Step step={3} name="Integration" style="list">
27+
<Step step={4} name="Integration" style="list">
2628
Integration checks run automated test suites using tools like Playwright, JUnit, Newman and K6 to validate end-to-end functionality across services and infrastructure.
2729
</Step>
2830

canary-checker/docs/reference/1-alert-manager.mdx

-5
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ spec:
4747
description: "A list of alert prefix names to include",
4848
scheme: '[]string'
4949
},
50-
{
51-
field: "relationships",
52-
description: "Link the check results to components and configs using lookup expressions.",
53-
scheme: '[Relationships](#relationships)'
54-
},
5550
{
5651
field: "ignore",
5752
description: "A list of alert prefix names to exclude",

canary-checker/docs/reference/1-folder.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ spec:
4343
{field: "minCount", description: "The minimum number of files inside the `path`", scheme: "int"},
4444
{field: "maxCount", description: "The maximum number of files inside the `path`, can be used in conjunction with `filter.regex` to detect error files", scheme: "int"},
4545
{field: "minAge", description: "The youngest age a file can be", scheme: "Duration"},
46-
{field: "maxAge", description: "The oldest age a file can be, often used to check for unprocessed files or filess that have not been cleaned up", scheme: "Duration"},
46+
{field: "maxAge", description: "The oldest age a file can be, often used to check for unprocessed files or files that have not been cleaned up", scheme: "Duration"},
4747
{field: "minSize", description: "The minimum file size, can be used to detect backups that did not upload successfully", scheme: "Size"},
4848
{field: "maxSize", description: "The maximim file size", scheme: "Size"}
4949

canary-checker/docs/reference/1-git.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
schedule: "@every 1m"
1717
github:
1818
- githubToken: <token>
19-
query: SELECT count(*) FROM commits WHERE author_email = '[email protected]'
19+
query: SELECT count(*) FROM commits WHERE author_email = '[email protected]'
2020
```
2121
2222
<HealthCheck name="github" rows={[

canary-checker/docs/reference/1-http.mdx

+6-6
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ Result variables can be used in `test`, `display` and `transform` [expressions](
4242

4343
| Name | Description | Scheme |
4444
| --------- | --------------------------------------------------------------------------- | ------------------- |
45-
| `code` | HTTP response code | _int_ |
46-
| `headers` | HTTP response headers | _map[string]string_ |
47-
| `elapsed` | HTTP Request duration | _time.Duration_ |
48-
| `sslAge` | Time until SSL certificate expires | _time.Duration_ |
45+
| `code` | HTTP response code | `int` |
46+
| `headers` | HTTP response headers | `map[string]string` |
47+
| `elapsed` | HTTP Request duration | `time.Duration` |
48+
| `sslAge` | Time until SSL certificate expires | `time.Duration` |
4949
| `content` | HTTP Response body | string |
5050
| `json` | If `Content-Type=application/json` response body converted into JSON object | `JSON` |
5151

@@ -107,7 +107,7 @@ See <CommonLink to="gotemplate" anchor="escaping">Escaping variables</CommonLink
107107
| **HTTP Check Metrics** | | |
108108
| ------------------------------------------------------------- | ------- | --------------------------------------- |
109109
| `canary_check_http_response_status{status, statusClass, url}` | Counter | Response code counter for each endpoint |
110-
| `canary_check_http_ssl_expiry{url}` | Guage | |
110+
| `canary_check_http_ssl_expiry{url}` | Gauge | |
111111

112112
Status class is one of `1xx`, `2xx`, `3xx`, `4xx`, `5xx`
113113

@@ -120,7 +120,7 @@ Status class is one of `1xx`, `2xx`, `3xx`, `4xx`, `5xx`
120120
</details>
121121

122122

123-
<details summary="Transformings metrics into individual checks">
123+
<details summary="Transforming metrics into individual checks">
124124

125125
<div>
126126
```yaml title="metrics.yaml" file=../../../modules/canary-checker/fixtures/minimal/metrics-transformed.yaml

canary-checker/docs/reference/1-kubernetes.mdx

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ sidebar_class_name: popular
77

88
The Kubernetes check performs requests on Kubernetes resources such as Pods to get the desired information.
99

10-
```yaml title="junit.yaml" file=../../../modules/canary-checker/fixtures/k8s/kubernetes-minimal_pass.yaml
1110

11+
```yaml title="junit.yaml" file=../../../modules/canary-checker/fixtures/k8s/kubernetes-minimal_pass.yaml
1212
```
1313

1414
<HealthCheck name="kubernetes" edition="standard" connection="kubeconfig" rows={[
@@ -67,8 +67,6 @@ dyn(results).all(x, k8s.isReady(x))
6767
<div>
6868
6969
```yaml title="junit.yaml" file=../../../modules/canary-checker/fixtures/k8s/certmanager.yaml
70-
7170
```
72-
7371
</div>
7472
</details>

canary-checker/docs/reference/1-prometheus.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar_class_name: popular
88
The Prometheus Check connects to the Prometheus host, performs the desired query, and displays the results.
99

1010

11-
```yaml title="promtheus.yaml" file=../../../modules/canary-checker/fixtures/datasources/prometheus.yaml
11+
```yaml title="prometheus.yaml" file=../../../modules/canary-checker/fixtures/datasources/prometheus.yaml
1212
```
1313
<HealthCheck name="prometheus" connection="url" rows={[
1414
{field: "url", description: "Prometheus instance, if not specified in installation it is required", required: true},

canary-checker/docs/reference/1-redis.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Redis
66

77
The Redis check connects to a specified Redis database instance to check its availability.
88

9-
```yaml title="promtheus.yaml" file=../../../modules/canary-checker/fixtures/datasources/redis_pass.yaml
9+
```yaml title="redis.yaml" file=../../../modules/canary-checker/fixtures/datasources/redis_pass.yaml
1010
```
1111
<HealthCheck name="redis" connection="url" rows={[
1212
{field: "url", description: "Redis instance", required: true},

0 commit comments

Comments
 (0)