Skip to content

Commit

Permalink
Fixed rabbitmq metrics.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrien Delle Cave committed Mar 17, 2020
1 parent 199ea05 commit 29264af
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 29 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
covenant (0.0.17) unstable; urgency=medium

* Fixed rabbitmq metrics.

-- Adrien Delle Cave <adrien.delle.cave@commandersact.com> Tue, 17 Mar 2020 12:46:16 +0100

covenant (0.0.16) unstable; urgency=medium

* Reviewed requirements.

-- Adrien Delle Cave <adrien.delle.cave@commandersact.com> Wed, 04 Mar 2020 17:39:59 +0100

covenant (0.0.15) unstable; urgency=medium

* Reviewed requirements.

-- Adrien Delle Cave <adrien.delle.cave@commandersact.com> Sat, 18 Jan 2020 20:47:19 +0100

covenant (0.0.14) unstable; urgency=medium

* Reviewed requirements.
Expand Down
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.14
0.0.17
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.14
0.0.17
2 changes: 1 addition & 1 deletion bin/covenant
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later
"""covenant"""

__version__ = '0.0.14'
__version__ = '0.0.17'

# TODO: load Python logging configuration (using standard logging.config)

Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ Package: covenant
Architecture: all
Homepage: https://www.commandersact.com
Depends: ${misc:Depends}, python-pycurl, python (>= 2.7~)
Pre-Depends: adduser, autoconf, automake, build-essential, libtool, lsb-release, python-dev (>= 2.7~), python-pip, python-setuptools
Pre-Depends: adduser, autoconf, automake, build-essential, libtool, lsb-release, python-dev (>= 2.7~), python-pip, python-pycurl, python-setuptools
Description: Fjord Technologies covenant package
69 changes: 51 additions & 18 deletions etc/covenant/metrics.d/rabbitmq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,33 +81,54 @@
timeout: ${vars['timeout']}
uri: ${vars['url']}/exchanges
format: ${vars['format']}
labels:
- name: vhost
label_tasks:
- '@filter': jmespath
expression: 'vhost'
- name: exchange
label_tasks:
- '@filter': jmespath
expression: 'name'
collects:
- exchange_messages_published_total:
type: const_counter
value_tasks:
- '@filter': jmespath
expression: 'sum([sum([].message_stats.publish_in), sum([].message_stats.publish_out)])'
labels:
- name: vhost
label_tasks:
- '@filter': jmespath
expression: vhost
- name: exchange
label_tasks:
- '@filter': jmespath
expression: '[name,message_stats.publish].{name: [0], publish: [1]}'
- '@labelize': dict
'key': name
'value': publish
'default': 0
documentation: Count of messages published.
- exchange_messages_published_in_total:
type: const_counter
value_tasks:
- '@filter': jmespath
expression: 'sum([].message_stats.publish_in)'
labels:
- name: vhost
label_tasks:
- '@filter': jmespath
expression: vhost
- name: exchange
label_tasks:
- '@filter': jmespath
expression: '[name,message_stats.publish_in].{name: [0], publish_in: [1]}'
- '@labelize': dict
'key': name
'value': publish_in
'default': 0
documentation: Count of messages published in to an exchange, i.e. not taking account of routing.
- exchange_messages_published_out_total:
type: const_counter
value_tasks:
- '@filter': jmespath
expression: 'sum([].message_stats.publish_out)'
labels:
- name: vhost
label_tasks:
- '@filter': jmespath
expression: vhost
- name: exchange
label_tasks:
- '@filter': jmespath
expression: '[name,message_stats.publish_out].{name: [0], publish_out: [1]}'
- '@labelize': dict
'key': name
'value': publish_out
'default': 0
documentation: Count of messages published out to an exchange, i.e. not taking account of routing.
- name: nodes
config:
Expand Down Expand Up @@ -276,6 +297,18 @@
'value': messages_persistent
'default': 0
documentation: Total number of persistent messages in the queue (will always be 0 for transient queues).
- queue_messages_published_total:
type: const_counter
labels:
- name: queue
label_tasks:
- '@filter': jmespath
expression: '[name,message_stats.publish].{name: [0], publish: [1]}'
- '@labelize': dict
'key': name
'value': publish
'default': 0
documentation: Count of messages published.
- queue_message_bytes:
type: gauge
labels:
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
dwho>=0.3.18
httpdis>=0.6.8
dwho>=0.3.28
httpdis>=0.6.11
jmespath>=0.9.3
pycurl
pyjq==2.3.1
pyyaml>=3.10
prometheus-client>=0.6.0
six>=1.13.0
sonicprobe>=0.3.19
requests>=2.0
sonicprobe>=0.3.24
requests>=2.21.0
6 changes: 3 additions & 3 deletions setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: covenant
description: covenant
author: Adrien Delle Cave
author_email: pypi@doowan.net
copyright: '2019 fjord-technologies'
release: '0.0.14'
version: '0.0.14'
copyright: '2020 fjord-technologies'
release: '0.0.17'
version: '0.0.17'
license: License GPL-3
url: https://github.com/decryptus/covenant
python_requires:
Expand Down

0 comments on commit 29264af

Please sign in to comment.