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

Backport post-setup healthcheck from agent to alloy #213

Merged
merged 2 commits into from
Jun 3, 2024
Merged

Conversation

v-zhuravlev
Copy link
Collaborator

No description provided.

@@ -0,0 +1,2 @@
# Server http address, used in self health check after start
_alloy_healthcheck_endpoint: "http://{{ alloy_flags_extra['server.http.listen-addr'] if alloy_flags_extra['server.http.listen-addr'] is defined else '127.0.0.1:12345' }}/-/ready"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be simpler to just do

Suggested change
_alloy_healthcheck_endpoint: "http://{{ alloy_flags_extra['server.http.listen-addr'] if alloy_flags_extra['server.http.listen-addr'] is defined else '127.0.0.1:12345' }}/-/ready"
_alloy_healthcheck_endpoint: "http://{{ alloy_flags_extra.server.http.listen-addr | default('127.0.0.1:12345') }}/-/ready"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, that check fails on some specific ansible version that way. Found 'is defined' to be more reliable.

@v-zhuravlev v-zhuravlev requested a review from gardar May 31, 2024 17:31
@ishanjainn ishanjainn merged commit 8cf67f0 into main Jun 3, 2024
7 of 19 checks passed
@ishanjainn ishanjainn deleted the alloy_handler branch June 3, 2024 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants