Skip to content

Instantly share code, notes, and snippets.

@smetj
smetj / gist:6228583
Created August 14, 2013 06:50
Compare the init speed between a class and dict for packet representation: https://github.com/smetj/experiments/blob/master/python/testlap/compare_mqtt_packet_class_vs_dict.py
[smetj@indigo testlap]$ python compare_mqtt_packet_class_vs_dict.py
Running test_1
OK
Running test_2
OK
2.7.5 (default, Jul 8 2013, 09:48:59)
[GCC 4.8.1 20130603 (Red Hat 4.8.1-1)]
Linux-3.10.5-201.fc19.x86_64-x86_64-with-fedora-19-Schrödinger’s_Cat
Figure out the init speed impact of using a class VS dict as incoming packet representation.
@smetj
smetj / test_wb_input_tcp.yaml
Created September 13, 2013 15:49
Support for SO_REUSEPORT in Wishbone
(pypy)[smetj@indigo wishbone-0.4]$ wishbone debug --config test_wb_input_tcp.yaml --instances 4
2013-09-13T17:44:58 pid-11068 informational loglevelfilter: Initiated
2013-09-13T17:44:58 pid-11068 informational loglevelfilter: Initiated
2013-09-13T17:44:58 pid-11068 informational loglevelfilter: Started
2013-09-13T17:44:58 pid-11067 informational loglevelfilter: Initiated
2013-09-13T17:44:58 pid-11067 informational loglevelfilter: Initiated
2013-09-13T17:44:58 pid-11067 informational loglevelfilter: Started
2013-09-13T17:44:58 pid-11066 informational loglevelfilter: Initiated
2013-09-13T17:44:58 pid-11066 informational loglevelfilter: Initiated
2013-09-13T17:44:58 pid-11066 informational loglevelfilter: Started
@smetj
smetj / gist:7554048
Last active December 28, 2015 19:59
Fetch RabbitMQ metrics with Metricfactory (https://github.com/smetj/metricfactory) and submit them to Graphite
---
modules:
httprequest:
module: wishbone.input.httprequest
arguments:
url:
- http://rabbitmq:15672/api/nodes
- http://rabbitmq:15672/api/queues
- http://rabbitmq:15672/api/exchanges
interval: 1
@smetj
smetj / gist:8442323
Created January 15, 2014 19:08
Elasticsearch response of /_status
{
"ok": true,
"_shards": {
"total": 106,
"successful": 27,
"failed": 79,
"failures": [
{
"index": "logstash-2014.01.06",
"shard": 0,
@smetj
smetj / gist:8442454
Created January 15, 2014 19:15
ES log
[2014-01-15 18:24:51,687][DEBUG][action.admin.indices.status] [xxxx-xxxxxx-logs-201] [logstash-2014.01.09][3], node[LA6ZGyvjRdOcz3m0xPUXhQ], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.admin.indices.status.IndicesStatusRequest@7a62693d]
org.elasticsearch.transport.NodeDisconnectedException: [xxxx-xxxxxx-logs-004][inet[/xxx.xx.xxx.5:9300]][indices/status/s] disconnected
[2014-01-15 18:24:51,687][DEBUG][action.admin.indices.status] [xxxx-xxxxxx-logs-201] [logstash-2014.01.08][0], node[LA6ZGyvjRdOcz3m0xPUXhQ], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.admin.indices.status.IndicesStatusRequest@7a62693d]
org.elasticsearch.transport.NodeDisconnectedException: [xxxx-xxxxxx-logs-004][inet[/xxx.xx.xxx.5:9300]][indices/status/s] disconnected
[2014-01-15 18:24:51,687][DEBUG][action.admin.indices.status] [xxxx-xxxxxx-logs-201] [logstash-2013.12.20][0], node[LA6ZGyvjRdOcz3m0xPUXhQ], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.admin.indices.status.IndicesStatusRequest@7a
@smetj
smetj / gist:fa2162211d44c25492e0
Created October 10, 2014 09:10
Puppet template of Wishbone bootstrap file to write Nagios metrics to Graphite
---
modules:
gearmand:
module: wishbone.input.gearman
arguments:
hostlist:
- <%= @gearman_server %>
secret: <%= @gearman_secret %>
queue: perfdata
workers: 5
@smetj
smetj / wishbone_boostrap
Created December 1, 2014 23:29
wishbone static, dynamic and header lookups bootstrap example
---
lookups:
random:
module: wishbone.lookup.randomdata
modules:
static:
module: wishbone.input.testevent
arguments:
(pypy-2.4.0)[smetj@indigo ~]$ wishbone list
__ __ __
.--.--.--|__.-----| |--| |--.-----.-----.-----.
| | | | |__ --| | _ | _ | | -__|
|________|__|_____|__|__|_____|_____|__|__|_____|
version 1.1.0
Build event pipeline servers with minimal effort.
Available modules:
@smetj
smetj / gist:35de6f23970ec07b11c6
Created September 27, 2015 19:48
Wishbone etcd lookups
---
lookups:
etcd:
module: wishbone.lookup.etcd
modules:
input:
module: wishbone.input.httpserver
output:
@smetj
smetj / boostrap.yaml
Last active February 15, 2016 16:17
Wishbone bootstrap file stress test
---
modules:
generator:
module: wishbone.input.dictgenerator
arguments:
keys:
- zero
- one
- two
- three