Skip to content

Instantly share code, notes, and snippets.

💭
Enjoying the ride

Felippe da Motta Raposo felippemr

💭
Enjoying the ride
Block or report user

Report or block felippemr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@felippemr
felippemr / simple_health_check.py
Created Aug 11, 2016
A simple health check class which stores result on redis
View simple_health_check.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging
from contextlib import contextmanager
LOG = logging.getLogger(__name__)
class HealthCheckError(Exception):
@felippemr
felippemr / LICENSE
Created Apr 19, 2016 — forked from mepcotterell/LICENSE
Simple Python Plugin Manager
View LICENSE
The MIT License (MIT)
Copyright (c) 2013 Michael E. Cotterell
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:
View error copy plugin
2016-02-16 12:46:25 -0200 [info]: adding source type="dstat"
2016-02-16 12:46:25 -0200 [info]: adding source type="serverstatus"
2016-02-16 12:46:26 -0200 [info]: adding source type="df"
2016-02-16 12:46:26 -0200 [info]: adding match pattern="dstat.reformer" type="copy"
2016-02-16 12:46:26 -0200 [info]: adding match pattern="dstat.**" type="copy"
2016-02-16 12:46:26 -0200 [info]: adding match pattern="serverstatus.reformer" type="copy"
2016-02-16 12:46:26 -0200 [info]: adding match pattern="serverstatus.**" type="copy"
2016-02-16 12:46:26 -0200 [info]: adding match pattern="df.reformer" type="copy"
2016-02-16 12:46:26 -0200 [info]: adding match pattern="df.**" type="copy"
2016-02-16 12:46:26 -0200 [error]: unexpected error error="undefined local variable or method `router' for #<Fluent::DstatInput:0x002aeae61c5f60>"
@felippemr
felippemr / in_serverstatus.rb
Last active Apr 19, 2016 — forked from chrisckchang/in_serverstatus.rb
MongoDB serverStatus output plugin which works with mongoDB 3.0
View in_serverstatus.rb
module Fluent
class ServerStatusInput < Input
Plugin.register_input('serverstatus', self)
config_param :uris, :array, :default => nil
config_param :uri, :string
config_param :stats_interval, :time, :default => 60 # every minute
config_param :tag_prefix, :string, :default => "serverstatus"
def initialize
View stack_trace
2016-02-16 11:13:25 -0200 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluent-plugin-statsd-1.0.3/lib/fluent/plugin/out_statsd.rb:31:in `to_msgpack'
2016-02-16 11:13:25 -0200 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluent-plugin-statsd-1.0.3/lib/fluent/plugin/out_statsd.rb:31:in `format'
2016-02-16 11:13:25 -0200 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.53/lib/fluent/output.rb:255:in `block in format_stream'
2016-02-16 11:13:25 -0200 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.53/lib/fluent/event.rb:55:in `call'
2016-02-16 11:13:25 -0200 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.53/lib/fluent/event.rb:55:in `each'
2016-02-16 11:13:25 -0200 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.53/lib/fluent/output.rb:254:in `format_stream'
2016-02-16 11:13:25 -0200 [warn]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.53/lib/fluent/output.rb:240:in `emit'
2016-02-16 11:13:25
View td-agent.conf
<source>
type dstat
tag dstat
option -cnmlds
delay 1
</source>
<match dstat.reformer>
type copy
<store>
View td-agem-gem-list
*** LOCAL GEMS ***
aws-sdk (1.52.0)
aws-sdk-v1 (1.52.0)
bson (4.0.1, 1.10.2)
bson_ext (1.10.2)
bundler (1.6.6)
cool.io (1.2.4)
diff-lcs (1.2.5)
fluent-logger (0.4.9)
@felippemr
felippemr / cloudstack.js
Last active Aug 29, 2015
Meteor integration with cloudstack
View cloudstack.js
var request = Meteor.npmRequire('request')
, crypto = Meteor.npmRequire('crypto');
cloudstack = function (options) {
if (!options) {
options = {};
}
var apiUri = options.apiUri || process.env.CLOUDSTACK_API_URI
@felippemr
felippemr / redis_info.rb
Created Nov 18, 2014
Redis info output plugin
View redis_info.rb
module Fluent
class RedisInfo < Input
Plugin.register_input('redisinfo', self)
config_param :uri, :string
config_param :stats_interval, :time, :default => 60 # every minute
config_param :tag_prefix, :string, :default => "redisinfo"
def initialize
super
View retries.py
#!/usr/bin/env python
#
# Copyright 2012 by Jeff Laughlin Consulting LLC
#
# 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:
You can’t perform that action at this time.