Skip to content

Instantly share code, notes, and snippets.

View untergeek's full-sized avatar

Aaron Mildenstein untergeek

View GitHub Profile
@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
@untergeek
untergeek / kibana.json
Last active March 27, 2019 01:09
Simple Kibana dashboard for collectd stats
{
"title": "Collectd: Blackbox",
"services": {
"query": {
"list": {
"0": {
"query": "plugin:\"load\"",
"alias": "Load",
"color": "#7EB26D",
"id": 0,
@untergeek
untergeek / logstash-1-collectd.conf
Created May 7, 2014 15:48
Logstash 1.4.1+ Collectd configuration
# This is the simplest definition, with the addition of a type
input {
udp {
port => 25826 # Must be specified. 25826 is the default for collectd
buffer_size => 1452 # Should be specified. 1452 is the default for recent versions of collectd
codec => collectd { } # This will invoke the default options for the codec
type => "collectd"
}
}
@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"
}
}

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

indices.memory.index_buffer_size: 15%
cluster.name: untergeek
node.name: "NotSony"
discovery.zen.minimum_master_nodes: 2
discovery.zen.ping.timeout: 10s
#!/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"
@untergeek
untergeek / event.json
Last active January 1, 2016 16:39
Logstash events...
{
"@version":"1",
"@timestamp":"2013-12-29T15:41:02.123Z",
"host":"host.example.com",
"collectd_type":"df_complex",
"plugin":"df",
"plugin_instance":"Volumes-Time Machine Backups",
"type_instance":"used",
"value":2604146343936.0,
"tags":["collectd"]
@untergeek
untergeek / fix_logstash-1.3.1_template.sh
Created December 18, 2013 20:49
This script will replace the elasticsearch mapping template named "logstash" (see line 3) and replace it with the below template from v1.3.2, which is currently at https://github.com/logstash/logstash/blob/master/lib/logstash/outputs/elasticsearch/elasticsearch-template.json This template will fix the error LOGSTASH-1711 and the "indexed without…
#!/bin/bash
curl -XDELETE http://localhost:9200/_template/logstash?pretty=true
echo
echo "Deleted current logstash template..."
echo "Creating new logstash template..."
sleep 2
@untergeek
untergeek / ls-es-mapping.json
Last active December 31, 2015 12:49
Logstash v1.3.2+ Elasticsearch Mapping Template
{
"template" : "logstash-*",
"settings" : {
"index.refresh_interval" : "5s",
"analysis" : {
"analyzer" : {
"default" : {
"type" : "standard",
"stopwords" : "_none_"
}