Skip to content

Instantly share code, notes, and snippets.

View toast38coza's full-sized avatar

Christo Crampton toast38coza

View GitHub Profile
@toast38coza
toast38coza / docker-compose-postgres.yml
Last active January 6, 2018 21:44
Docker-compose files for Kong
version: "2"
services:
postgres:
image: postgres:9.4
container_name: kong-database
ports:
- "5432:5432"
environment:
- POSTGRES_USER=kong
version: "2"
services:
cache:
image: redis
registry:
image: registry
ports:
- '5000:5000'
@toast38coza
toast38coza / trigger_jenkins_parameterized_build
Created March 21, 2016 20:36
Curl to trigger a parameterized build
curl -X POST -u username:password \
-d "foo=bar&baz=bus&etc=etc" \
http://jenkinsserver:8080/job/JobName/buildWithParameters
## replace JobName with the name of your job
@toast38coza
toast38coza / filebeat.yml
Created March 16, 2016 06:26
Sending filebeats to logstash
# this goes on the server with the logs
filebeat:
prospectors:
-
paths:
- "/var/log/nginx/*"
document_type: nginx-logs
registry_file: "/var/log/beat.log"
output:
logstash:
@toast38coza
toast38coza / logstash_outputs_example.conf
Created March 15, 2016 17:52
Push outputs to elasticsearch and hipchat
input {
stdin { }
}
output {
elasticsearch {
hosts => "elasticsearch:9200"
}
hipchat {
input {
tcp {
port => 5000
}
http {
port => 8201
type => webhooks
}
beats {
port => 5044
@toast38coza
toast38coza / logstash_nginx_filter.conf
Last active March 15, 2016 16:49
Logstash config for parsing incoming nginx logs
input {
stdin { }
beats {
port => 5044
type => nginx
}
}
filter {
@toast38coza
toast38coza / logstash_custom_filter.conf
Last active March 15, 2016 15:08
An example of creating a custom filter to parse a log file that is not in a standardized format
input {
stdin { }
}
filter {
grok {
match => { "message" => "%{DATE:date}[- ]%{TIME:time} - %{WORD:status}: %{GREEDYDATA:state}"}
}
@toast38coza
toast38coza / logstash_simplest_example.conf
Created March 15, 2016 07:11
The simplest configuration for testing logstash filters
input{ stdin { } }
output { stdout { codec => rubydebug } }
@toast38coza
toast38coza / docker.yml
Created February 25, 2016 08:10
Ansible playbook to install docker toolbox on Ubuntu 14.04
---
- hosts: localhost
tasks:
- name: Update apt
apt:
update_cache: yes
become: yes
become_user: root
become_method: sudo