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

Merged
merged 3 commits into from
Jan 14, 2025

Conversation

rioug
Copy link
Contributor

@rioug rioug commented Dec 11, 2024

-closes #922

By default New Relic monitor the redis instance running on port 6379. We are interested in monitoring the cache instance of redis, running on port 6380. This add a task to update the port to 6380.

Once merged, we'll need to update all the server (Will track that on #922 ) . You can use the following command :

By default New Relic monitor the redis instance running on port 6379. We are running three instances on port 6379,6380 and 6381. This change will add monitoring for all instances, and they get tagged with their role.

Once merged, we'll need to update all the server (Will track that on #922 ) . You can use the following command :

ansible-playbook playbooks/provision.yml --limit=au_staging -e "@../ofn-secrets/au_staging/secrets.yml" --tags newrelic

By default New Relic monitor the redis instance running on port 6379.
We are interested in monitoring the cache instance of redis, running
on port 6380. This add a task to update the port to 6380.
Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

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

Nice. Is it possible to monitor multiple instances? We also use it for sidekiq (https://github.com/openfoodfoundation/ofn-install/blob/master/inventory/group_vars/all.yml#L75-L76), so it would be good to monitor that also.

Comment on lines 125 to 126
regexp: '^(\s*PORT:)\s6379$'
replace: '\1 6380'
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.

Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

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

Unfortunately it doesn't work in CI:

https://github.com/openfoodfoundation/ofn-install/actions/runs/12270155766/job/34234930102

TASK [update new relic redis configuration] ************************************
fatal: [local_test]: FAILED! => {
    "changed": false,
    "rc": 257
}

MSG:

Path /etc/newrelic-infra/integrations.d/redis-config.yml does not exist !

It will now monitor all three intances, and they are tags with their
role.
@rioug rioug requested a review from dacook January 13, 2025 01:26
Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

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

Thanks for following up. I have a few suggestions, what do you think?

- update metrics every minute
- update inventory daily
@rioug rioug requested a review from dacook January 13, 2025 03:12
Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

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

Awesome 😎

@@ -0,0 +1,87 @@
{{ template_notice }}
Copy link
Member

Choose a reason for hiding this comment

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

Good idea to include this!! 🏅

@mkllnk mkllnk merged commit 883f6f7 into openfoodfoundation:master Jan 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Update New Relic redis monitoring configuration
3 participants