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
{ | |
"post_id" : 1, | |
"post_title" : "Logstash é vida", | |
"post_content" : "<p>Vejá só como é facil!...</p>", | |
"author_name" : "Samir Varandas", | |
"text_comments" : ["Achei top", "Achei péssimo"] | |
} |
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
output { | |
#elastic search output plugin | |
elasticsearch { | |
#url da API do Elastic | |
hosts => ["${ELASTICSEARCH_HOST}"] | |
#chave de autenticação | |
api_key=> ["${ELASTICSEARCH_API_KEY}"] | |
#nome do index para fazer o upsert (faz update se existir o post de post_id caso contrário o insere) | |
index => "idx_posts" | |
#faz uma operação de update no registro do Elastic |
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
filter { | |
#faz uma operação de aggregate (semelhante a um group by) | |
aggregate { | |
#vamos agrupar pelo id do post | |
task_id => "%{post_id}" | |
#e vamos mapear o evento dessa forma | |
code => " | |
map['post_id'] = event.get('post_id') | |
map['post_title'] = event.get('post_title') | |
map['post_content'] = event.get('post_content') |
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
{ | |
"post_id" : 1, | |
"post_title" : "Logstash é vida", | |
"post_content" : "<p>Vejá só como é facil!...</p>", | |
"author_name" : "Samir Varandas", | |
"text_comments" : ["Achei top", "Achei péssimo"] | |
} |
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
input { | |
jdbc { | |
#configurações de conexão de banco usando jdbc driver | |
jdbc_driver_library => "${LOGSTASH_JDBC_DRIVER_JAR_LOCATION}" | |
jdbc_driver_class => "${LOGSTASH_JDBC_DRIVER}" | |
jdbc_connection_string => "${LOGSTASH_JDBC_URL}" | |
jdbc_user => "${LOGSTASH_JDBC_USERNAME}" | |
jdbc_password => "${LOGSTASH_JDBC_PASSWORD}" | |
#url para guardar arquivo de last run com dados do cursor | |
last_run_metadata_path=> "/usr/share/logstash/data/.logstash_jdbc_last_run" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"/> | |
<title>Document</title> | |
</head> | |
<body> | |
<!-- Incluir onclick="showFB()" no link assine via chat --> | |
<button onclick="showFB()">Exibir chat</button> |
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
{ | |
"status": true, | |
"event": | |
{ | |
"date": "08/07/2014", | |
"weddings": [ | |
{ | |
"id": 7490, | |
"remaining_time": 1, | |
"name": "Jefferson Oliveira & Karla Oliveira" |