mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-04-15 07:16:34 +00:00
25 lines
773 B
YAML
25 lines
773 B
YAML
apiVersion: troubleshoot.replicated.com/v1beta1
|
|
kind: Preflight
|
|
metadata:
|
|
name: postgres-connection-valid
|
|
spec:
|
|
collectors:
|
|
- run:
|
|
collectorName: "run-ping"
|
|
image: busybox:1
|
|
namespace: default
|
|
command: [ping]
|
|
args: [-w, "5", www.google.com]
|
|
imagePullPolicy: IfNotPresent
|
|
analyzers:
|
|
- regex:
|
|
collectorName: "run-ping"
|
|
checkName: "Ping google with low packet loss?"
|
|
expression: "(?P<Transmitted>\\d+) packets? transmitted, (?P<Received>\\d+) packets? received, (?P<Loss>\\d+\\.?\\d+)% packet loss"
|
|
outcomes:
|
|
- pass:
|
|
when: "Loss < 20"
|
|
message: "Solid connection to google.com"
|
|
- fail:
|
|
message: "Really high packet loss"
|