On Monday, 6 July 2020 18:59:16 UTC+1, [email protected] wrote:
>
> Hi. On some of my services I have setup some TCP Port Checks using 
> blackbox. Now, I want those checks to be critical based on the Response 
> Time of those TCP Checks. Is it possible to do so?
>
>
Yes.

You didn't show your alerting rules.  Are they using "probe_success" by any 
chance?  There are other metrics you can use.  Just type "probe_" into the 
Prometheus web UI and look for the auto-completions.

Here is an example.  blackbox.yml:

modules:
  certificate:
    prober: tcp
    timeout: 5s
    tcp:
      tls: true
      tls_config: {}

curl 'localhost:9115/probe?module=certificate&target=www.google.com:443'
# HELP probe_dns_lookup_time_seconds Returns the time taken for probe dns 
lookup in seconds
# TYPE probe_dns_lookup_time_seconds gauge
probe_dns_lookup_time_seconds 0.001341219
*# HELP probe_duration_seconds Returns how long the probe took to complete 
in seconds*
*# TYPE probe_duration_seconds gauge*
*probe_duration_seconds 0.375832381*
# HELP probe_failed_due_to_regex Indicates if probe failed due to regex
# TYPE probe_failed_due_to_regex gauge
probe_failed_due_to_regex 0
# HELP probe_ip_addr_hash Specifies the hash of IP address. It's useful to 
detect if the IP address changes.
# TYPE probe_ip_addr_hash gauge
probe_ip_addr_hash 1.255276657e+09
# HELP probe_ip_protocol Specifies whether probe ip protocol is IP4 or IP6
# TYPE probe_ip_protocol gauge
probe_ip_protocol 6
# HELP probe_ssl_earliest_cert_expiry Returns earliest SSL cert expiry date
# TYPE probe_ssl_earliest_cert_expiry gauge
probe_ssl_earliest_cert_expiry 1.599661882e+09
# HELP probe_ssl_last_chain_expiry_timestamp_seconds Returns last SSL chain 
expiry in unixtime
# TYPE probe_ssl_last_chain_expiry_timestamp_seconds gauge
probe_ssl_last_chain_expiry_timestamp_seconds 1.599661882e+09
# HELP probe_success Displays whether or not the probe was a success
# TYPE probe_success gauge
probe_success 1
# HELP probe_tls_version_info Returns the TLS version used, or NaN when 
unknown
# TYPE probe_tls_version_info gauge
probe_tls_version_info{version="TLS 1.3"} 1

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/7d96d8bf-cdfc-467e-8778-767cccb95f29o%40googlegroups.com.

Reply via email to