-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add the health monitor gem we use this to monitor the health of an application * add the configuration for health-monitor we initialize health-monitor and configure it * Update config/deploy.rb Co-authored-by: Max Kadel <mkadel@princeton.edu> * Update config/initializers/health_monitor.rb Co-authored-by: Max Kadel <mkadel@princeton.edu> --------- Co-authored-by: Max Kadel <mkadel@princeton.edu>
- Loading branch information
Showing
4 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
Rails.application.config.after_initialize do | ||
HealthMonitor.configure do |config| | ||
config.cache | ||
|
||
config.path = :health | ||
|
||
config.file_absence.configure do |file_config| | ||
file_config.filename = "public/remove-from-nginx" | ||
end | ||
|
||
config.error_callback = proc do |e| | ||
Rails.logger.error "Health check failed with: #{e.message}" | ||
Honeybadger.notify(e) unless e.is_a(HealthMonitor::Providers::FileAbsenceException) | ||
end | ||
end | ||
end |