This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request | |
from sdcclient import SdcClient | |
import json, os | |
app = Flask(__name__) | |
sdclient = SdcClient(os.environ['SYSDIG_API_KEY']) | |
@app.route('/', methods=['POST']) | |
def handle_alert(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import yaml | |
import sys | |
import collections | |
from collections import OrderedDict as OD | |
def dict_representer(dumper, data): | |
return dumper.represent_dict(data.iteritems()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- podname: etcd | |
proc: [etcd] | |
write_dir: [/var/lib/etcd] | |
outbound_proc: [etcd] | |
listen_proc: [etcd] | |
- podname: kube_apiserver | |
proc: [kube-apiserver] | |
write_dir: false | |
outbound_proc: [kube-apiserver] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from prometheus_client import start_http_server, Histogram | |
import random | |
import time | |
function_exec = Histogram('function_exec_time', | |
'Time spent processing a function', | |
['func_name']) | |
def func1(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'), | |
async = require('async'), | |
pg = require("pg"), | |
cookieParser = require('cookie-parser'), | |
bodyParser = require('body-parser'), | |
methodOverride = require('method-override'), | |
app = express(), | |
server = require('http').Server(app), | |
io = require('socket.io')(server); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import time | |
import random | |
import json | |
from kubernetes import client, config, watch | |
from sdcclient import SdcClient | |
config.load_kube_config() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import time | |
import random | |
import json | |
from kubernetes import client, config, watch | |
from sdcclient import SdcClient | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) bt | |
#0 0x00007f842ea770ac in __brk (addr=0x55a5681df000) at ../sysdeps/unix/sysv/linux/x86_64/brk.c:31 | |
#1 0x00007f842ea77146 in __GI___sbrk (increment=135168) at sbrk.c:53 | |
#2 0x00007f842ea147a9 in __GI___default_morecore (increment=<optimized out>) at morecore.c:47 | |
#3 0x00007f842ea10954 in sysmalloc (av=0x7f842ed3b620 <main_arena>, nb=4112) at malloc.c:2462 | |
#4 _int_malloc (av=0x7f842ed3b620 <main_arena>, bytes=4096) at malloc.c:3800 | |
#5 0x00007f842ea12020 in __GI___libc_malloc (bytes=4096) at malloc.c:2891 | |
#6 0x00007f84300bf19b in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3 | |
#7 0x00007f84300dc7ed in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3 | |
#8 0x00007f84300d4a39 in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1409831 20:49:54.464412513 0 s1_php_1 (3257e0a01572) php-fpm (3532:21) > brk addr=556341D6F000 | |
1409832 20:49:54.464416248 0 s1_php_1 (3257e0a01572) php-fpm (3532:21) < brk res=556341D6F000 vm_size=767128 vm_rss=394508 vm_swap=22048 | |
1409855 20:49:54.464470456 0 s1_php_1 (3257e0a01572) php-fpm (3532:21) > mmap addr=0 length=264 prot=1(PROT_READ) flags=1(MAP_SHARED) fd=9(<f>/var/www/html/wp-content/plugins/bj-lazy-load/inc/compat/opera-mini.php) offset=0 | |
1409856 20:49:54.464473864 0 s1_php_1 (3257e0a01572) php-fpm (3532:21) < mmap res=7FF9E2A3D000 vm_size=767132 vm_rss=394508 vm_swap=22048 | |
1409891 20:49:54.464538246 0 s1_php_1 (3257e0a01572) php-fpm (3532:21) > mmap addr=0 length=245 prot=1(PROT_READ) flags=1(MAP_SHARED) fd=9(<f>/var/www/html/wp-content/plugins/bj-lazy-load/inc/compat/wp-print.php) offset=0 | |
1409892 20:49:54.464540660 0 s1_php_1 (3257e0a01572) php-fpm (3532:21) < mmap res=7FF9E2A3D000 vm_size=767132 vm_rss=394512 vm_swap=22048 | |
1409925 20:49:54.464585580 0 s1_php_1 (3257e0a01572) php-fpm (3532:21) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----- Write 58B to pipe:[3992672] (php-fpm) | |
127.0.0.1 - 19/Aug/2017:22:23:12 +0000 "GET /status" 404 | |
------ Write 168B to 127.0.0.1:35264->127.0.0.1:9000 (php-fpm) | |
Primary script unknown | |
kStatus: 404 Not Found | |
X-Powered-By: PHP | |
------ Read 8B from 127.0.0.1:35264->127.0.0.1:9000 (php-fpm) | |
------ Read 8B from 127.0.0.1:35264->127.0.0.1:9000 (php-fpm) | |
------ Read 8B from 127.0.0.1:35266->127.0.0.1:9000 (php-fpm) |