newrelic-experimental / newrelic-snowflake-integration

New Relic integration with Snowflake to monitor query performance, logins, potential security incidents, optimise warehouse and cloud credit costs, capture any data stored in Snowflake for real-time alerting and reporting
Apache License 2.0
13 stars 17 forks source link

Custom Queries no longer working reliably after moving to the EU region #27

Open MarcusQ1 opened 2 years ago

MarcusQ1 commented 2 years ago

Description

We have been using this integration to ingest data from custom queries in Snowflake to New Relic US for some time now.

This week we migrated to New Relic EU. Initially, this worked perfectly and we could see the data from the custom queries in New Relic EU for a day or so. Then it stopped working. We have done two clean installs using API key from EU region, and the result is always the same:

We have also verified that although the data is not visible in New Relic, the queries are in fact executed successfully in Snowflake every hour (as scheduled).

Steps to Reproduce

After one hour, no new data will be ingested to New Relic.

Expected Behavior

New events should keep being ingested from our EC2 instance into New Relic EU, just like they did in the US region with the same setup.

Relevant Logs / Console output

Your Environment

Additional context

We suspect that this is an EU-specific issue.

matewilk commented 2 years ago

Hello @MarcusQ1

The integration uses two main New Relic components, the infrastructure agent, and New Relic Flex. Flex uses the agent's configuration to send data to NR.

It sounds like you need to set one of the agent's environment variables. Try setting the following variable:

NEW_RELIC_REGION=EU

And restarting the agent.

If this doesn't work, It might be that you would have to reinstall the agent with the above variable set, the command would looks something like this (depending on the platform etc, the exact command you can find in installation guides, specifically EU installation quides):

curl -Ls https://download.newrelic.com/install/newrelic-cli/scripts/install.sh | bash && sudo NEW_RELIC_API_KEY={new_relic_api_key} NEW_RELIC_ACCOUNT_ID={new_relic_account_id} NEW_RELIC_REGION=EU /usr/local/bin/newrelic install
matewilk commented 2 years ago

If it doesn't work, are you able to provide NR Agent's logs?