leojaco25
(usa XUbuntu)
Enviado em 02/02/2017 - 17:45h
amarildosertorio escreveu:
No Graylog o MongoDB armazena configurações e metadados. Os logs são armazenados no Elasticsearch. O banco tende a ser bem pequeno. Com um script simples você executa o backup da base.
Utilizamos o script do Michael Mottola.
https://github.com/controlz/Mongo-db-shell-backup
Amarildo,
Peguei o script, e resolve meu problema com relação ao backup. Estou tentando fazer a configuração, mas estou apanhando mais que cachorro de rua. Consegui fazer rodar o graylog2, o mongodb, porém apanhei um bocado do elasticsearch, que consegui fazer funcionar. Porém, na tela do graylog está dando um erro.
Oh no, something went wrong!
(You caused a org.graylog2.restclient.lib.APIException. API call failed GET http://@127.0.0.1:12900/search/universal/relative?offset=0&query=*&limit=100&range=300&sort=timestamp:desc&range_type=relative returned 500 Internal Server Error body: {"type":"ApiError","message":"waited for [30s]"})
Reason: There was a problem with your search. We expected HTTP 200, but got a HTTP 500.
Revi umas trezentas vezes as configurações do graylog e do elasticsearch, porém não descobri nada para resolver. O arquivo de conf do elasticsearch está assim (coloquei somente o que está descomentado, ou o que não é comentário, para não ficar muito longo):
# ======================== Elasticsearch Configuration =========================
# ---------------------------------- Cluster -----------------------------------
# Use a descriptive name for your cluster:
# cluster.name: my-application
cluster.name: graylog2
# ------------------------------------ Node ------------------------------------
# Use a descriptive name for the node:
# node.name: node-1
# Add custom attributes to the node:
# node.rack: r1
# ----------------------------------- Paths ------------------------------------
# Path to directory where to store the data (separate multiple locations by comma):
# path.data: /path/to/data
# Path to log files:
# path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
# Lock the memory on startup:
# bootstrap.memory_lock: true
# ---------------------------------- Network -----------------------------------
# Set the bind address to a specific IP (IPv4 or IPv6):
#network.host: localhost
# Set a custom port for HTTP:
#http.port: 9200
# --------------------------------- Discovery ----------------------------------
# discovery.zen.ping.unicast.hosts: ["host1", "host2"]
#discovery.zen.ping.unicast.hosts: ["127.0.0.1:9300"]
# Prevent the "split brain" by configuring the majority of nodes (total number of nodes / 2 + 1):
#discovery.zen.minimum_master_nodes: 3
# ---------------------------------- Gateway -----------------------------------
# Block initial recovery after a full cluster restart until N nodes are started:
# gateway.recover_after_nodes: 3
# ---------------------------------- Various -----------------------------------
# Disable starting multiple nodes on a single system:
# node.max_local_storage_nodes: 1
# Require explicit names when deleting indices:
# action.destructive_requires_name: true
Tens ideia do que está ocorrendo? No log está constando isso:
[2017-02-02 17:33:12,482][INFO ][node ] [James Jaspers] version[2.4.4], pid[54165], build[fcbb46d/2017-01-03T11:33:16Z]
[2017-02-02 17:33:12,483][INFO ][node ] [James Jaspers] initializing ...
[2017-02-02 17:33:13,115][INFO ][plugins ] [James Jaspers] modules [reindex, lang-expression, lang-groovy], plugins [], sites []
[2017-02-02 17:33:13,138][INFO ][env ] [James Jaspers] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [27.7gb], net total_space [47.4gb], spins? [unknown], types [rootfs]
[2017-02-02 17:33:13,138][INFO ][env ] [James Jaspers] heap size [1007.3mb], compressed ordinary object pointers [true]
[2017-02-02 17:33:15,029][INFO ][node ] [James Jaspers] initialized
[2017-02-02 17:33:15,029][INFO ][node ] [James Jaspers] starting ...
[2017-02-02 17:33:15,188][INFO ][transport ] [James Jaspers] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}
[2017-02-02 17:33:15,193][INFO ][discovery ] [James Jaspers] graylog2/LJIvsnUpTUikja07GidQJA
[2017-02-02 17:33:18,280][INFO ][cluster.service ] [James Jaspers] new_master {James Jaspers}{LJIvsnUpTUikja07GidQJA}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2017-02-02 17:33:18,325][INFO ][http ] [James Jaspers] publish_address {127.0.0.1:9201}, bound_addresses {[::1]:9201}, {127.0.0.1:9201}
[2017-02-02 17:33:18,326][INFO ][node ] [James Jaspers] started
[2017-02-02 17:33:18,362][INFO ][gateway ] [James Jaspers] recovered [0] indices into cluster_state
Grato,
Leandro.