Skip to content

Instantly share code, notes, and snippets.

View hugespoon's full-sized avatar

Joseph Martin hugespoon

View GitHub Profile
@hugespoon
hugespoon / logstash.conf
Created April 17, 2013 19:46
This is my logstash configuration, and it does not seem to be sending data to statsd running on the remote host and now elasticsearch seems to be flaking because of it.
input {
file {
path => "/data/device_logs/*/*.log"
type => syslog
}
}
filter {
# Check if syslog message has PRI using grep. If so then :
@hugespoon
hugespoon / gist:5407221
Created April 17, 2013 19:51
Kibana timeout errors when statsd output is enabled
Timeout::Error - Timeout::Error:
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:146:in `rescue in rbuf_fill'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:140:in `rbuf_fill'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:132:in `readline'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:2562:in `read_status_line'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:2551:in `read_new'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:1319:in `block in transport_request'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:1316:in `catch'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request'
@hugespoon
hugespoon / gist:5447533
Created April 23, 2013 21:25
Logstash CentOS package installation failure
# yum install logstash-1.1.11.dev-1_centos.noarch.rpm
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.steadfast.net
* extras: mirror.wiredtree.com
* updates: mirror.wiredtree.com
base | 3.7 kB 00:00
extras | 3.5 kB 00:00
updates | 3.5 kB 00:00
updates/primary_db
@hugespoon
hugespoon / gist:5492223
Created April 30, 2013 21:52
Basic statsd output configurations
filters {
# basic syslog filters here
metrics {
type => "generated"
meter => "%{source_host}"
add_tag => "metric"
}
grok {
type => "syslog"
pattern => [ "%{SYSLOGBASE} Failed password for %{USERNAME:user} from %{IPORHOST:host} port %{POSINT:port} %{WORD:protocol}" ]
add_tags => [ "ssh", "grokked", "auth_failure" ]
}
ERROR
{:timestamp=>"2013-05-01T09:17:07.306000-0500", :message=>"Invalid setting for grok filter plugin:\n\n filter {\n grok {\n # This setting must be a string\n # Expected string, got [\"ssh\", \"grokked\", \"auth_failure\"]\n add_tags => [\"ssh\", \"grokked\", \"auth_failure\"]\n ...\n }\n }", :level=>:error}
@hugespoon
hugespoon / indexer.conf
Created May 1, 2013 19:47
Indexer.conf
input {
redis {
host => "127.0.0.1"
type => "redis-input"
# these settings should match the output of the agent
data_type => "list"
key => "logstash"
# We use json_event here since the sender is a logstash agent
format => "json_event"
case node['platform_family']
when "rhel"
if node['platform_version'].to_i >= 6 then
puts node['platform_version']
end
end
@hugespoon
hugespoon / gist:5639280
Created May 23, 2013 20:42
XML being returned from my node resource chef-rundeck with HOSTNAME substituted in
<node name="HOSTNAME"
type="Node"
description="HOSTNAME"
osArch="x86_64"
osFamily="unix"
osName="centos"
osVersion="6.4"
tags="_default,percona_server"
username="${job.username}"
hostname="HOSTNAME"
@hugespoon
hugespoon / gist:5877323
Created June 27, 2013 15:16
Openstack dhcp-agent.log
2013-06-27 10:15:44 INFO [quantum.agent.dhcp_agent] Synchronizing state
2013-06-27 10:15:45 ERROR [quantum.agent.dhcp_agent] Unable to enable dhcp.
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/quantum/agent/dhcp_agent.py", line 131, in call_driver
getattr(driver, action)()
File "/usr/lib/python2.6/site-packages/quantum/agent/linux/dhcp.py", line 124, in enable
reuse_existing=True)
File "/usr/lib/python2.6/site-packages/quantum/agent/dhcp_agent.py", line 554, in setup
namespace=namespace)
File "/usr/lib/python2.6/site-packages/quantum/agent/linux/interface.py", line 190, in plug
# ovs-vsctl show
0ba8905d-1951-4957-aec1-fe3259eadfc1
Bridge br-ex
Port br-ex
Interface br-ex
type: internal
Bridge br-int
Port br-int
Interface br-int
type: internal