This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -xe | |
do_kube() { | |
result=$(kubectl --kubeconfig ${KUBECONFIG} --context ${KUBECONTEXT} $cmd) | |
echo "$result" | |
} | |
for ns in $(cmd='get ns -l=istio-injection -o jsonpath="{.items[*].metadata.name}' do_kube) ; do | |
cmd="rollout restart deployment -n $ns" do_kube | |
cmd="rollout restart statefulsets -n $ns" do_kube |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step 3/13 : RUN mkdir /src && cd /src && git clone --recurse-submodules --branch=v0.5.0 https://github.com/jaegertracing/jaeger-client-cpp.git && cd /src/jaeger-client-cpp && ./scripts/build-plugin.sh | |
---> Running in 304651a141c7 | |
Cloning into 'jaeger-client-cpp'... | |
Note: checking out '68be4e2d0416bc7b7262ff7111efa9cc1c5a2d08'. | |
You are in 'detached HEAD' state. You can look around, make experimental | |
changes and commit them, and you can discard any commits you make in this | |
state without impacting any branches by performing another checkout. | |
If you want to create a new branch to retain commits you create, you may |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock \ | |
--env SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock \ | |
ubuntu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import json | |
import requests | |
import collections | |
import socket | |
datadog_host = '127.0.0.1' | |
datadog_port = 8125 | |
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
logging.basicConfig(level=logging.INFO) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
events { | |
worker_connections 1024; | |
accept_mutex off; | |
use epoll; | |
} | |
http { | |
# include more useful numbers in nginx log lines | |
# https://www.nginx.com/blog/using-nginx-logging-for-application-performance-monitoring/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://superuser.com/a/1060873 | |
map $http_x_forwarded_for $allowed { | |
default false; | |
~(^|,|\s)54.68.161.228$ true; | |
~(^|,|\s)10.200.\d+.\d+$ true; | |
"" true; # for internal-to-internal traffic, X-Forwarded-For is unset | |
} | |
server { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright 2016 The Kubernetes Authors All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in clouddriver fiat echo gate orca igor front50 ; do | |
mainpid=$(sudo systemctl show -p MainPID ${i}.service | cut -d= -f2) | |
javapid=$(pgrep -lP $mainpid | grep java | awk '{print $1}') | |
closewaits=$(sudo lsof -p $javapid | grep IPv6 | wc -l) | |
msg="tcp.close_wait:${closewaits}|g|#app:$i" | |
echo $msg | |
echo $msg > /dev/udp/localhost/8125 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo hello | openssl aes-256-cbc -k secret123 -a | openssl aes-256-cbc -k secret123 -d -a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
set -e | |
# a script which acquires an exclusive lock from a redis server | |
# and executes a command that needs mutual exclusion across servers | |
# usage: | |
# redis_lock.sh <lock_name> <command> | |
redis_server=redis.example.com |
NewerOlder