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

Add resolved IP addresses / redirections to internal agent logs #802

Open
mem opened this issue Jul 26, 2024 · 0 comments
Open

Add resolved IP addresses / redirections to internal agent logs #802

mem opened this issue Jul 26, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@mem
Copy link
Contributor

mem commented Jul 26, 2024

In order to be able to pinpoint misconfigurations / checks contacting specific hosts on the Internet, the agent logs (not the check logs), should capture information about the IP address that each check ends up contacting or the redirections that have been followed.

For example, the resulting logs for an HTTP check include something like:

level=info target=http://www.grafana.com/ probe=Paris region=EMEA instance=http://www.grafana.com/ job=http-any check_name=http source=synthetic-monitoring-agent label_should_fail=false label_managed_by=terraform msg="Resolved target address" target=www.grafana.com ip=2600:1901:0:b3ea::
level=info target=http://www.grafana.com/ probe=Paris region=EMEA instance=http://www.grafana.com/ job=http-any check_name=http source=synthetic-monitoring-agent label_should_fail=false label_managed_by=terraform msg="Making HTTP request" url=http://[2600:1901:0:b3ea::]/ host=www.grafana.com
level=info target=http://www.grafana.com/ probe=Paris region=EMEA instance=http://www.grafana.com/ job=http-any check_name=http source=synthetic-monitoring-agent label_should_fail=false label_managed_by=terraform msg="Received redirect" location=https://grafana.com/

Those entries contain enough information to allow us to connect specific checks with specific hosts on the Internet. We probably need to sanitize / anonymize / scrub some of the information, as the only goal we have is to be able to connect check with traffic to hostnames / IP addresses.

This feature should be conditionally enabled using a flag.

@mem mem added the enhancement New feature or request label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants