File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " oxybox"
3- version = " 1.0.0 "
3+ version = " 1.0.1 "
44authors = [" Thomas Luijken" ]
55categories = [" command-line-utilities" ]
66description = " A drop in replacement for blackbox exporter for Prometheus, with support for TLS and HTTP/3."
Original file line number Diff line number Diff line change @@ -346,7 +346,24 @@ async fn handle_target_probe(
346346 }
347347 }
348348 Err ( e) => {
349+ // in case we cannot probe the url, send a failed probe with zeroed metrics
349350 println ! ( "[{padded_tenant}] ❌ Probe error for {url}: {e}" ) ;
351+ let probe = ProbeResult {
352+ url : url. to_string ( ) ,
353+ dns_time : None ,
354+ connect_time : None ,
355+ tls_time : None ,
356+ processing_time : None ,
357+ cert_validity_seconds : None ,
358+ http_status : None ,
359+ http_version : None ,
360+ transfer_time : None ,
361+ total_probe_time : 0.0 ,
362+ } ;
363+ let metrics = create_probe_metrics ( & probe, false ) ;
364+ if let Err ( e) = send_to_mimir ( mimir_target, Some ( org_id) , metrics) . await {
365+ println ! ( "[{padded_tenant}] Failed to send error metrics for {url}: {e}" ) ;
366+ }
350367 }
351368 }
352369}
You can’t perform that action at this time.
0 commit comments