Skip to content

Instantly share code, notes, and snippets.

View graphaelli's full-sized avatar

Gil Raphaelli graphaelli

View GitHub Profile
@graphaelli
graphaelli / auditbeat-seccom-x86_64.yml
Created April 23, 2018 12:53 — forked from andrewkroh/auditbeat-seccom-x86_64.yml
Elastic Beat Seccomp Profiles
seccomp:
default_action: errno
syscalls:
- names:
- accept
- accept4
- arch_prctl
- bind
- brk
- clone
@graphaelli
graphaelli / LICENSE
Last active April 25, 2018 14:45
Flickr Archive Utilities - MIT License
Copyright 2018 Gil Raphaelli
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
benchmark old ns/op new ns/op delta
BenchmarkBackendProcessor/TestProcessErrorMinimalServiceValidate-4 6977 9455 +35.52%
BenchmarkBackendProcessor/TestProcessErrorMinimalServiceDecode-4 3238 3192 -1.42%
BenchmarkBackendProcessor/TestProcessErrorMinimalProcessValidate-4 9093 10978 +20.73%
BenchmarkBackendProcessor/TestProcessErrorMinimalProcessDecode-4 3766 3803 +0.98%
BenchmarkBackendProcessor/TestProcessErrorFullValidate-4 58480 77015 +31.69%
BenchmarkBackendProcessor/TestProcessErrorFullDecode-4 14368 14116 -1.75%
BenchmarkBackendProcessor/TestProcessErrorNullValuesValidate-4 39119 43806 +11.98%
BenchmarkBackendProcessor/TestProcessErrorNullValuesDecode-4 7862
@graphaelli
graphaelli / vars.json
Last active July 27, 2018 14:23
apm-server debug vars
{
"libbeat.config.reloads": 0,
"libbeat.config.module.starts": 0,
"libbeat.config.module.stops": 0,
"libbeat.config.module.running": 0,
"libbeat.output.type": "elasticsearch",
"libbeat.output.events.duplicates": 0,
"libbeat.output.events.active": 0,
"libbeat.output.events.batches": 0,
"libbeat.output.events.total": 0,
{
"apm-6.2.3": {
"aliases": {},
"index_patterns": [
"apm-6.2.3-*"
],
"mappings": {
"doc": {
"_meta": {
"version": "6.2.3"
#!/usr/bin/env python
import json
def dump(fields, pfx=None):
if pfx is None:
pfx = []
for field, attribs in sorted(fields.items()):
if 'properties' in attribs:
dump(attribs['properties'], pfx + [field])
#!/usr/bin/env python
import timeit
import json
args = dict(ensure_ascii=False)
def dump_and_write(obj, fp):
// +build linux,cgo darwin,cgo
package main
import "C"
import (
"fmt"
"strconv"
)
@graphaelli
graphaelli / it.sh
Created November 16, 2018 20:32
cloud integration tests
#!/bin/bash -ex
if [ -z "$4" ]; then
echo "usage: $0 <cloud_id> <es_pass> <apm_secret_token> <apm_server_url>"
exit 1
fi
CLOUD_ID=$1
ES_PASS=$2
APM_SECRET_TOKEN=$3
#!/usr/bin/env python
import json
import requests
def main():
rsp = requests.get("http://localhost:9200/.monitoring-beats*/_search?sort=timestamp:desc", headers={"Accept": "application/json"})
rsp.raise_for_status()
hits = rsp.json()['hits']['hits']