如何排除 NewRelic RPM pinger 在数据库中创建无用会话
我正在使用 Newrelic 来监控我的 Rails 应用程序状态。他们每 5 分钟 ping (我认为是 GET 请求)我们的应用程序。您知道如何防止 Rails 为他们发出的每个请求生成新的用户会话吗?
I'm using Newrelic for monitoring my rails app status. They ping (GET request I think) our app every 5 minutes. Do you know how to prevent rails from spawning new user session for every request they are making?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
让它 ping
public
目录中存在的内容。这不会检查以确保您的应用程序正在运行,而只是检查服务器是否已启动。假设服务器已启动,那么您的应用程序应该能够创建异常,并且 New Relic 将捕获这些异常。
例如,在新的 Rails 应用程序上,您可以让它 ping
http://rooturl/images/rails.png
因为该 png 默认位于public/images/
中。Have it ping something that exists in the
public
directory.This won't check to make sure that your app is running, but just that the server is up. Assuming the server is up, then your app should be able to create exceptions and New Relic will catch those.
On a new Rails app, for instance, you could have it ping
http://rooturl/images/rails.png
as that png is inpublic/images/
by default.我似乎记得最近针对此用例所做的一些工作 - 您可以联系 New Relic 支持并查看最近是否已解决此问题。
I seem to recall some recent work for specifically this use case -- you might contact New Relic support and see if this has been addressed recently.
其他好的答案已经在这里,但 pinger 在这里有完整的记录: https://newrelic.com /docs/alerts/availability-monitoring
Other good answers are already here, but the pinger is documented in full here: https://newrelic.com/docs/alerts/availability-monitoring