This file contains hidden or 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
# See http://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/ | |
# for more color options etc | |
# For git dirty state and branch | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
} | |
#export PS1='\u@\h \[\033[1;33m\]\w\[\033[0m\]$(parse_git_branch)$ ' |
This file contains hidden or 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
# Run me with: | |
# | |
# $ nginx -p /path/to/this/file/ -c nginx.conf | |
# | |
# All requests are then routed to authenticated user's index, so | |
# | |
# GET http://user:password@localhost:8080/_search?q=* | |
# | |
# is rewritten to: | |
# |
This file contains hidden or 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
{ | |
"logstash": | |
{ | |
"order": 0, | |
"template": "logstash-*", | |
"settings": | |
{ | |
"index.refresh_interval": "5s" |
This file contains hidden or 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-*", | |
"settings" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 0, | |
}, | |
"mappings": { | |
"_default_": { | |
"_all": { "enabled": false }, | |
"_source": { "compress": true }, |
This file contains hidden or 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-*", | |
"settings": | |
{ | |
"index.refresh_interval": "30s" | |
}, | |
"mappings": | |
{ | |
"_default_": |
This file contains hidden or 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
s/NUMBER(22,0)/BIGINT/ | |
s/NUMBER(9,0)/INT/ | |
s/NUMBER(8,0)/INT/ | |
s/NUMBER(6,0)/MEDIUMINT/ | |
s/NUMBER(5,0)/SMALLINT/ | |
s/NUMBER(3,0)/TINYINT/ | |
s/NUMBER(2,0)/TINYINT/ | |
s/NUMBER(1,0)/BIT/ | |
s/NUMBER(16,2)/DECIMAL(16,2)/ | |
s/NUMBER(11,2)/DECIMAL(11,2)/ |
This file contains hidden or 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
{ | |
"java": { | |
"jdk_version": "7", | |
"oracle": { | |
"accept_oracle_download_terms": "true" | |
}, | |
"accept_license_agreement": "true", | |
"install_flavor": "oracle" | |
}, | |
"elasticsearch": { |
This file contains hidden or 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
time curl -XPOST "http://localhost/es/logstash-2014.04.01-v2/_search?pretty" -d' | |
{ | |
"size": 0, | |
"aggregations": { | |
"the_name": { | |
"terms": { | |
"field": "clientip", | |
"order": { | |
"rating_avg": "desc" | |
} |
This file contains hidden or 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
{"transient":{ | |
"indices.recovery.concurrent_streams": 15, | |
"indices.recovery.max_bytes_per_sec": "500mb", | |
"cluster.routing.allocation.balance.shard": "0.65f", | |
"cluster.routing.allocation.balance.index": "0.55f", | |
"cluster.routing.allocation.balance.primary": "0.2f", | |
"cluster.routing.allocation.cluster_concurrent_rebalance": "10" | |
} | |
} |
This file contains hidden or 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/bash | |
# Check out the blog post at: | |
# | |
# http://www.philipotoole.com/influxdb-and-grafana-howto | |
# | |
# for full details on how to use this script. | |
AWS_EC2_HOSTNAME_URL=http://169.254.169.254/latest/meta-data/public-hostname | |
INFLUXDB_DATABASE=test1 |
OlderNewer