Last active
November 26, 2015 16:21
-
-
Save paulocoutinhox/187f9905ea578ecd2e6e to your computer and use it in GitHub Desktop.
Elasticsearch for Logstack for log entries by message, token and type
This file contains 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
POST /logstack/log | |
{ | |
"token": "722278A5-2F08-414B-AC95-563CAAE63598", | |
"type": "debug", | |
"message": "ATENÇÃO: A aplicação está com o MODO DEBUG ativado!" | |
} | |
POST /logstack/log | |
{ | |
"token": "722278A5-2F08-414B-AC95-563CAAE63598", | |
"type": "debug", | |
"message": "A aplicação está com o MODO LOGOUT LOCAL ONLY desativado!" | |
} |
This file contains 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 /logstack |
This file contains 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
GET /logstack/_mapping/log |
This file contains 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
PUT /logstack | |
{ | |
"mappings" : { | |
"log" : { | |
"properties" : { | |
"token" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
}, | |
"type" : { | |
"type" : "string", | |
"index" : "not_analyzed" | |
}, | |
"created_at" : { | |
"type" : "date", | |
"format" : "yyyy-MM-dd'T'HH:mm:ss", | |
"null_value": "now" | |
} | |
} | |
} | |
} | |
} |
This file contains 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
POST /logstack/_search | |
{ | |
"query": { | |
"bool": { | |
"must": { | |
"match": { | |
"message": "a" | |
} | |
}, | |
"filter": [ | |
{ | |
"term": { | |
"type": "debug" | |
} | |
}, | |
{ | |
"term": { | |
"token": "722278A5-2F08-414B-AC95-563CAAE63598" | |
} | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment