Skip to content

Instantly share code, notes, and snippets.

View sebbrandt87's full-sized avatar
🇺🇦 🕊️ 🇮🇱 🕊️

Sebastian Brandt sebbrandt87

🇺🇦 🕊️ 🇮🇱 🕊️
View GitHub Profile
@sebbrandt87
sebbrandt87 / network_test.sh
Created March 27, 2022 10:21 — forked from popmonkey/network_test.sh
EdgeOS ready script that tests for WAN connection degradation (via packet loss and latency checks)
#!/bin/sh
#
# USG and EdgeRouter route-test script for failover
#
# uses ping to check latency and packet loss.
# returns zero when within thresholds and non zero (1) when above thresholds
# uses ping, traceroute, and logger
#
# by https://github.com/popmonkey
#
@sebbrandt87
sebbrandt87 / alert.sh
Created June 12, 2020 16:01 — forked from cherti/alert.sh
send a dummy alert to prometheus-alertmanager
#!/bin/bash
name=$RANDOM
url='http://localhost:9093/api/v1/alerts'
echo "firing up alert $name"
# change url o
curl -XPOST $url -d "[{
\"status\": \"firing\",
@sebbrandt87
sebbrandt87 / alert.sh
Created June 12, 2020 16:01 — forked from cherti/alert.sh
send a dummy alert to prometheus-alertmanager
#!/bin/bash
name=$RANDOM
url='http://localhost:9093/api/v1/alerts'
echo "firing up alert $name"
# change url o
curl -XPOST $url -d "[{
\"status\": \"firing\",

Keybase proof

I hereby claim:

  • I am sebbrandt87 on github.
  • I am sebbrandt (https://keybase.io/sebbrandt) on keybase.
  • I have a public key ASAwWvfPL03BQWj5g5f_fJwLRuWFHFEFcLzNTEyZGLaI3Qo

To claim this, I am signing this object:

@sebbrandt87
sebbrandt87 / dcos-docs-helper.sh
Created July 22, 2019 13:32
Updated inputs for terraform dcos-docs
for i in ./pages/install-include/*-inputs*; do (
CURDIR=${PWD}
echo "${PWD}"/${i};
cd ${HOME}/src/github.com/dcos-terraform/terraform-$(basename ${i} | sed -E "s/-.*//")-dcos/
IFS=$'\n' FILES=($(egrep -H -r '^(variable \")' *.tf | cut -d: -f1 | uniq | gsed 's/:.*//'));
for j in $FILES; do
VARFILES="${VARFILES} ${HOME}/src/github.com/dcos-terraform/terraform-$(basename ${i} | sed -E "s/-.*//")-dcos/${j}"
done;
cd ${CURDIR};
echo "Here is a list of all the variables that are currently supported on the Universal Installer and available for you to customize your cluster." > ${i}
@sebbrandt87
sebbrandt87 / prometheus.yml
Last active June 18, 2019 14:28
prometheus config
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_timeout: 10s
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'cloudkeeper-prometheus'
@sebbrandt87
sebbrandt87 / prometheus.yaml
Last active April 29, 2019 09:00
grafana prometheus.yaml
apiVersion: 1
datasources:
- name: cloudkeeper
type: prometheus
access: proxy
url: http://cloudkeeperprometheus.marathon.l4lb.thisdcos.directory:9090
isDefault: true
@sebbrandt87
sebbrandt87 / Caddyfile
Last active June 14, 2019 14:23
Caddyfile
:8080 {
status 200 /
}
:8000 {
prometheus 0.0.0.0:9180
realip {
from 44.128.0.0/20
}
@sebbrandt87
sebbrandt87 / jenkins-backup.sh
Last active November 30, 2018 12:38
jenkins-backup.sh
#!/usr/bin/env bash
set -o errexit
set -o xtrace
rsync -aP \
--exclude 'war' \
--exclude 'jenkins.war' \
--exclude '*.tmp' \
--exclude '*.bak' \
--exclude '.ssh' \
@sebbrandt87
sebbrandt87 / service.yaml
Last active November 21, 2018 09:14
service.yaml
---
apiVersion: v1
kind: Service
metadata:
name: si-test-foobar
namespace: siws
spec:
ports:
- port: 80
protocol: TCP