Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View untergeek's full-sized avatar

Aaron Mildenstein untergeek

View GitHub Profile
#!/bin/bash
#
#
# Usage
# This script do nothing, it juste show files that are scanned or not by
# Logstash and plugin File. 3 outputs
#
# ./utilSinceDB.sh
# ./utilSinceDB.sh | grep "not found in sincedb"
# ./utilSinceDB.sh | grep "to delete"
indices.memory.index_buffer_size: 15%
cluster.name: untergeek
node.name: "NotSony"
discovery.zen.minimum_master_nodes: 2
discovery.zen.ping.timeout: 10s

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#

+auto_master # Use directory service

@untergeek
untergeek / logstash_irc.conf
Created May 2, 2014 17:47
Logstash IRC input for #logstash
input {
irc {
channels => [ "#logstash" ]
host => "irc.freenode.org"
nick => "arbitrary_bot_name"
port => 6667
type => "irc"
}
}
@untergeek
untergeek / curator.log
Last active August 29, 2015 14:01
curator snapshot functionality...
$ ./curator.py --host blackbox --timeout 3600 --repository CuratorTest --create-repo --location "/Volumes/Repositories/CuratorTest" --snap-older 2
2014-05-21T19:16:29.800 INFO main:580 Job starting...
2014-05-21T19:16:29.800 INFO _new_conn:257 Starting new HTTP connection (1): blackbox
2014-05-21T19:16:29.806 INFO log_request_success:49 GET http://blackbox:9200/ [status:200 request:0.005s]
2014-05-21T19:16:29.806 INFO main:609 Creating repository CuratorTest...
2014-05-21T19:16:29.809 WARNING log_request_fail:68 GET /_snapshot/CuratorTest [status:404 request:0.003s]
2014-05-21T19:16:29.809 INFO log_request_fail:70 > None
2014-05-21T19:16:29.809 INFO _get_repository:376 Repository CuratorTest not found
2014-05-21T19:16:29.857 INFO log_request_success:49 PUT http://blackbox:9200/_snapshot/CuratorTest [status:200 request:0.047s]
2014-05-21T19:16:29.857 INFO _create_repository:393 R
$ python test.py --help
usage: test.py [-h] [-v] [--host HOST] [--url_prefix URL_PREFIX] [--port PORT]
[--ssl] [-t TIMEOUT] [-n] [-D] [--loglevel LOG_LEVEL]
[-l LOG_FILE]
{allocation,bloom,close,delete,optimize,show_indices,snapshot}
...
Curator for Elasticsearch indices. See
http://github.com/elasticsearch/curator/wiki
@untergeek
untergeek / a.txt
Created July 15, 2014 23:14
Curator with python strftime datestamp support
buh@BigMini (06:12 PM) [~/GIT/curator/curator] $ curl -XPUT 'http://localhost:9200/logstash-20140710/'
{"acknowledged":true}
@untergeek
untergeek / logstash.conf
Created July 17, 2014 20:59
grok rule oddity...
input {
stdin {
type => "weblogic-server"
}
}
filter {
### weblogic-server
if [type] == "weblogic-server" {
multiline {
@untergeek
untergeek / b.conf
Last active August 29, 2015 14:04
Grok debug
input { stdin {} }
filter {
grok {
match => [ "message", "\[%{RUBY_LOGLEVEL:loglevel}\] %{TIMESTAMP_ISO8601:logdate} %{ISO8601_TIMEZONE:timezone} \[%{NOTSPACE:somefield}\] \[%{IP:ipaddress}\] %{GREEDYDATA:therest}" ]
}
mutate {
gsub => [ "logdate", "\ ", "T" ]
replace => { "logdate" => "%{logdate}%{timezone}" }
}
date {
@untergeek
untergeek / collectd-logstash.conf
Created July 21, 2014 17:30
conditional output
output {
stdout { debug => true debug_format => "json"}
if [type] == 'collectd' {
elasticsearch {
cluster => "elasticsearch"
}
}
}