Skip to content

Instantly share code, notes, and snippets.

@tzz
tzz / example.md
Created July 20, 2016 18:34 — forked from ericclemmons/example.md
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 <summary>Summary Goes Here</summary>
@tzz
tzz / prometheus-inventory.json
Created March 19, 2019 21:36
Sample Prometheus inventory: node-exporter target
[
{
"labels": {
"kernel_release": "3.4.5.x86_64",
"os": "linux",
"os_version": "3.4.5.x86_64",
"platform": "centos",
"platform_family": "rhel",
"platform_version": "7.8.9"
},
@tzz
tzz / chef2prometheus.jq
Created March 19, 2019 21:37
Chef inventory to Prometheus conversion example
#!/usr/bin/jq -Sf
def chef_fields:
# special field adjustments go here
.
;
.rows|
map(select(.name)) | sort_by(.name) |
@tzz
tzz / prometheus.yml
Created March 19, 2019 21:39
Barebones Jinja template for Prometheus configuration
# my global config
global:
scrape_interval: 1m # Set the scrape interval
evaluation_interval: 1m # Evaluate rules every N
# scrape_timeout is set to the global default (10s).
external_labels:
monitoring_server: {{ host }}
# Alertmanager configuration
alerting: