-
Notifications
You must be signed in to change notification settings - Fork 600
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
AC/FC integration #2995
base: dev
Are you sure you want to change the base?
AC/FC integration #2995
Conversation
When the agent recognizes it is running in an agent control environment, it will start automatic health checks that will create a new file at a configured destination at a given frequency that provides details about the last reported status of the agent. When the agent is not seen within an agent control environment, files will not be created.
1870dc2
to
671edf2
Compare
Instead of creating a new file at the interval, reuse the same file for the life of the process.
The array was not being correctly destructured, which would raise an error when the status was HTTP_ERROR
The health check status may be updated for other reasons on the CI, which may cause the message to be inaccurate by the time the result is accessed from the hash
There was a bug related to the HTTP_ERROR constant, where the sprintf string manipulation changed the constant to equal the first value it came across. By freezing the constants and dup'ing the status before assigning it, we can avoid this problem.
Previously the invalid license key status would be set, but the health check files would not be written until the first request to the web app was made. Now, health checks will begin before the agent officially starts.
…gent into sa-health-check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple of questions and noticed some puts, wanted to comment on them just to make sure they dont get forgotten in the future.
Co-authored-by: Hannah Ramadan <[email protected]>
Make sure the SHUTDOWN status is only applied when the agent is healthy
…gent into sa-health-check
Instead of waiting until create_and_run_health_check_loop is run to verify the necessary config options are present, evaluate whether checks are enabled on initialization. In addition, log the status of the config-related instance variables during initialization.
SimpleCov Report
|
The fleet ID setting has been replaced by agent_control.enabled. At this time, enabled will only refer to health checks being enabled. The value is a Boolean and defaults to false.
The default value is '/newrelic/apm/health' in the code, though the spec default is 'file:///newrelic/apm/health'. Since we need to remove the 'file://' anyway, take it out when defining the string to avoid unncessary gsubs
* Add link to Agent Control documentation * Add environment variable detail to config description * Capitalize Agent Control in logs and docs
@continue = false | ||
end | ||
|
||
def create_file_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep an eye on the spec for this; we may not need to create the path if it doesn't exist.
Resolves #2859