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
package main | |
import ( | |
"fmt" | |
"log" | |
"bytes" | |
"strings" | |
"flag" | |
"sort" | |
"os/exec" |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"bytes" | |
"strings" | |
"flag" | |
"sort" | |
"os/exec" |
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
{ | |
"network": { | |
"servers": [ "{{logstash_elasticsearch_host }}:{{ logstash_listen_port_tcp }}" ], | |
"ssl ca": "{{ logstash_forwarder_etc_dir }}/{{ ssl_cert }}", "timeout": 15 | |
}, | |
"files": [ | |
{ | |
"paths": [ | |
"/var/log/syslog", | |
"/var/log/*.log" |
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 { | |
lumberjack { | |
port => 5000 | |
type => "logs" | |
ssl_certificate => "/etc/pki/logstash/my_wildcard.crt" | |
ssl_key => "/etc/pki/logstash/my_wildcard.key" | |
} | |
} | |
filter { | |
if ([message] =~ /ping/) { |
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 { | |
grok { | |
add_tag => [ "valid" ] | |
match => { "message" => "%{APPLOGLINE}" } | |
} | |
json { | |
source => "payload" | |
} | |
if "valid" not in [tags] { | |
drop { } |
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
function connect_server() | |
for i = 1, #proxy.global.backends do | |
local s = proxy.global.backends[i] | |
if s.state ~= proxy.BACKEND_STATE_DOWN then | |
proxy.connection.backend_ndx = i | |
-- print ("connecting to " .. i) | |
return | |
end | |
end |
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
$ cat templatize.py | |
def templatize(*args): | |
"""A small utility function for printing values in columns of fixed width | |
* the width is hardcoded as 20 in this case""" | |
format_string = "" | |
i = 0 | |
for arg in args: | |
format_string += "{%d:>20}" % i | |
i += 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
#!/bin/sh | |
# | |
# init.d script with LSB support. | |
# | |
# Copyright (c) 2007 Javier Fernandez-Sanguino <jfs@debian.org> | |
# | |
# This is free software; you may redistribute it and/or modify | |
# it under the terms of the GNU General Public License as | |
# published by the Free Software Foundation; either version 2, | |
# or (at your option) any later version. |
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/sh | |
# | |
# init.d script with LSB support. | |
# | |
# Copyright (c) 2007 Javier Fernandez-Sanguino <jfs@debian.org> | |
# | |
# This is free software; you may redistribute it and/or modify | |
# it under the terms of the GNU General Public License as | |
# published by the Free Software Foundation; either version 2, | |
# or (at your option) any later version. |
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
[xcache-common] | |
extension = xcache.so | |
[xcache.admin] | |
xcache.admin.user = "xc" | |
; xcache.admin.pass = md5($your_password) | |
xcache.admin.pass = "" | |
[xcache] | |
; ini only settings, all the values here is default unless explained | |
; select low level shm/allocator scheme implemenation | |
xcache.shm_scheme = "mmap" |
OlderNewer