Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title> PuppetContinuousIntegration &lt; Technology &lt; LMAX</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="icon" href="/pub/System/ProjectLogos/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/pub/System/ProjectLogos/favicon.ico" type="image/x-icon" />
<meta name="TEXT_NUM_TOPICS" content="Number of topics:" />
<meta name="TEXT_MODIFY_SEARCH" content="Modify search" />
{
"acl": {
"default_policy": "deny",
"enable_token_persistence": true,
"enabled": true
},
"auto_encrypt": {
"tls": true
},
"bind_addr": "0.0.0.0",
{
"acl": {
"default_policy": "deny",
"enable_token_persistence": true,
"enabled": true
},
"auto_encrypt": {
"allow_tls": true
},
"bind_addr": "0.0.0.0",
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
class profile::statistics::collection_server(
$apache_listen_ip = undef,
$logical_volume_size = '100G',
$volume_group = 'vg_os',
$physical_volume = undef,
$extra_proxy_pass = [],
$extra_docroot_index_links = {},
$influxdb_index_version = 'inmem',
$cache_max_memory_size = 1048576000,
) inherits profile {
[user@host ~]$ influx
Connected to http://localhost:8086 version 1.5.2
InfluxDB shell version: 1.5.2
> use lanz
Using database lanz
> select * from congestion_record order by time desc limit 10
name: congestion_record
time entry_type host hostname intf_name port port_id q_drop_count queue_size switch_id time_of_max_qlen timestamp traffic_class tx_latency
---- ---------- ---- -------- --------- ---- ------- ------------ ---------- --------- ---------------- --------- ------------- ----------
1527250808255589742 3 xxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyy Ethernet35 50001 33 0 15 0 0 152725080820836 1 5790
def process_zpool_data(pool_array)
if pool_array == []
return Hash.new(:absent)
end
#get the name and get rid of it
pool = Hash.new
pool[:pool] = pool_array[0]
pool_array.shift
tmp = []
@lukebigum
lukebigum / interfaces.py
Created August 25, 2016 13:22
translate LLDP information into a
#!/usr/bin/env python
import sys
import subprocess
import getopt
import re
import json
def print_usage_and_exit():
print "Usage: interfaces.py [-d] [-h] [-i interface]"
@lukebigum
lukebigum / ptp-stats.awk
Created April 6, 2016 16:10
Awk script for PTPd stats
BEGIN {"hostname" | getline hstnm ; };
{
#one_way_delay
a = $4
v = gensub(/ /, "", "g", a)
print "PUTVAL " hstnm "/one_way_delay/precise_time_offset interval=1 N:" v*1000000000
#offset_from_master
a = $5
v = gensub(/ /, "", "g", a)
@lukebigum
lukebigum / diff.py
Created February 5, 2016 13:53
time difference between proceeding lines
from datetime import datetime, timedelta
import sys
last_t = None
min_delta = timedelta(seconds=1)
#2016-02-05T09:46:33Z
for line in sys.stdin:
t = datetime.strptime(line, "%Y-%m-%dT%H:%M:%SZ\n")
if last_t:
diff = t - last_t