could you help to review if the following configuration is right?

- job_name: smtp
        metrics_path: /probe
        params:
          module: [smtp_starttls]
        static_configs:
          - targets:
              - 127.0.0.1
        relabel_configs:
          - source_labels: [__address__]
            target_label: __param_target
          - source_labels: [__param_target]
            target_label: instance
          - target_label: __address__
            replacement: prometheus-blackbox-exporter:9115

smtp_starttls:
        prober: tcp
        timeout: 5s
        tcp:
          query_response:
            - expect: "^220 ([^ ]+) ESMTP (.+)$"
            - send: "EHLO prober\r"
            - expect: "^250-STARTTLS"
            - send: "STARTTLS\r"
            - expect: "^220"
            - starttls: true
            - send: "EHLO prober\r"
            - expect: "^250-AUTH"
            - send: "QUIT\r"
On Wednesday, May 18, 2022 at 8:21:43 PM UTC+8 [email protected] wrote:

> It's really just TCP with some scripted interactions. Look at the steps in 
> your configuration to see exactly what they are.
>
> /MR
>
> On Wed, May 18, 2022, 14:11 nina guo <[email protected]> wrote:
>
>>
>> still have 2 questions:
>> - which module can be used to implement Nagios check_ldap_startTLS?
>> - Is there a way to know what does smtp_startTLS module exactly do?
>> On Wednesday, May 18, 2022 at 7:55:28 PM UTC+8 nina guo wrote:
>>
>>> Is there a way to know what does smtp_startTLS module exactly do?
>>>
>>> On Wednesday, May 18, 2022 at 7:36:37 PM UTC+8 nina guo wrote:
>>>
>>>> Thank you very much.
>>>>
>>>> On Wednesday, May 18, 2022 at 7:18:17 PM UTC+8 [email protected] 
>>>> wrote:
>>>>
>>>>> Yes, that should work. If you have trouble, open(curl) the scrape URL 
>>>>> but add &debug=true to see what happens.
>>>>>
>>>>> /MR
>>>>>
>>>>> On Wed, May 18, 2022, 12:34 nina guo <[email protected]> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Can I use the following mode to implement Nagios check_smtp?
>>>>>>
>>>>>> smtp_starttls:
>>>>>>
>>>>>> prober: tcp
>>>>>>
>>>>>> timeout: 5s
>>>>>>
>>>>>> tcp:
>>>>>>
>>>>>> query_response:
>>>>>>
>>>>>> - expect: "^220 ([^ ]+) ESMTP (.+)$"
>>>>>>
>>>>>> - send: "EHLO prober\r"
>>>>>>
>>>>>> - expect: "^250-STARTTLS"
>>>>>>
>>>>>> - send: "STARTTLS\r"
>>>>>>
>>>>>> - expect: "^220"
>>>>>>
>>>>>> - starttls: true
>>>>>>
>>>>>> - send: "EHLO prober\r"
>>>>>>
>>>>>> - expect: "^250-AUTH"
>>>>>>
>>>>>> - send: "QUIT\r"
>>>>>>
>>>>>> smtp_starttls:
>>>>>>
>>>>>> prober: tcp
>>>>>>
>>>>>> timeout: 5s
>>>>>>
>>>>>> tcp:
>>>>>>
>>>>>> query_response:
>>>>>>
>>>>>> - expect: "^220 ([^ ]+) ESMTP (.+)$"
>>>>>>
>>>>>> - send: "EHLO prober\r"
>>>>>>
>>>>>> - expect: "^250-STARTTLS"
>>>>>>
>>>>>> - send: "STARTTLS\r"
>>>>>>
>>>>>> - expect: "^220"
>>>>>>
>>>>>> - starttls: true
>>>>>>
>>>>>> - send: "EHLO prober\r"
>>>>>>
>>>>>> - expect: "^250-AUTH"
>>>>>>
>>>>>> - send: "QUIT\r" 
>>>>>>
>>>>>> -- 
>>>>>> 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/22fa8e2d-dd7f-4a02-8c26-efb1b12824edn%40googlegroups.com
>>>>>>  
>>>>>> <https://groups.google.com/d/msgid/prometheus-users/22fa8e2d-dd7f-4a02-8c26-efb1b12824edn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>> -- 
>> 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/da05f78f-f034-4b59-9a43-ad30049d1083n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/prometheus-users/da05f78f-f034-4b59-9a43-ad30049d1083n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/e314d256-b2b3-4e6b-8b73-9d9bc559194fn%40googlegroups.com.

Reply via email to