Skip to content

Instantly share code, notes, and snippets.

View robskillington's full-sized avatar
⌨️

Rob Skillington robskillington

⌨️
View GitHub Profile
@robskillington
robskillington / m3dbnode_disk_usage.sh
Last active August 16, 2020 22:17
M3DB disk size
N=$(du -d 0 /var/lib/m3db | cut -f 1 -d $'\t'); echo "$N kb, all data"
N=0; for f in $(find /var/lib/m3db | fgrep "docdata.db"); do i=$(du $f | cut -f 1 -d $'\t'); N=$(expr $N + $i); done; echo "$N kb, index docdata"
@robskillington
robskillington / monorepo-merge.sh
Created June 5, 2020 13:53 — forked from justinjc/monorepo-merge.sh
Merging m3db/* repos into m3db/m3
#!/bin/bash
set -euo pipefail
usage() {
echo "usage: $0 <repo> <name>"
echo
echo "<repo>"
echo " The repo link, e.g. https://github.com/m3db/m3coordinator.git"
echo
@robskillington
robskillington / go.mod
Last active May 20, 2020 17:16
go.mod for building against M3 monorepo
module github.com/chronosphereio/enterprise
go 1.13
require (
github.com/RoaringBitmap/roaring v0.4.21 // indirect
github.com/apache/thrift/lib/go/thrift v0.0.0-00010101000000-000000000000 // indirect
github.com/apex/log v1.1.2 // indirect
github.com/axw/gocov v1.0.0
github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b // indirect
@robskillington
robskillington / gist:8d599c1b841341492779fcaff1001840
Created August 27, 2019 17:08
HN article for Time Series Databases Deep Dive
https://news.ycombinator.com/edit?id=20812002
@robskillington
robskillington / m3db-nodes-remove.sh
Last active July 2, 2019 00:00
m3db-nodes-remove.sh
#!/bin/bash
echo "Example usage: KV_ZONE=embedded KV_ENV=default_env COORD_HTTP_HOST=\"host1\" COORD_HTTP_PORT=\"7201\" HOSTS=\"host1 host2 host3\" ISOLATION_GROUP=\"group\" ./m3dbops-nodes-remove.sh"
if [ "$HOSTS" = "" ]; then
echo "must set HOSTS"
exit 1
fi
if [ "$ISOLATION_GROUP" = "" ]; then
@robskillington
robskillington / m3dbops-nodes-add.sh
Created June 19, 2019 07:54
m3dbops-nodes-add.sh
#!/bin/bash
echo "Example usage: KV_ZONE=embedded KV_ENV=default_env COORD_HTTP_HOST=\"host1\" COORD_HTTP_PORT=\"7201\" HOSTS=\"host1 host2 host3\" ISOLATION_GROUP=\"group\" ./m3dbops-nodes-add.sh"
if [ "$HOSTS" = "" ]; then
echo "must set HOSTS"
exit 1
fi
if [ "$ISOLATION_GROUP" = "" ]; then
@robskillington
robskillington / m3coordinator-deploy.yaml
Created May 13, 2019 04:20
m3coordinator k8s manifest (dedicated)
---
apiVersion: v1
kind: Service
metadata:
labels:
app: coordinator
name: coordinator-dedicated
spec:
ports:
- name: coordinator
@robskillington
robskillington / prometheus.proto
Last active October 11, 2024 14:21
Example Python Prometheus remote write client
// Copyright 2016 Prometheus Team
// 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
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@robskillington
robskillington / keys.png
Last active December 5, 2021 23:43
iTerm escape codes (delete word, forward delete word, word skip left, word skip right)
keys.png
@robskillington
robskillington / README.md
Last active April 1, 2019 21:20
M3 FOSDEM demo

M3 Demo

This repository contains a docker-compose file which can be used to setup a demo of the M3 stack. It runs the following containers:

  1. M3DB
  2. M3Coordinator
  3. Prometheus
  4. Grafana

Setup