Consider adding unit to probe_http_content_length metric
According to Prometheus naming convention, metrics should end with unit, so perhaps probe_http_content_length metric could be renamed to probe_http_content_length_bytes, so it is immediately obvious with what kind of data you work with.
According to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Length, Content-Length header is always expressed in bytes though, so feel free to close this issue if it does not make sense.
This makes sense, the blackbox exporter is kinda old and many of the metric names and semantics aren't the best given we now have things like staleness. I'd prefer to fix them all up in one go, rather than breaking things in dribs and drabs.
Yeah, while going trough output of HTTP probes, I found a bit more:
probe_http_content_lengthandprobe_http_uncompressed_body_lengthshould be unified, I thinkbody_lengthandcontent_lengthis the same- I'm not sure if
probeis good prefix for the metrics, Maybeblackbox_probe? I'm not sure :) probe_failed_due_to_regexcould be made into something likeprobe_failed{reason="regex"}, so there can also bereason="tls_handshake",reason="nxdomain"
I could perhaps come up with more ideas if that make sense. I'm just starting working with blackbox exporter, but so far, it looks great :)
I think body_length and content_length is the same
They're different.
I'm not sure if probe is good prefix for the metrics
It's fine.
probe_failed{reason="regex"}
That's a bit messy semantically, as some entries may not always be present.
I think it would be a breaking change to change metric names underneath users.
if we do this, it should be done in a opt-in style where users who wish to get units can enable a flag and get the metric names with units and avoid breaking it for users who wish to keep using the existing names.
@invidian checking in to see if still you wish to work on it. if you don't wish to work on it, feel free to close this issue.