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

message in queue for rabbitmw #5

Open
samratBasra opened this issue Jan 12, 2018 · 6 comments
Open

message in queue for rabbitmw #5

samratBasra opened this issue Jan 12, 2018 · 6 comments

Comments

@samratBasra
Copy link

@akrzos first of all thanks for writing this plugin. it works like charm. but i have one question that how can i see/monitor message in queue for rabbitmq.

@akrzos
Copy link
Owner

akrzos commented Feb 14, 2018

@akrzos first of all thanks for writing this plugin. it works like charm. but i have one question that how can i see/monitor message in queue for rabbitmq.

@samratBasra can you provide more detail for your question?

@samratbe
Copy link

@akrzos yes. i have installed grafana for rabbitmq monitoring with this plugin. i am getting data for rabbitmq but i dont know how to see the message in queue for rabbitmq.

@tomaszwostal
Copy link

Hi, I have the same problem. Everything works great except msg_count metric. It shows 0 for each queue. If you need any additional information please let me know.

@akrzos
Copy link
Owner

akrzos commented Feb 18, 2019

@tomaszwostal Try adjusting which vhost your collecting that data from. I am pretty sure the vhost configured in this plugin is set to '/' - https://github.com/akrzos/collectd-rabbitmq-monitoring/blob/master/collectd_rabbitmq_monitoring/__init__.py#L125

@tomaszwostal
Copy link

tomaszwostal commented Feb 19, 2019

@akrzos I'm collecting data from '/'. I'm able to graph all metric except msg_count. When I use curl to get number of messages in queue I'm able to get the proper result.
curl -s -u username:password http://hostname:15672/api/queues/%2F/my_queue | jq .messages 43
To get proper results I had to change this piecie of code:

# Configurable per-queue message counts
    for queue_name in queues_to_count:
        messages_detail = None
        try:
            messages_detail = cl.get_queue('/', queue_name)['messages']
        except HTTPError as err:
            collectd.error(
                'Error Opening Queue [{}] details: {}'
                .format(queue_name, err))
        if messages_detail is None:
            count = 0
        else:
            count = messages_detail

@akrzos
Copy link
Owner

akrzos commented Feb 19, 2019

Got it pyrabbit might have changed since requirements.txt doesn't lock the pyrabbit version down.

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

4 participants