Skip to content

Instantly share code, notes, and snippets.

View dpaccoud's full-sized avatar

David Paccoud dpaccoud

View GitHub Profile
@dpaccoud
dpaccoud / Instructions.md
Created December 28, 2017 00:42 — forked from shreyaskarnik/Instructions.md
Route Docker Logs to ELK Stack
  • With Docker 1.8.0 shipped new log-driver for GELF via UDP, this means that the logs from Docker Container(s) can be shipped directly to the ELK stack for further analysis.
  • This tutorial will illustrate how to use the GELF log-driver with Docker engine.
  • Step 1: Setup ELK Stack:
    • docker run -d --name es elasticsearch
    • docker run -d --name logstash --link es:elasticsearch logstash -v /tmp/logstash.conf:/config-dir/logstash.conf logstash logstash -f /config-dir/logstash.conf
    • Note the config for Logstash can be found at this link
    • docker run --link es:elasticsearch -d kibana
  • Once the ELK stack is up now let's fire up our nginx container which ships its logs to ELK stack.
  • LOGSTASH_ADDRESS=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' logstash)
  • `docker run -d --net=host --log-driver=gelf --log-opt gelf-address=u

Keybase proof

I hereby claim:

  • I am dpaccoud on github.
  • I am d10d (https://keybase.io/d10d) on keybase.
  • I have a public key ASA6ROlN1UytVOyBmFh4Vc0g52lOiH8IHi-N5yXjvdT6kgo

To claim this, I am signing this object:

@dpaccoud
dpaccoud / links.md
Created December 20, 2016 12:29 — forked from g0t4/links.md
Starting Point Files for Jenkins2 Getting Started course
@dpaccoud
dpaccoud / introrx.md
Created January 25, 2016 00:42 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
'''
redis_search.py
Written by Josiah Carlson July 3, 2010
Released into the public domain.
This module implements a simple TF/IDF indexing and search algorithm using
/* Use this to cause a function to fire no more than once every 'ms' milliseconds.
For example, an expensive mousemove handler:
$('body').mouseover(ratelimit(function(ev) {
// ...
}, 250));
*/
function ratelimit(fn, ms) {
var last = (new Date()).getTime();
@dpaccoud
dpaccoud / fabfile.py
Created January 27, 2010 23:17 — forked from heckj/fabfile.py
#!/usr/bin/env python
from __future__ import with_statement # needed for python 2.5
from fabric.api import *
from fabric.contrib.console import confirm
# ================================================================
# NOTE:
# using this fabfile expects that you have the python utility
# fabric installed locally, ssh access to reamea.com, and your
# ssh public key associated with the account 'mboza@reamea.com'
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
fabfile for Django
------------------
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle)
several additions, corrections and customizations, too
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.
=============================================================
Installing Multicore Solr 1.3.0 / Tomcat 6.0.X on Ubuntu 8.10
=============================================================
Install OpenJDK (comes from universe)::
aptitude install openjdk-6-jre
Download Tomcat 6.X and move it in place::