Skip to content

Instantly share code, notes, and snippets.

View spjmurray's full-sized avatar

Simon Murray spjmurray

  • Nscale
  • Manchester UK
View GitHub Profile
@spjmurray
spjmurray / gist:715b92e705fbe0f7841f6ed1171b6e49
Created February 8, 2021 14:33
Kind 3 node configuration
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
@spjmurray
spjmurray / gist:f32ac2d79a72603f18af5a68d9751830
Created February 5, 2021 13:56
Pro-mode Kind (availability zones)
#!/bin/bash
kind create cluster --config ~/kind/3-node.yaml
kubectl label node kind-control-plane failure-domain.beta.kubernetes.io/zone=twilight
kubectl label node kind-worker failure-domain.beta.kubernetes.io/zone=end
kubectl label node kind-worker2 failure-domain.beta.kubernetes.io/zone=danger
@spjmurray
spjmurray / signing.go
Created October 10, 2018 15:50
DSA signing
package main
import (
"crypto/dsa"
"crypto/rand"
"crypto/sha256"
"fmt"
"math/big"
"strings"
)
@spjmurray
spjmurray / floodfill.py
Last active August 1, 2018 09:26
Flood filling contiguous areas on a 2D grid
#!/usr/bin/python
import random
import sys
# Given an XxY array...
X = 24
Y = 16
# ... This is modelled as nested lists for O(1) element access times
@spjmurray
spjmurray / ceph.json
Created August 21, 2017 09:15
Ceph Dashboard 21/08/17
{
"annotations": {
"list": []
},
"editable": true,
"gnetId": null,
"graphTooltip": 1,
"hideControls": false,
"id": 10,
"links": [],
@spjmurray
spjmurray / shutoff.py
Created August 9, 2017 08:40
Stopping an Instance in OpenStack
#!/usr/bin/python
"""
Demo to showdown an instance
"""
import time
from keystoneauth1 import session
from keystoneauth1.identity import v3
from novaclient import client as compute_client
@spjmurray
spjmurray / ceph-dashboard.json
Created May 10, 2017 11:13
Garfana Ceph Dashboard - Telegraf Plugin
{
"__inputs": [
{
"name": "DS_INFLUXDB",
"label": "influxDB",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
@spjmurray
spjmurray / get.rb
Created July 8, 2016 09:23
Consul Hash Retrieval
#!/usr/bin/env ruby
require 'base64'
require 'deep_merge'
require 'json'
require 'net/http'
require 'pp'
uri = URI("http://localhost:8500/v1/kv/#{ARGV[0]}?recurse")
raw = JSON.parse(Net::HTTP.get(uri))
diff --git a/doc/6-object-types.md b/doc/6-object-types.md
index b0779e8..822270d 100644
--- a/doc/6-object-types.md
+++ b/doc/6-object-types.md
@@ -908,6 +908,45 @@ Configuration Attributes:
flush_interval | **Optional.** How long to buffer data points before transfering to InfluxDB. Defaults to `10s`
flush_threshold | **Optional.** How many data points to buffer before forcing a transfer to InfluxDB. Defaults
+### <a id="objecttype-influxdbwriter-instance-tags"></a> Instance Tagging
+
@spjmurray
spjmurray / slack-icinga2.png
Last active May 11, 2016 13:22
Slack Icinga2
test