This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ruby | |
require "json" | |
PLUGIN_DEFINITIONS = [ | |
#tier1 | |
#inputs | |
"logstash-input-azure_event_hubs", "logstash-input-beats", "logstash-input-elasticsearch", "logstash-input-file", | |
"logstash-input-generator", "logstash-input-heartbeat", "logstash-input-http", "logstash-input-http_poller", | |
"logstash-input-redis", "logstash-input-s3", "logstash-input-stdin", "logstash-input-syslog", "logstash-input-udp", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS io.netty:netty-buffer:4.1.87.Final | |
//DEPS org.apache.logging.log4j:log4j-api:2.17.1 | |
//DEPS org.apache.logging.log4j:log4j-core:2.17.1 | |
// Run limiting the direct memory size with: | |
// jbang -Dlog4j.configurationFile=log4j2.properties -Dio.netty.maxDirectMemory=-1 -Dio.netty.allocator.numDirectArenas=1 -Dio.netty.allocator.numHeapArenas=0 -R-XX:MaxDirectMemorySize=8388608 UnsafeAllocationVsDirectMemory.java | |
import java.util.ArrayList; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///usr/bin/env jbang "$0" "$@" ; exit $? | |
import java.io.FileOutputStream; | |
import java.io.File; | |
/** | |
* Accepts two arguments: | |
* - the target path where to generate the files | |
* - the max DLQ segment id to create | |
* */ | |
public class DLQSegmentCreator { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
# Script to test JDBC input plugin in Logstash environment | |
# | |
# To run, copy script to Logstash folder and run: | |
# | |
# bin/ruby instantiate_jdbc_input.rb | |
################### Setup Logstash and Log4j ################## | |
require_relative "lib/bootstrap/environment" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>commons-codec</groupId> | |
<artifactId>commons-codec</artifactId> | |
<version>1.15</version> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM adoptopenjdk/openjdk16:x86_64-alpine-jdk-16.0.1_9 | |
WORKDIR /root | |
RUN adduser --disabled-password --gecos "" --home /home/logstash logstash && \ | |
mkdir -p /usr/local/share/ruby-build && \ | |
mkdir -p /opt/logstash && \ | |
mkdir -p /opt/logstash/data && \ | |
mkdir -p /mnt/host && \ | |
chown logstash:logstash /opt/logstash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# input sample: {"name": "John", "outer": {"inner": {"leaf_1": "a leaf 1", "leaf_2": "a leaf 2", "leaf_3": "a leaf 3"}}} | |
input { | |
stdin { | |
codec => json | |
} | |
} | |
filter { | |
ruby { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> Task :installDefaultGems FAILED | |
#<Class:0x71bf592a>: Command failed with status (1): [./gradlew assemble...] | |
create_shell_runner at C:/Users/andrea/workspace/logstash/vendor/bundle/jruby/2.5.0/gems/rake-12.3.3/lib/rake/file_utils.rb:67 | |
sh at C:/Users/andrea/workspace/logstash/vendor/bundle/jruby/2.5.0/gems/rake-12.3.3/lib/rake/file_utils.rb:57 | |
<main> at C:/Users/andrea/workspace/logstash/rakelib/compile.rake:34 | |
execute at C:/Users/andrea/workspace/logstash/vendor/bundle/jruby/2.5.0/gems/rake-12.3.3/lib/rake/task.rb:273 | |
each at org/jruby/RubyArray.java:1820 | |
execute at C:/Users/andrea/workspace/logstash/vendor/bundle/jruby/2.5.0/gems/rake-12.3.3/lib/rake/task.rb:273 | |
invoke_with_call_chain at C:/Users/andrea/workspace/logstash/vendor/bundle/jruby/2.5.0/gems/rake-12.3.3/lib/rake/task.rb:214 | |
mon_synchronize at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/monitor.rb:237 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#run dockerized RabbitMQ | |
# docker run -v rabbitmq-data:/var/lib/rabbitmq --hostname my-rabbit --name rabbit_dev -p 15672:15672 -p 5672:5672 rabbitmq:3-management | |
# navigate to http://localhost:15672/#/queues | |
# login guest:guest | |
require 'march_hare' | |
conn = MarchHare.connect(:host => "localhost") | |
ch = conn.create_channel | |
exchange = ch.direct("sysmsg", :durable => true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
class CheckpointDecoder | |
attr_reader :path | |
def initialize(path) | |
@path = path | |
end | |
NewerOlder