Skip to content

Instantly share code, notes, and snippets.

View garethahealy's full-sized avatar

Gareth Healy garethahealy

View GitHub Profile
@garethahealy
garethahealy / example.json
Last active December 30, 2016 16:53
grouped output example
[
{
"id": "prometheus_test{PUT}",
"data": [
{
"timestamp": 1482999784249,
"value": 2
},
{
"timestamp": 1482999874249,
@garethahealy
garethahealy / query-param-with-group.json
Created December 30, 2016 16:21
query-param-with-group
{
"start": 1482999755690,
"end": 1483000020093,
"order": "ASC",
"tags": "pod_namespace:etcd-testing",
"dataPointTagGroupKey": "method"
}
@garethahealy
garethahealy / test.sh
Last active December 30, 2016 16:22
query-group-test
#!/usr/bin/env bash
wget https://gist.githubusercontent.com/garethahealy/3a156efbebb1a28eb468cafc552cbe4e/raw/397b4c2b6fe73b69252c36a3aa57943acb1462c6/create-prometheus_test.json
wget https://gist.githubusercontent.com/garethahealy/76e6042598ed1b67dba67090616dd854/raw/5ce1ea83bdbc2bab9460d345e36a0c0ae6fec09d/create-datapoints.json
wget https://gist.githubusercontent.com/garethahealy/6c616d4e2c066724790752f47872c3d9/raw/3278d404d19a86b3a8fefcb2b689ceef423f845f/query-param.json
wget https://gist.githubusercontent.com/garethahealy/a3b6df2c580a443dc5c833ddd0cd3c21/raw/667a2f3d0e9683ea9d0b36ae5dcc7c39630f5b26/query-param-with-group.json
HAWKULAR_TENANT="unit-testing"
HAWKULAR_URL="http://192.168.99.100:8080/hawkular/metrics"
METRIC_ID="prometheus_test"
@garethahealy
garethahealy / query-param.json
Created December 29, 2016 12:59
query-param
{
"start": 1482999755690,
"end": 1483000020093,
"order": "ASC",
"tags": "pod_namespace:etcd-testing"
}
@garethahealy
garethahealy / create-datapoints.json
Created December 29, 2016 12:33
create-datapoints
[
{
"timestamp": 1482999784249,
"value": 2,
"tags": {
"method": "PUT"
}
},
{
"timestamp": 1482999814249,
@garethahealy
garethahealy / create-prometheus_test.json
Created December 29, 2016 12:31
create-prometheus_test
{
"id" : "prometheus_test",
"tags" : {
"pod_namespace" : "etcd-testing",
"container_name" : "ectdnode1"
},
"type" : "counter",
"tenantId" : "unit-testing"
}
@garethahealy
garethahealy / burstable-limits.yaml
Last active December 14, 2016 15:29
LimitRange-BurstableResourceLimits
apiVersion: v1
kind: LimitRange
metadata:
name: burstable-resource-limits
annotations:
instance-type: "small"
applicable-strategy: "cluster-wide"
creation-strategy: "per-project"
limits-calculation: "80% of instance-type total, or node total if instance-type > node"
static-content: "false"
@garethahealy
garethahealy / gist:9cd764e9a62051c7e48d6ed68e5cadfb
Last active December 13, 2016 16:36
ResourceQuota-NotBestEffort
apiVersion: v1
kind: ResourceQuota
metadata:
name: notbesteffort-pod-quota
annotations:
applicable-strategy: "per-project-group"
creation-strategy: "per-project"
spec:
hard:
pods: 4
@garethahealy
garethahealy / besteffort-quota.yaml
Last active December 14, 2016 14:08
ResourceQuota-BestEffort
apiVersion: v1
kind: ResourceQuota
metadata:
name: besteffort-pod-quota
annotations:
applicable-strategy: "per-project-group"
creation-strategy: "per-project"
static-content: "true"
spec:
hard:
@garethahealy
garethahealy / maximage-limits.yaml
Last active December 14, 2016 14:06
LimitRange-MaxImageCounts
apiVersion: v1
kind: LimitRange
metadata:
name: max-image-counts
annotations:
instance-type: "all"
applicable-strategy: "cluster-wide"
creation-strategy: "per-project"
static-content: "true"
spec: