# Create the first VM
azure vm create azure-elasticsearch-cluster \
b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-13_10-amd64-server-20130808-alpha3-en-us-30GB \
--vm-name myesnode1 \
--location "West Europe" \
--vm-size extrasmall \
--ssh 22 \
--ssh-cert /tmp/azure-certificate.pem \
elasticsearch password
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
curl -XDELETE 'http://localhost:9200/logstash-2013.12.20/'; echo | |
curl -XPOST 'http://localhost:9200/logstash-2013.12.20/cloudtest' -d ' | |
{ | |
"responseElements": { | |
"instancesSet": { | |
"items": [ | |
{ | |
"instanceId": "i-1bbb1111", | |
"currentState": { |
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
# Delete the index `testindex` | |
curl -XDELETE 'http://localhost:9200/test' ; echo | |
# Create the index `testindex` | |
curl -XPUT 'http://localhost:9200/test' -d '{ | |
"settings" : { | |
"index" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 0 | |
}, |
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
curl -XDELETE "http://localhost:9200/test"; echo | |
curl -XPUT "http://localhost:9200/test" -d' | |
{ | |
"settings": { | |
"index": { | |
"number_of_shards": 1, | |
"number_of_replicas": 0 | |
}, | |
"analysis": { | |
"analyzer": { |
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
curl -XPOST http://localhost:9200/foo; echo | |
curl -XPUT http://localhost:9200/foo/bar/_mapping -d '{ | |
"bar":{ | |
"properties":{ | |
"clientip":{ | |
"type":"multi_field", | |
"fields":{ | |
"clientip":{ | |
"type":"ip" |
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
curl -XDELETE "http://localhost:9200/myindex"; echo | |
curl -XPUT "http://localhost:9200/myindex" -d' | |
{ | |
"settings": { | |
"gc_deletes": "30s" | |
} | |
}'; echo | |
curl -XPUT "http://localhost:9200/myindex/doc/1" -d'{ "foo" : "bar" }'; echo | |
curl -XDELETE "http://localhost:9200/myindex/doc/1?version=1"; echo | |
curl -XPUT "http://localhost:9200/myindex/doc/1?version=2" -d'{ "foo" : "bar" }'; echo |
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
curl -XDELETE "http://localhost:9200/anindex"; echo | |
curl -XPUT "http://localhost:9200/anindex/atype/1" -d' | |
{ | |
"obj1": | |
{ | |
"foo" : "bar" | |
}, | |
"obj2" : | |
{ | |
"baz" : "qux" |
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
curl -XDELETE "http://localhost:9200/script/" | |
curl -XPUT "http://localhost:9200/script/doc/1" -d' | |
{ | |
"title":"test" | |
}' | |
curl -XPUT "http://localhost:9200/script/doc/2?refresh" -d' | |
{ | |
"title":"nothing", |
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
curl -XDELETE "http://localhost:9200/bluekiwi"; echo | |
curl -XPUT "http://localhost:9200/bluekiwi/doc/1" -d' | |
{ | |
"group":1, | |
"title":"test", | |
"content":"nothing", | |
"tags":["tag1","tag2"], | |
"authorId":1, | |
"creatorId":1 |
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
# This is a comment. You should use comments to describe | |
# parts of your configuration. | |
input { | |
file { | |
type => "server02" | |
path => [ "/tmp/server02/*.log*" ] | |
} | |
file { | |
type => "server03" | |
path => [ "/tmp/server03/*.log*" ] |