1

I want to set up Availability Monitoring (URL pinging) on my staging app, but on newrelic.com you can only enter 1 URL per app - so currently that's the production version.

Is there a way to ping the staging app? I can't create a new app on New Relic because it will prompt me to copy another newrelic.yml file into config/ which would just replace the existing one used for production.

Any tips?

John Trichereau
  • 626
  • 9
  • 22

2 Answers2

4

There's a presumption in the last paragraph here that I have to disagree with: that you have to replace your newrelic.yml configuration file to create a second app name for your staging environment.

The easiest way to create a second listing within Rails is to create add some configuration options to the bottom of the .yml that will key off RAILS_ENV e.g.

staging:
  <<: *default_settings
  app_name: My Application (Staging)

This will report a separate app name to your dashboard, allowing you to set up a second availability monitor, and also get a separate dashboard where you can track staging's performance.

Nočnica
  • 787
  • 3
  • 12
3

There's multiple ways to approach a situation like this.

The most effective solution would be create a status page on your site which together with our substring search to make sure everything is fine with the checks. For example, you could use cURL to check other URLs or any other checks you'd like to perform within your application, then using our availability monitor, execute the checks and return a response when satisfied. Once you have received the response, our substring search can check for whatever phrase you use for the satisfied checks.

Note: It's best to avoid using "OK" for the substring search as this will conflict with the 200 OK HTTP response.

karlpcrowley
  • 526
  • 2
  • 7