grafana / synthetic-monitoring-agent

Synthetic Monitoring Agent
https://grafana.com/docs/grafana-cloud/how-do-i/synthetic-monitoring/
Apache License 2.0
155 stars 20 forks source link

Unable to Run k6 Tests on Private Probe for Local Kubernetes Cluster #730

Closed SeamusGrafana closed 2 weeks ago

SeamusGrafana commented 2 weeks ago

I have a Private SM Agent deployed on a private Kubernetes Cluster (either in GCP or with k3d), and I am trying to create a Synthetic Monitoring Check that uses that Private Probe (only) to run checks against applications in that Cluster.

However, the checks fails, due to restrictions, e.g.;

error   
Get "http://opentelemetry-demo-frontendproxy.mythical.svc.cluster.local:8080/api/products": hostname (opentelemetry-demo-frontendproxy.mythical.svc.cluster.local) is in a blocked pattern (*.cluster.local)

However, I have configured the --blocked-nets="" so this should allow any checks on any network.

If I remove the .cluster.local it then fails with;

Get "http://opentelemetry-demo-frontendproxy.mythical.svc:8080/api/products": IP (10.44.5.128) is in a blacklisted range (10.0.0.0/8)

This seems to happen for either of the MultiHTTP Checks or the Scripted Checks.

I am using the latest Tag for the SM Agent, and pulled it before running these tests.

roobre commented 2 weeks ago

I've confirmed this. There are a couple things causing this, one is a bug that https://github.com/grafana/synthetic-monitoring-agent/pull/731 will solve, and the other is that, for multihttp in particular, this denylist is not configurable: https://github.com/grafana/synthetic-monitoring-agent/blob/76926b459138758778300cbba051961e4911f3da/internal/prober/multihttp/script.tmpl#L43

I've played a bit with how making this customizable for multihttp, but that requires a bit more of work and I think should be prioritized.

roobre commented 2 weeks ago

This should be mostly solved in v0.24.3, except for the caveat mentioned in https://github.com/grafana/synthetic-monitoring-agent/issues/735

Closing this one in favor of 735.