I hereby claim:
- I am rewanthtammana on github.
- I am rewanthtammana (https://keybase.io/rewanthtammana) on keybase.
- I have a public key ASBECZndiO7ez7E4uTEa78vuaJgllZBNEMfY4MvFY9V-rAo
To claim this, I am signing this object:
apiVersion: audit.k8s.io/v1 | |
kind: Policy | |
rules: | |
# Don't log requests for health & few other non-sensitive endpoints | |
- level: None | |
nonResourceURLs: | |
- "/healthz*" | |
- "/readyz*" | |
- "/livez*" | |
- "/logs" |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
cd ~/environment | |
wget https://workshops.devax.academy/security-for-developers/module2/files/pipeline.zip | |
unzip pipeline.zip -d pipeline | |
cd ~/environment/pipeline/ | |
python3 -m venv .venv | |
source .venv/bin/activate | |
pip install -r requirements.txt | |
cp config.yaml.sample config.yaml | |
cdk bootstrap |
groups: | |
- name: loki | |
rules: | |
# Rules inspired from loki-mixins - https://github.com/grafana/loki/blob/main/production/loki-mixin-compiled/alerts.yaml | |
- alert: LokiRequestErrors | |
annotations: | |
description: This alert checks that we have less than 10% errors on Loki requests. | |
expr: | | |
100 * sum(rate(loki_request_duration_seconds_count{status_code=~"5.."}[1m])) by (namespace, job, route) | |
/ |
--- | |
rule_files: | |
- loki.all.rules.yml | |
tests: | |
- interval: 1m | |
input_series: | |
- series: 'cortex_ring_members{container="service", job="zj88t-prometheus/workload-zj88t/0", name="service", namespace="loki", node="ip-10-6-2-178.eu-central-1.compute.internal", pod="loki-service-676b8c897b-rq298", provider="aws", service_priority="highest", state="Unhealthy"}' | |
values: "0+0x20 1+0x160" # 1 unhealthy value after 20 minutes | |
- series: 'loki_panic_total{app="loki-service", container="service", job="zj88t-prometheus/workload-zj88t/0", namespace="loki", node="ip-10-6-2-178.eu-central-1.compute.internal", pod="loki-service-676b8c897b-rq29", provider="aws", service_priority="highest"}' |
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 |
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 |