Skip to content

Instantly share code, notes, and snippets.

View toschneck's full-sized avatar
🤘

Tobias Schneck toschneck

🤘
View GitHub Profile
@toschneck
toschneck / remove-kubermatic-finalizers.sh
Created October 2, 2022 13:58
delete kuberenetes finalizer of all crds of group kubermatic
#!/usr/bin/env bash
for i in $(kubectl get crd | grep kubermatic.k8s.io | awk '{print $1}');
do
for j in $(kubectl get $i | awk '{print $1}'); do
kubectl patch $i $j --type json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]'
done
done
@toschneck
toschneck / promql-query-downtime-sla.md
Last active February 12, 2023 20:35
downtime calc prometeheus

Metric collection

Currently somehow Grafana doesn't deliver the same result as a direct Thanos Query, so first we need to connect to the prometheus-thanos-query pod:

k port-forward svc/prometheus-thanos-query 10902:10902

Thanos | Highly available Prometheus setup 2022-06-13 07-56-11

Without respecting of scrape erros of blackbox-exporter

@toschneck
toschneck / grafana-custom-explore.md
Last active March 25, 2022 17:00
pefromance-metrics-explore.md

Grafana

Alerts history

sum(ALERTS_FOR_STATE) by (alertname)

Loki

LogQL in 5 Min

etcd too long response

@toschneck
toschneck / keybase.md
Created December 6, 2018 17:41
keybase.md

Keybase proof

I hereby claim:

  • I am toschneck on github.
  • I am toschneck (https://keybase.io/toschneck) on keybase.
  • I have a public key whose fingerprint is 8488 0A3F 1D08 9725 2CA5 1735 F3A9 BE68 73C4 2574

To claim this, I am signing this object:

dpkg --get-selections | grep 16.04 | awk '{print $1}' | xargs apt remove -y
# add this to your bash env
# Set git user and signing key
function git-set-user() {
if [ "$#" -lt "1" ]
then
echo "Missing required arguments" >&2
echo "Usage: $0 EMAIL [PATH_TO_GIT_REPO]" >&2
exit 65
@toschneck
toschneck / install_docker_bash_completions.sh
Last active April 2, 2024 12:41
Install Docker and Docker-Compose bash completion
#!/usr/bin/env bash
set -e
echo "install docker bash completion"
curl -L https://raw.githubusercontent.com/docker/docker/v$(docker version --format '{{.Server.Version}}')/contrib/completion/bash/docker -o /etc/bash_completion.d/docker
echo "install docker-compose bash completion"
curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
echo ".... done!"
@toschneck
toschneck / sakuli_requirements.md
Last active August 29, 2015 14:24
Sakuli Requirements

Sakuli-Client (test execution worker)

  • OS: Windows or Linux (Ubuntu Desktop 14.04 LTS, OpenSUSE 13.2).
    • if virtualized: Hypervisor guest additions for best performance
  • RAM: 3GB+
  • Firewall: Port 9999 (Sahi Proxy), Port 4730 (Gearman Queue)
  • a user account with sudo/admin rights (only for the installation)
  • any screen locking mechanisms should be disabled
  • Sakuli needs a reliable and predictable desktop environment: make sure that there are no pop-up windows of services or applications
  • Sakuli versions including v0.4.* need Java JRE 7; all newer versions are based on Java JRE 8 (recommended)
  • Test account - it is recommend to use a separate account for the test execution: