Skip to content

Commit

Permalink
add rabbitmq monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
mkangia committed Dec 19, 2024
1 parent 0299094 commit 0057dab
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
9 changes: 9 additions & 0 deletions roles/commcare_analytics/tasks/datadog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
mode: 0640
tags: datadog

- name: Add rabbitmq config
template:
src: "datadog/rabbitmq.yaml.j2"
dest: "/etc/datadog-agent/conf.d/rabbitmq.d/conf.yaml"
owner: dd-agent
group: dd-agent
mode: 0640
tags: datadog

- name: Restart Datadog service
ansible.builtin.service:
name: datadog-agent
Expand Down
9 changes: 9 additions & 0 deletions roles/commcare_analytics/tasks/rabbitmq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@
ignore_errors: '{{ ansible_check_mode }}'
tags: rabbitmq

- name: Enable rabbitmq plugins
rabbitmq_plugin:
names: rabbitmq_management
state: enabled
ignore_errors: '{{ ansible_check_mode }}'
notify:
- restart rabbitmq
tags: rabbitmq

- name: Place config file
template:
src: "{{ item.src }}"
Expand Down
12 changes: 12 additions & 0 deletions roles/commcare_analytics/templates/datadog/rabbitmq.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# {{ ansible_managed }}
#
init_config:

instances:
- rabbitmq_api_url: http://localhost:15672/api/
rabbitmq_user: {{ rabbitmq_user }}
rabbitmq_pass: {{ rabbitmq_password }}
tags:
- instance:{{ datadog.hostname }}
skip_proxy: true

0 comments on commit 0057dab

Please sign in to comment.