Do you mean, you want one probe that tests TCP connection and the "SMTP" banner only; and another job that tests further including STARTTLS and the certificate?
Then just make two blackbox tests, one for each of those cases. You want different scrape_interval for them? Then just make two prometheus scrape jobs, and put one test under the first job, and the other test under the second job. You want to use different evaluation_interval? Then make two different alerting rule groups, with different evaluation intervals, and put one alerting rule under each. On Tuesday, 9 August 2022 at 09:25:18 UTC+1 [email protected] wrote: > Thank you Brian. I know. > > I already use smtp_starttls to check the connection with mail server. I > found smtp_starttls also exposed ssl cert related metrics. > But now I want to take ssl cert check out from the job which is for > checking SMTP. Because I want to set different scrape_interval and > evaluation inverval for the cert check. > > Any good suggestion? > > On Tuesday, August 9, 2022 at 4:17:34 PM UTC+8 Brian Candler wrote: > >> Sigh. We've been through all this with you before in great detail. >> https://groups.google.com/g/prometheus-users/c/LZbihDncIig/m/cqAA-UtdAQAJ >> >> Port 587 is SMTP submission, and it does not perform TLS on connection. >> Try "telnet dns 587" and you'll see it responds in plain text, which is >> just what the error message told you: "tls: first record does not look like >> a TLS handshake" >> >> To get it to do TLS, you need to send the "starttls" command before >> starting the TLS negotiation, like this example >> <https://github.com/prometheus/blackbox_exporter/blob/master/example.yml#L91-L104> >> and >> in the thread linked above. >> > -- 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/8a03bf7a-3ea4-4a62-9e2e-068d740728d3n%40googlegroups.com.

