Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send healthcheck message on high priority #68

Merged
merged 10 commits into from
Mar 14, 2024
4 changes: 2 additions & 2 deletions lib/newrelic_security/agent/control/event_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def send_health
health.update_health_check
NewRelic::Security::Agent.agent.status_logger.add_healthcheck_in_last_healthchecks(health)
NewRelic::Security::Agent.agent.status_logger.create_snapshot
enqueue(health)
NewRelic::Security::Agent::Control::WebsocketClient.instance.send(health)
health = nil
end

Expand Down Expand Up @@ -120,7 +120,7 @@ def create_keep_alive_thread
Thread.current.name = "newrelic_security_healthcheck_thread"
while true do
sleep HEALTH_INTERVAL
send_health if NewRelic::Security::Agent.config[:enabled]
send_health if NewRelic::Security::Agent::Control::WebsocketClient.instance.is_open?
end
}
rescue Exception => exception
Expand Down
Loading