Skip to content

Instantly share code, notes, and snippets.

@inthecloud247
inthecloud247 / splunk-daemonset.yaml
Created April 12, 2018 16:57 — forked from FutureSharks/splunk-daemonset.yaml
Creates a Kubernetes DaemonSet that will monitor container logs and forward them to a Splunk Indexer
# Create using kubectl:
# $ kubectl create -f splunk-daemonset.yaml
#
# You should also add config on your indexer to deal with the json formatted files:
# https://answers.splunk.com/answers/148307/how-to-parse-and-extract-json-log-files-in-splunk.html
#
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: splunk-forwarder
HOST=localhost
PORT=9200
TO_NODE=YOUR_NODE_NAME
curl "http://$HOST:$PORT/_cat/shards" | grep UNAS | awk '{print $1,$2}' | while read var_index var_shard; do
curl -XPOST "http://$HOST:$PORT/_cluster/reroute" -d "
{
\"commands\" : [
{
\"allocate\" :
@inthecloud247
inthecloud247 / gist:e4f3843f00d3e206501128db3049ba20
Created November 21, 2017 08:34 — forked from ipedrazas/gist:e3ae3ddb98b2e85c8370
Consul.io KV get value from bash
curl -s 10.0.0.145:8500/v1/kv/my_key/my_otehr_key/this_is_the_key?dc=dc1 | jq -r '.[0].Value' | base64 --decode
class Gradle28 < Formula
desc "Build system based on the Groovy language"
homepage "https://www.gradle.org/"
url "https://downloads.gradle.org/distributions/gradle-2.8-bin.zip"
sha256 "a88db9c2f104defdaa8011c58cf6cda6c114298ae3695ecfb8beb30da3a903cb"
bottle :unneeded
conflicts_with "gradle", :because => "Differing version of same formula"
option "with-all", "Installs Javadoc, examples, and source in addition to the binaries"
@inthecloud247
inthecloud247 / gradle.rb
Last active January 10, 2017 13:28
homebrew-compatible gradle213 install
class Gradle < Formula
desc "Build system based on the Groovy language"
homepage "https://www.gradle.org/"
url "https://downloads.gradle.org/distributions/gradle-2.13-bin.zip"
sha256 "0f665ec6a5a67865faf7ba0d825afb19c26705ea0597cec80dd191b0f2cbb664"
bottle :unneeded
option "with-all", "Installs Javadoc, examples, and source in addition to the binaries"
depends_on :java => "1.7+"