Skip to content

Instantly share code, notes, and snippets.

package main
import (
"bytes"
"io"
"io/ioutil"
"log"
"strings"
"github.com/go-macaron/binding"
@woodsaj
woodsaj / import_idx.go
Last active October 31, 2016 22:44
migrate metrictank indexes from ES to cassandra.
package main
import (
"flag"
"fmt"
"log"
"sync"
"time"
"github.com/gocql/gocql"
package main
import (
"testing"
"strconv"
)
type Data struct {
Name string
Tags []string
#!/bin/sh
curl -H "Authorization: Bearer not_very_secret_key" -H "Content-Type: application/json" -X POST http://localhost:8081/metrics -d '[
{
"name":"my.metric.name",
"interval":60,
"value":1.23,
"time":1465043400,
"tags":[
"imported"
@woodsaj
woodsaj / stacktrace.txt
Created March 8, 2016 17:39
metric-tank stacktrace
This file has been truncated, but you can view the full file.
goroutine 44011258 [running]:
runtime/pprof.writeGoroutineStacks(0x7f5713578398, 0xc85bca55f0, 0x0, 0x0)
/usr/local/go/src/runtime/pprof/pprof.go:516 +0x84
runtime/pprof.writeGoroutine(0x7f5713578398, 0xc85bca55f0, 0x2, 0x0, 0x0)
/usr/local/go/src/runtime/pprof/pprof.go:505 +0x46
runtime/pprof.(*Profile).WriteTo(0xd88f60, 0x7f5713578398, 0xc85bca55f0, 0x2, 0x0, 0x0)
/usr/local/go/src/runtime/pprof/pprof.go:236 +0xd4
net/http/pprof.handler.ServeHTTP(0xc8bfeabf01, 0x9, 0x7f5720482878, 0xc85bca55f0, 0xca1bfebce0)
/usr/local/go/src/net/http/pprof/pprof.go:210 +0x37e
net/http/pprof.Index(0x7f5720482878, 0xc85bca55f0, 0xca1bfebce0)