T
T
topuserman2020-02-25 22:16:12
RabbitMQ
topuserman, 2020-02-25 22:16:12

Why do they indicate exchange in the logstash config when linking to the rabbitmq queue as a source of logs?

I have logs in the rabbitmq queue.
I want to connect logstash with a log queue for further loading into elasticsearch.

There were some questions:

1. Where to place logstash'a config for input/output description?
Different sources have different information.
I try to write the config here: /etc/logstash/conf.d/rabbitmq.conf
I created the config file myself. Will the system find it on its own?
Or do you need to connect somewhere?

2. Do I need to describe output for elasticserach by default? Or will they go there by default from logstash?

3. The most important question:

I often see the following in various examples of logstash + rabbitmq configs:

input {
  rabbitmq {
    host => my_host_name
    port => 5672
    vhost => /
    user => guest
    password => guest
    queue => my_queue_name
    exchange => logs
  }
}


namely, along with the name of the queue indicate *exchange* ? for what ? And there were even cases when it was purely exchange, even without the name of the queue?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Karasik, 2020-03-11
@topuserman

I try to write the config here: /etc/logstash/conf.d/rabbitmq.conf
I created the config file myself. Will the system find it on its own?

yes, this is a very popular and convenient method of adding configs - the main config contains 'include conf.d/*.conf' - look in /etc/logstash/logstash.conf.
Is it necessary to describe output for elasticserach by default? Or will they go there by default from logstash?

need.

I
Ivan Shumov, 2020-02-25
@inoise

I will answer only for rabbitmq. In the concept of this broker, it is necessary to send a message to exchange, since it is a message router. It is technically possible to send to the queue, but you should not do this because then there will be difficulties if necessary to reconfigure

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question