Skip to content

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

Open
@mem

Description

@mem

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions