Skip to content

Commit

Permalink
DataDog update script
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-szabo committed Aug 23, 2018
1 parent bce0905 commit eba2696
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 10 deletions.
1 change: 1 addition & 0 deletions networks/remote/ansible/install-datadog-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
gather_facts: no
roles:
- install-datadog-agent
- update-datadog-agent

Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@
DD_API_KEY: "{{DD_API_KEY}}"
DD_HOST_TAGS: "testnet:{{TESTNET_NAME}},cluster:{{CLUSTER_NAME}}"

- name: Set datadog.yaml config
template: src=datadog.yaml.j2 dest=/etc/datadog-agent/datadog.yaml
notify: restart datadog-agent

- name: Set metrics config
copy: src=conf.d/ dest=/etc/datadog-agent/conf.d/
notify: restart datadog-agent

- name: Disable journald rate-limiting
lineinfile: "dest=/etc/systemd/journald.conf regexp={{item.regexp}} line='{{item.line}}'"
with_items:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
init_config:

instances:
- name: gaiad
url: http://localhost:26657/status
timeout: 1
content_match: '"latest_block_height": "0",'
reverse_content_match: true

- name: gaiacli
url: http://localhost:1317/node_version
timeout: 1

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ init_config:

instances:
- prometheus_url: http://127.0.0.1:26660
namespace: "gaiad"
metrics:
- p2p: *
- go*
- mempool*
- p2p*
- process*
- promhttp*
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---

- name: restart datadog-agent
service: name=datadog-agent state=restarted

10 changes: 10 additions & 0 deletions networks/remote/ansible/roles/update-datadog-agent/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---

- name: Set datadog.yaml config
template: src=datadog.yaml.j2 dest=/etc/datadog-agent/datadog.yaml
notify: restart datadog-agent

- name: Set metrics config
copy: src=conf.d/ dest=/etc/datadog-agent/conf.d/
notify: restart datadog-agent

10 changes: 10 additions & 0 deletions networks/remote/ansible/update-datadog-agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---

#DD_API_KEY,TESTNET_NAME,CLUSTER_NAME required

- hosts: all
any_errors_fatal: true
gather_facts: no
roles:
- update-datadog-agent

0 comments on commit eba2696

Please sign in to comment.