Skip to content

Commit

Permalink
adicionando configuração ao newrelic infra para coletar logs. (#59)
Browse files Browse the repository at this point in the history
* adicionando configuração ao newrelic infra para coletar logs.

* removendo espaços desnecessários ao final da linha

* removendo become duplicado

* ajuste de lint

* ajuste logging

* ajustando o lint

Co-authored-by: Marcos Vinicius Rezende <marcos.rezende@ambevtech.com.br>
  • Loading branch information
Rehzende and marcos-rezende-abi authored Jul 11, 2021
1 parent 07ad3f6 commit 1d3f8b8
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
parseable: true
skip_list:
- '204'
Expand Down
19 changes: 19 additions & 0 deletions config_files/logging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
logs:
- name: alternatives.log
file: /var/log/alternatives.log

- name: auth.log
file: /var/log/auth.log

- name: dpkg.log
file: /var/log/dpkg.log

- name: docker-logs
file: /var/lib/docker/containers/*/*.log

- name: nginx-access-logs
file: /var/log/nginx/access.log*

- name: nginx-error-logs
file: /var/log/nginx/error.log*
1 change: 0 additions & 1 deletion group_vars/staging/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ django_settings_module: "web.settings"
enable_autothrottle_debug: "true"
new_relic_log: "stdout"


# NEWRELIC INFRA
nrinfragent_integrations:
- { name: nri-nginx, state: "latest" }
Expand Down
5 changes: 5 additions & 0 deletions playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
- iac-role-basica
- iac-role-services
tasks:
- name: copying log files config
copy:
src: config_files/logging.yml
dest: /etc/newrelic-infra/logging.d
mode: 0644
- name: create app
dokku_app:
# change this name in your template!
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ molecule-docker==0.2.4
pytest==6.2.1
pytest-testinfra==6.1.0
testinfra==6.0.0
yamllint==1.25.0
yamllint==1.25.0
1 change: 1 addition & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

# Do galaxy
- src: dokku_bot.ansible_dokku
version: v2020.11.25
Expand Down

0 comments on commit 1d3f8b8

Please sign in to comment.