feat(netprobe): HTTP/DoH probes v2 — success criteria, TLS cert expiry, headers/proxy/mTLS#793
feat(netprobe): HTTP/DoH probes v2 — success criteria, TLS cert expiry, headers/proxy/mTLS#793leoparente wants to merge 14 commits into
Conversation
…onse size/cert expiry results
… cert_expiry passthrough
…get headers, proxy, tls, UA
…_size_bytes metrics
… body, redaction; docs
…T /api/v1/taps echoed raw headers/proxy/body)
LCOV of commit
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2a43a61c78
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…; configurable body_check_max_bytes
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f7b8d411da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ul wrap could accept them as an in-range code)
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e439a84aac
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… (max suppressed alerts after cert downgrade)
b283ae1 to
ce21bf9
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce21bf9701
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…msg (probes log it on transport failure)
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0ec1b0f57
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ders (libcurl re-sends them cross-host, leaking secret headers)
b3b4b46 to
3c6976e
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c6976e4d8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…8 resends the payload to the redirect target)
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
v2 of the netprobe HTTP/DoH probes (#792 follow-up): benchmark parity with cloudprober's HTTP probe and a superset of the OTel httpcheckreceiver's feature set.
New capabilities (http test type unless noted):
expected_status/failure_status(exact codes,Nxxclasses,A-Branges; failure list evaluated first, cloudprober semantics) and response-body checks (expected_bodysubstring ANDexpected_body_regex), with a newcontent_failurescounter distinct fromhttp_status_failures.tls_cert_expiry_epoch_secper target (unix timestamp of the chain's earliestnotAfter, blackbox_exporter convention; http + doh) viaCURLOPT_CERTINFOon the existing transfers. A probe-side cache stamps the last-known expiry onto every sample so the metric doesn't flap with keep-alive connection reuse (CERTINFO only populates on fresh handshakes).Authorization) with strict redaction: header values, proxy value, and request body never appear ininfo_json, the taps API, logs, or error messages — only header names are surfaced.body, POST/PUT/PATCH only) andresponse_size_bytesquantiles.proxy, http+doh) and TLS options (tls.verify/tls.ca_file/tls.cert_file+tls.key_filefor mTLS).User-Agent: pktvisor/<version>(overridable via headers).Design notes
HttpSamplePOD so future fields don't churn the signal signatures.HttpCheckunit with direct tests; cert dates parse viacurl_getdate()and file checks usestd::filesystem(MSVC-portable — no POSIX-only APIs).GET /api/v1/taps,Policy::info_json) became a disclosure path — fixed via a newInputModulePlugin::redact_config_json()hook that Tap serialization invokes, backed by the same scrub used by the input's owninfo_json, with dump-and-grep tests proving no secret literal survives either path.topn_count/topn_percentile_thresholdapply to the netprobe TopN metrics; keep-alive comes free from the per-stream curl_multi connection pool (documented).Out of scope (future)
json_path/size validations, OAuth token refresh, header validators,requests_per_probe,resolve_first,ip_versionforcing, DoH EDNS/DNSSEC. A pre-existing scrape-time pattern (emit-vehicle counters mutated under a shared lock, same as v1response_min_us/max_us) is noted for a separate cleanup.Testing
unit-tests-visor-http-check(32) — status grammar, body checks, cert-date parsing (incl. leading-space CERTINFO format).unit-tests-visor-http-client(51) — proxy-through-forward-proxy (absolute-form proof against a TEST-NET target), UA echo, response size, TLS option wiring, cert==0 on plain http, plus all v1 cases.unit-tests-input-netprobe(148) — config grammar/scoping/consistency errors (secret-free messages), both redaction paths (moduleinfo_json+ tap-shaped scrub), and e2e: per-target auth headers (both outcomes),expected_status401-flip,failure_statusprecedence, body match/mismatch →content_failures, POST body echo.unit-tests-handler-netprobe(100) — classification matrix, cert-expiry latest-wins/merge-max,response_size_bytesgating, merge coverage.All suites pass locally (Release, 3× stable on the e2e suite).
🤖 Generated with Claude Code