There's so many way to send logs to an elk... logspout, filebeat, journalbeat, etc.
But docker has a gelf log driver and logstash a gelf input. So here we are.
Here is a docker-compose to test a full elk with a container sending logs via gelf.
There's so many way to send logs to an elk... logspout, filebeat, journalbeat, etc.
But docker has a gelf log driver and logstash a gelf input. So here we are.
Here is a docker-compose to test a full elk with a container sending logs via gelf.
setInterval (() => { | |
if(this.locker.promises.size === 0) { | |
process.exit(0); // code exit 0 not to re-create worker | |
} | |
}, 100); | |
// force kill process | |
setTimeout(() => { | |
process.exit(0); | |
}, 3000); |
jQuery.fn.extend({ | |
getPath: function() { | |
var pathes = []; | |
this.each(function(index, element) { | |
var path, $node = jQuery(element); | |
while ($node.length) { | |
var realNode = $node.get(0), name = realNode.localName; | |
if (!name) { break; } |
jQuery.fn.extend({ | |
getPath: function () { | |
let path, node = this; | |
while (node.length) { | |
let realNode = node[0], name = realNode.localName; | |
if (!name) break; | |
name = name.toLowerCase(); | |
let parent = node.parent(); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
var Base64 = { | |
characters: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" , | |
encode: function( string ) | |
{ | |
var characters = Base64.characters; | |
var result = ''; | |
var i = 0; | |
do { |
[ | |
{rabbit, [ | |
%% snip... | |
]}, | |
{rabbitmq_shovel, [ | |
{shovels, [ | |
{'MUTHA-SHOVELER', [ | |
{sources, [ | |
{broker, "amqp://"} |
{rabbit_shovel, [ | |
{shovels, [ | |
{my_first_shovel, [ | |
{sources, [ | |
{brokers, ["amqp://user:pwd@host1/vhost"]}, | |
{declarations, [ | |
{'exchange.declare', [{exchange, <<"source_exchange">>}, {type, <<"direct">>}, durable]} | |
{'queue.declare', [{queue, <<"source_queue">>}, durable]}, | |
{'queue.bind', [{exchange, <<"source_exchange">>}, {queue, <<"source_queue">>}]} | |
]} |
'use strict'; | |
const winston = require('winston'); | |
// | |
// Or use `Symbol.for` instead of `triple-beam`: | |
// - const LEVEL = Symbol.for('level'); | |
// - const MESSAGE = Symbol.for('message'); | |
// | |
const { LEVEL, MESSAGE } = require('triple-beam'); |
// NOTE: this adds a filename and line number to winston's output | |
// Example output: 'info (routes/index.js:34) GET 200 /index' | |
var winston = require('winston') | |
var path = require('path') | |
var PROJECT_ROOT = path.join(__dirname, '..') | |
var logger = new winston.logger({ ... }) | |
// this allows winston to handle output from express' morgan middleware |