Skip to content

Instantly share code, notes, and snippets.

View doberloh's full-sized avatar

Dustin Oberloh doberloh

View GitHub Profile
input {
gelf {
type => "lb12202"
port => 12202
}
gelf {
type => "lb12203"
port => 12203
}
gelf {
input {
gelf {
type => "message"
port => 12204
}
gelf {
type => "lb12202"
port => 12202
}
gelf {
{:timestamp=>"2016-02-26T23:06:28.297000+0000",
:message=>"gelf listener died",
:exception=>#<LogStash::Json::ParserError: Invalid UTF-8 start byte 0x9b at [Source: [B@35db01d4; line: 1, column: 281]>,
:backtrace=>["/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/json.rb:41:in `jruby_load'",
"/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/json.rb:38:in `jruby_load'",
"/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-gelf-2.0.2/lib/logstash/inputs/gelf.rb:99:in `udp_listener'",
"/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-gelf-2.0.2/lib/logstash/inputs/gelf.rb:63:in `run'",
"/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/pipeline.rb:331:in `inputworker'",
"/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/pipeline.rb:325:in `start_input'"],
:level=>:warn}
@doberloh
doberloh / example.txt
Created December 2, 2015 21:02
pillar override desired
#top.sls
'*'
- common
'server1'
- overrides
#common
keys:
one: 1
two: 2
resource "aws_db_security_group" "rds_sg" {
description = "${concat("Security group for stack ", var.stack)}"
name = "${concat(var.stack, "-rds-sg")}"
ingress {
security_group_owner_id = "${var.aws_prod_account_id}"
security_group_name = "infra-1-sg"
}
ingress {
security_group_owner_id = "${var.aws_dev_account_id}"
security_group_name = "ElasticMapReduce-master"
@doberloh
doberloh / gist:4aaa7a3a2bc336361669
Created November 21, 2014 01:14
Terraform CIDR problem with aws_db_security_group
My code has a mixture of security groups from two seperate AWS accounts. Plus an ingress with my current IP. I have tried running with and without declaring the cidr ingress. When I run terraform I get this error:
Error applying plan:
1 error(s) occurred:
* 1 error(s) occurred:
* Error authorizing security group ingress: InvalidParameterCombination: Please see the documentation for authorizing DBSecurityGroup ingress. For non-VPC, use EC2SecurityGroupOwner and either EC2SecurityGroupId or EC2SecurityGroupName. To authorize only the source address of this request (and no other address), pass xx.xxx.xxx.xxx/32 as the CIDRIP parameter.
@doberloh
doberloh / gist:c9c141066cb51fdbd779
Created October 29, 2014 19:41
Linode API response data back to uppercase
[{u'DATACENTERID': 2, u'LOCATION': u'Dallas, TX, USA', u'ABBR': u'dallas'}, {u'DATACENTERID': 3, u'LOCATION': u'Fremont, CA, USA', u'ABBR': u'fremont'}, {u'DATACENTERID': 4, u'LOCATION': u'Atlanta, GA, USA', u'ABBR': u'atlanta'}, {u'DATACENTERID': 6, u'LOCATION': u'Newark, NJ, USA', u'ABBR': u'newark'}, {u'DATACENTERID': 7, u'LOCATION': u'London, England, UK', u'ABBR': u'london'}, {u'DATACENTERID': 8, u'LOCATION': u'Tokyo, JP', u'ABBR': u'tokyo'}]
@doberloh
doberloh / gist:b3828b947ef61361cd92
Created October 29, 2014 19:40
Linode API response data mixed case
[{u'DatacenterID': 2, u'Location': u'Dallas, TX, USA', u'abbr': u'dallas'}, {u'DatacenterID': 3, u'Location': u'Fremont, CA, USA', u'abbr': u'fremont'}, {u'DatacenterID': 4, u'Location': u'Atlanta, GA, USA', u'abbr': u'atlanta'}, {u'DatacenterID': 6, u'Location': u'Newark, NJ, USA', u'abbr': u'newark'}, {u'DatacenterID': 7, u'Location': u'London, England, UK', u'abbr': u'london'}, {u'DatacenterID': 8, u'Location': u'Tokyo, JP', u'abbr': u'tokyo'}]