Metricbeat timeout

Hello all,

I have a question about the RabbitMQ module, specially about the queue metricset.

My metricbeat send a request every 10s but my rabbitMQ take more than 10s to respond. So, I think that metricbeat continue sending requests to http://*:15672/api/queues which caused a problem. It blocked the memory of RabbitMQ and the access to this url.

- module: rabbitmq
  metricsets:
    - node
    - queue
    - connection 
    - exchange 
  period: 10s
  enabled: true
  hosts: []

Do you if we can setup the request and let metricbeat wait for the response before sending another one?
How can we manage this situation?

Best regard,
Imad.

Hi @imaad,
Yes, you can set the timeout for that module. See timeout settings for more information.

Hello @Wave

Thank you for your response. So, I have been using the default settings : period 10s timeout 10s connect_timeout 10s.
I have another question. For example, Let's take a case of a failure request.

If I set the timeout to 30s and I start a request at 11:00:00. The next request will start at "11:00:30" or "11:00:40" or "I will have 2 parallel requests at 11:00:30 and 11:00:10"?

Could we apply this timeout only on the queue metricset and keep the default settings for the other metricsets?

Thank you,

With a timeout of 30s and everything else default you should have parallel requests every 10s for 30s until they start hitting the timeout. For example:

  • 11:00:00: 1 connection
  • 11:00:10: 2 connections
  • 11:00:20: 3 connections
  • 11:00:30: 3 connections (the connection from 11:00:00 would timeout right about then)
  • 11:00:40: 3 connections (the connection from 11:00:10 would timeout right about then)

Full disclosure, I haven't used the RabbitMQ module before but this is how I've seen other timeout settings behave. Depending upon your use case you could increase your period to 30s so you wouldn't have multiple connections in flight at once. Test it out for your unique situation though.

Try creating multiple rabbitmq modules in rabbitmq.yml. For example, if you want node to have custom settings and the rest be default you could do something like:

- module: rabbitmq
  metricsets:
    - node
  period: 30s
  timeout: 30s
  enabled: true
  hosts: []
- module: rabbitmq
  metricsets:
    - queue
    - connection 
    - exchange
  period: 10s
  enabled: true
  hosts: []

I'm not 100% sure that will work, but suspect it will. Good luck and please let me know how it goes.

Hello again,

Yes thank you the conf is working as expected.

Best regards,
Imad.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.