Skip to content

Instantly share code, notes, and snippets.

Avatar

Aaron Mildenstein untergeek

View GitHub Profile
View utilSinceDB.sh
#!/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"
View elasticsearch.yml
indices.memory.index_buffer_size: 15%
cluster.name: untergeek
node.name: "NotSony"
discovery.zen.minimum_master_nodes: 2
discovery.zen.ping.timeout: 10s
View osx_automount_nfs.md

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
Logstash IRC input for #logstash
View logstash_irc.conf
input {
irc {
channels => [ "#logstash" ]
host => "irc.freenode.org"
nick => "arbitrary_bot_name"
port => 6667
type => "irc"
}
}
@untergeek
untergeek / curator.log
Last active Aug 29, 2015
curator snapshot functionality...
View curator.log
$ ./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
View command-line.help
$ 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 Jul 15, 2014
Curator with python strftime datestamp support
View a.txt
buh@BigMini (06:12 PM) [~/GIT/curator/curator] $ curl -XPUT 'http://localhost:9200/logstash-20140710/'
{"acknowledged":true}
@untergeek
untergeek / logstash.conf
Created Jul 17, 2014
grok rule oddity...
View logstash.conf
input {
stdin {
type => "weblogic-server"
}
}
filter {
### weblogic-server
if [type] == "weblogic-server" {
multiline {
@untergeek
untergeek / b.conf
Last active Aug 29, 2015
Grok debug
View b.conf
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 {
View collectd-logstash.conf
output {
stdout { debug => true debug_format => "json"}
if [type] == 'collectd' {
elasticsearch {
cluster => "elasticsearch"
}
}
}