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 an example of the Stack Exchange Tier 1 HAProxy config | |
# The only things that have been changed from what we are running are: | |
# 1. User names have been removed | |
# 2. All Passwords have been remove | |
# 3. IPs have been changed to use the example/documentation ranges | |
# 4. Rate limit numbers have been changed to randome numbers, don't read into them | |
userlist stats-auth | |
group admin users $admin_user | |
user $admin_user insecure-password $some_password |
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
{ | |
"template": "logstash-jmeter-results-*", | |
"settings": { | |
"number_of_shards": 1, | |
"number_of_replicas": 0, | |
"index.refresh_interval": "5s" | |
}, | |
"mappings": { | |
"logs": { | |
"properties": { |
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
public class Reindexer extends BaseElasticsearchUtility { | |
private static Log logger = LogFactory.getLog(Reindexer.class); | |
public static void main(String[] args) { | |
if (args.length != 5) { | |
doUsage(); | |
System.exit(-1); | |
} |
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
jmeter.save.saveservice.output_format=csv | |
jmeter.save.saveservice.data_type=false | |
jmeter.save.saveservice.label=true | |
jmeter.save.saveservice.response_code=true | |
jmeter.save.saveservice.response_data.on_error=false | |
jmeter.save.saveservice.response_message=false | |
jmeter.save.saveservice.successful=true | |
jmeter.save.saveservice.thread_name=true | |
jmeter.save.saveservice.time=true | |
jmeter.save.saveservice.subresults=false |
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 { | |
file { | |
path => [ "/Users/jpotts/Documents/code/es-test/results.csv"] | |
} | |
} | |
filter { | |
if ([message] =~ "responseCode") { | |
drop { } | |
} else { | |
csv { |
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
if [type] == "ufw" { | |
grok { | |
match => { "message" => "%{SYSLOGTIMESTAMP:ufw_timestamp} %{SYSLOGHOST:ufw_hostname} %{DATA:ufw_program}(?:\[%{POSINT:ufw_pid}\])?: %{GREEDYDATA:ufw_message}" } | |
} | |
grok { | |
match => { "ufw_message" => "\[%{DATA}\] \[UFW %{WORD:ufw_action}\] IN=%{DATA:ufw_interface} OUT= MAC=%{DATA:ufw_mac} SRC=%{IP:ufw_src_ip} DST=%{IP:ufw_dest_ip} %{GREEDYDATA:ufw_tcp_opts} PROTO=%{ | |
WORD:ufw_protocol} SPT=%{INT:ufw_src_port} DPT=%{INT:ufw_dst_port} %{GREEDYDATA:ufw_tcp_opts}" | |
} | |
} | |
geoip { source => "ufw_src_ip" } |
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
local path = ngx.var.request:split(" ")[2] -- path | |
local t={} | |
local cjson = require "cjson" | |
local m = ngx.re.match(path,[=[^/sentence/(.+)]=]) | |
local words = m[1]:split("%%20") -- words in the sentence | |
for i,k in pairs(words) do | |
local res_word = ngx.location.capture("/real/".. k ) | |
local value=cjson.new().decode(res_word.body) | |
table.insert(t, value.sentiment) |
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
# tcpdump -A -nn -s 0 'tcp dst port 9200 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' -i lo | |
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode | |
listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes | |
14:32:33.525122 IP 127.0.0.1.49777 > 127.0.0.1.9200: Flags [P.], seq 313752908:313753888, ack 2465010394, win 257, options [nop,nop,TS val 2684167067 ecr 2684167066], length 980 | |
E...^.@[email protected]#...}L............... | |
..#...#.GET /index/_search HTTP/1.1 | |
Host: 127.0.0.1:9200 | |
Accept: */* | |
Content-Length: 845 | |
Content-Type: application/x-www-form-urlencoded |
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
listen l1 0.0.0.0:80 | |
mode tcp | |
clitimeout 180000 | |
srvtimeout 180000 | |
contimeout 4000 | |
server srv1 192.168.1.1:80 | |
global | |
user "username" |
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
mysqldump [database] | pv | gzip -c > [file].sql.gz |
OlderNewer