Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new relic redis configuration #970

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions playbooks/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,16 @@
become_user: "{{ app_user }}"
when: ansible_distribution_major_version >= '20'

- name: update new relic redis configuration # update redis port to monitor cache instance
replace:
dest: "/etc/newrelic-infra/integrations.d/redis-config.yml"
regexp: '^(\s*PORT:)\s6379$'
replace: '\1 6380'
Comment on lines +125 to +126
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should work, but it assumes although it's worth noting that if the port was set to anything else, it would silently skip over and do nothing. I'm not sure how to improve it though.

become: yes
notify: restart newrelic
tags:
- newrelic_redis

- meta: flush_handlers # Ensure handlers run successfully before reporting success

- name: notify slack
Expand Down
7 changes: 7 additions & 0 deletions roles/common/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@
name: redis-server
state: restarted
become: yes

- name: restart newrelic
service:
name: newrelic-infra
state: restarted
become: yes

Loading