Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Msg : Metrics updated #68

Closed
aparnareji opened this issue Mar 6, 2018 · 17 comments
Closed

Msg : Metrics updated #68

aparnareji opened this issue Mar 6, 2018 · 17 comments

Comments

@aparnareji
Copy link

aparnareji commented Mar 6, 2018

Hi @kbudde ,

I have successfully deployed a container in my environmnet for rabbitmq-exporter . The pod is also running , but am getting the following message :

time="2018-03-06T06:56:28-05:00" level=info msg="Metrics updated" duration=4.424415629s

And also am not able to view the metrics , as am getting the error :

504 Gateway Time-out

Hope this is similar to the issue #6 .
Please note that , I am using the latest version and exposed port 9419

Could you please help me to solve this.

With Regards,
Aparna Reji

@aparnareji aparnareji changed the title Error : Metrics updated Msg : Metrics updated Mar 6, 2018
@chetan-hireholi
Copy link

chetan-hireholi commented Mar 6, 2018

Hello @aparnareji ,
We interacted in the CloudFoundry exporter issue as well. I think, even I'm trying to setup a similar thing.
Can you please let me know how are you running the exporter?

@aparnareji
Copy link
Author

Hi @SamwiseGambgee ,

Am actually deploying the exporter in Openshift , inside my project and then will target the metrics to Prometheus.

With Regards,
Aparna Reji

@chetan-hireholi
Copy link

@aparnareji oh i see...
In my case, I need to tunnel(ssh) it in order to connect to AWS.
Do you have any idea how can I achieve it?

@aparnareji
Copy link
Author

@SamwiseGambgee ,

As of now , am not using AWS. Sorry, I have no idea about it .

With Regards,
Aparna Reji

@aparnareji
Copy link
Author

Hi Team,

Could you please give me an update .

With Regards,
Aparna Reji

@kbudde
Copy link
Owner

kbudde commented Mar 10, 2018

Hi,

The first log message "metrics updated" is normally a good sign. On the other hand 4s for generating the metrics is a very long time.

Can you please give me some more details:

  • Which configuration is in use for the exporter? (I recommend bert, no_sort for the features)?
  • How many queues and exchanges do you have?
  • Which rabbitmq version are you using (single node/cluster)?

updated:
Is it possible that the metrics endpoint of the xporter is not reachable in your setup?

@aparnareji
Copy link
Author

aparnareji commented Mar 14, 2018

Hi @kbudde ,
`

  • How many queues and exchanges do you have?
  • ---It is dynamic ( for now: Queue-7379, exchanges-293)
  • Which rabbitmq version are you using (single node/cluster)
  • ----Single node
  • Which configuration is in use for the exporter? (I recommend bert, no_sort for the features)?
  • ---I didnt get the question , i have now deployed the exporter in openshift
    `
    Now am getting detailed log with same message:
time="2018-03-14T07:38:12-04:00" level=error msg="Error while retrieving data from rabbitHost" error="Get <rabbiturl>/api/queues:  net/http: request canceled (Client.Timeout exceeded while awaiting headers)" host="<rabbit URL> " statusCode=0

and

time="2018-03-14T07:38:12-04:00" level=info msg="Metrics updated" duration=10.25768936s

The metrics endpoint of the exporter is reachable in our setup

With Regards,
Aparna Reji

@aparnareji
Copy link
Author

Hi @kbudde ,

Could you please give me an update

With Regards,
Aparna Reji

@kbudde
Copy link
Owner

kbudde commented Mar 21, 2018

Hi,

Are you sure that the exporter can reach the rabbitmq?
You need as well the management plugin installed on rabbitmq.

@aparnareji
Copy link
Author

aparnareji commented Mar 21, 2018

Hi @kbudde ,

Am sure that the exporter can reach the rabbitmq as sometimes it connect properly and gives the metrics. But sometimes, i will get this error and then there wont be any metrics and I also have the management plugin installed on rabbitmq .

With Regards,
Aparna Reji

@kbudde
Copy link
Owner

kbudde commented Mar 21, 2018

HI @aparnareji,

what is the normal scrape duration for your setup if it working?

 level=info msg="Metrics updated" duration=???s

The default timeout is 10s. I think this could be the problem.
Are you using RABBIT_CAPABILITIES=bert,no_sort? This could reduce the scraping duration.

@aparnareji
Copy link
Author

aparnareji commented Apr 5, 2018

Hi @kbudde ,

sorry for the delayed reply.

The duration , now having is duration=10.131007724s
RABBIT_CAPABILITIES=bert,no_sort is not used
With Regards,
Aparna Reji

kbudde added a commit that referenced this issue Apr 8, 2018
@kbudde
Copy link
Owner

kbudde commented Apr 8, 2018

Hi,

for the moment I've increased the timout for the client to 15s.
But I'm going to add a better logic (prometheus is providing timeout information during scraping) to the exporter later.
For your usecase the bert support and no_sort should significantly reduce cpu load during scaping and normally should speed up the process as well.
I really recommend using it.

@aparnareji
Copy link
Author

Hi @kbudde ,

Thank you. May i please know what is the job of bert and no_sort.

With Regards,
Aparna Reji

@kbudde
Copy link
Owner

kbudde commented Apr 10, 2018

Hi,

Extended RabbitMQ capabilities

Newer version of RabbitMQ can provide some features that reduce
overhead imposed by scraping the data needed by this exporter. The
following capabilities are currently supported in
RABBIT_CAPABILITIES env var:

  • no_sort: By default RabbitMQ management plugin sorts results using
    the default sort order of vhost/name. This sorting overhead can be
    avoided by passing empty sort argument (?sort=) to RabbitMQ
    starting from version 3.6.8. This option can be safely enabled on
    earlier 3.6.X versions, but it'll not give any performance
    improvements. And it's incompatible with 3.4.X and 3.5.X.
  • bert: Since 3.6.9 (see
    Add support for non-JSON encoding of replies rabbitmq/rabbitmq-management#367) RabbitMQ
    supports BERT encoding as a JSON alternative. Given that BERT
    encoding is implemented in C inside the Erlang VM, it's way more
    effective than pure-Erlang JSON encoding. So this greatly reduces
    monitoring overhead when we have a lot of objects in RabbitMQ.

@aparnareji
Copy link
Author

aparnareji commented Apr 10, 2018

Hi @kbudde ,

Thanks for your update , may i give the env variable no_sortwith value ./rabbitmq_exporter

With Regards,
Aparna Reji

@kbudde
Copy link
Owner

kbudde commented Apr 24, 2018

HI @aparnareji ,

at the moment just environment variables are supported (no flags).

Only solution is:

PUBLISH_PORT=9419 RABBIT_CAPABILITIES=bert,no_sort ./rabbitmq_exporter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants