Skip to content

Instantly share code, notes, and snippets.

View bg1bgst333's full-sized avatar
😐

B.G bg1bgst333

😐
View GitHub Profile
@bg1bgst333
bg1bgst333 / CoffeeMaker.java
Created May 18, 2020 16:15
annotationModule#annotationModule
package com.bgstation0.dagger.sample.am_;
import javax.inject.Inject;
// コーヒーメーカー
public class CoffeeMaker {
// メンバフィールドの定義
@Inject Heater1 heater;
@Inject PumpBase pump;
@shreyaskarnik
shreyaskarnik / Instructions.md
Last active March 24, 2023 15:35
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