开发者

Check Rails application with Nagios

I want to check my rails-website with a simple nagios URL check. The problem is, that on every GET request from Nagios (every minute), a new session will be inserted in the sessions table. How can I prevent rails from generating new records for the Nag开发者_JAVA技巧ios queries?


I think the best way to approach this would be to create a NagiosController which does the testing you require. Just make sure that controller and its associated views never access the session object, and it never gets loaded

Of course, this might still create db records - not sure, haven't tested. 1 db insert a minute isn't going to kill the system though, and if you clear out sessions as per @eugen's comment aboe, you should be fine. I would think clearing them hourly would more than suffice.

edit: according to the ActionController::Base APIdoc, you could also call reset_session (at the end of your action, I guess), which "removes the entire session"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜