Skip to content

Instantly share code, notes, and snippets.

View SuperQ's full-sized avatar

Ben Kochie SuperQ

View GitHub Profile
@SuperQ
SuperQ / prometheus.yml
Created May 30, 2017 13:14
Blackbox ICMP
- job_name: 'blackbox-icmp'
metrics_path: /probe
params:
module: [icmp]
static_configs:
- targets:
- 8.8.8.8
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
@SuperQ
SuperQ / generator.yml.patch
Last active December 13, 2017 14:04
snmp_exporter label adder
diff --git a/generator/generator.yml b/generator/generator.yml
index faef3fc..4783862 100644
--- a/generator/generator.yml
+++ b/generator/generator.yml
@@ -2,22 +2,11 @@ modules:
# Default IF-MIB interfaces table with ifIndex.
if_mib:
walk: [sysUpTime, interfaces, ifXTable]
- # Interfaces if ifAlias is unique.
- if_mib_ifalias:
@SuperQ
SuperQ / LICENSE.md
Created April 24, 2017 14:34 — forked from matthiasr/LICENSE.md
Exporting chef-client metrics to Prometheus

The MIT License (MIT)

Copyright © 2017 SoundCloud Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

@SuperQ
SuperQ / gist:8188367b48c3fe8a5d0526ddaf45b376
Created October 31, 2016 16:01
Primitive init.d cgroup handler
cgroup=SERVICE
if [ ! -d /cgroup/${cgroup} ] ; then
mkdir -p /cgroup/${cgroup}
fi
echo 3 > /cgroup/${cgroup}/memory.move_charge_at_immigrate
echo $$ > /cgroup/${cgroup}/cgroup.procs
echo 32M > /cgroup/${cgroup}/memory.limit_in_bytes