caas-team / sparrow

A monitoring tool to gather infrastructure network information
Apache License 2.0
6 stars 4 forks source link

fix: enrich targets now accepts any scheme #149

Closed niklastreml closed 3 weeks ago

niklastreml commented 3 weeks ago

Motivation

Closes #148

This improves the logic in enrichTargets to account for any scheme, be that http, https, tcp whatever floats your boat, as long as it's a valid url we're happy.

Changes

Parse the url into a net.Url so we grab the dns name in an easier way for the dns check.

For additional information look at the commits.

Tests done

I've tested it with the latency and dns check enabled using mixed set of targets configured with HTTP and HTTPS. Seemed to work fine

TODO

niklastreml commented 3 weeks ago

as far as the flaky test goes, I don't have time to look into it, but I'll file a bug report

niklastreml commented 3 weeks ago

Created the issue #150