Skip to content

Commit

Permalink
feat: add datadog mongo check
Browse files Browse the repository at this point in the history
  • Loading branch information
nadeemshahzad committed May 7, 2024
1 parent c8aa592 commit 603705e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions playbooks/roles/datadog/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,24 @@
- name: Install datadog Agent
include_role:
name: datadog.datadog
- name: Configure Datadog MongoDB check
copy:
content: |
init_config:
service: edx-mongodb
instances:
- hosts:
- "127.0.0.1:27018"
username: "{{ datadog_mongo_username | default('admin') }}"
password: "{{ datadog_mongo_password | default('password') }}"
logs:
- type: file
path: /edx/var/log/mongo/mongodb.log
source: mongodb
start_position: beginning
dest: /etc/datadog-agent/conf.d/mongo.d/conf.yaml
when: (add_mongo_check | default(false))
- name: Restart Datadog Agent
service:
name: datadog-agent
state: restarted

0 comments on commit 603705e

Please sign in to comment.