View synthetics-project-with-http-req.ts
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
import { journey, step, monitor, expect } from '@elastic/synthetics'; | |
import { request } from 'playwright-core' | |
journey('My Example Journey', ({ page, params, context }) => { | |
// Only relevant for the push command to create | |
// monitors in Kibana | |
monitor.use({ | |
id: 'example-monitor', |
View gist:54b54193fb7c69e75281c3b88d4e6f1c
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
# Follow the instructions on https://www.stereolabs.com/docs/docker/building-arm-container-on-x86/ | |
Then run | |
docker run --rm -it --user root --platform linux/arm64/v8 --entrypoint=/bin/bash -i docker.elastic.co/beats/elastic-agent:7.15.0-arm64 |
View wsl2net-fix.ps1
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
# Attempt to fix broken network in WSL2.0 | |
$guest_ip = bash -c "/sbin/ifconfig eth0 | egrep -o 'inet [0-9\.]+' | cut -d ' ' -f2" | |
Write-Output "Guest IP IS: $guest_ip" | |
$gateway_ips = Get-NetIPAddress -InterfaceAlias "vEthernet (WSL)" | select IPAddress | |
$gateway_ip = $gateway_ips[1].IPAddress | |
Write-Output "Gateway (local WSL adapter) IP is: $gateway_ip" | |
bash -c "sudo ifconfig eth0 netmask 255.255.240.0" | |
bash -c "sudo ip route add default via $gateway_ip" |
View gist:6b13148b3c94c2832afa7ef90955f5c7
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
filter { | |
ruby { | |
code => "io = StringIO.new(event.get('message')); enum = io.each_line; enum.next; event.set('mydate', enum.next); io.close" | |
} | |
} |
View jexec.rb
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 | |
require './logstash-core/build/libs/logstash-core-6.0.0-beta1.jar' | |
ITERATIONS = 50_000_000 | |
class InterfaceTest | |
include java.lang.Runnable | |
def initialize | |
@i = 1 | |
end |
View gist:aec2ad986eceb0af9196be59e80c9b24
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
* Batch block | |
* Exceptions on add_tag |
View mini_filter.rb
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
define_filter :keymapper do | |
process do |event| | |
keys = event.get('[keys]') | |
vals = event.get('[vals]') | |
next unless keys && vals && !keys.empty? && !vals.empty? | |
keys.each.with_index do |key,i| | |
event.set(key, vals[i]) | |
end | |
View nginx_forward_proxy.conf
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
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
#include mime.types; | |
default_type application/octet-stream; |
View healthy-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
2016-11-01 16:46:14 | |
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.51-b03 mixed mode): | |
"pool-4-thread-18" #65 prio=5 os_prio=31 tid=0x00007fd5f58bd800 nid=0xbf03 waiting on condition [0x0000700016b07000] | |
java.lang.Thread.State: WAITING (parking) | |
at sun.misc.Unsafe.park(Native Method) | |
- parking to wait for <0x0000000784a48240> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) | |
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) | |
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) |
View Gemfile
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
# This is a Logstash generated Gemfile. | |
# If you modify this file manually all comments and formatting will be lost. | |
source "https://rubygems.org" | |
gem "logstash-core", "2.4.0" | |
gem "logstash-core-event", "2.4.0" | |
gem "logstash-core-plugin-api", "1.60.4" | |
gem "file-dependencies", "0.1.6" | |
gem "ci_reporter_rspec", "1.0.0", :group => :development | |
gem "simplecov", :group => :development |
NewerOlder