Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect probe logs to stdout #1082

Closed
jkroepke opened this issue Jun 26, 2023 · 6 comments
Closed

Redirect probe logs to stdout #1082

jkroepke opened this issue Jun 26, 2023 · 6 comments

Comments

@jkroepke
Copy link
Contributor

Host operating system: output of uname -a

Linux

blackbox_exporter version: output of blackbox_exporter --version

0.24.0

What is the blackbox.yml module config.

Details
modules:
    grpc:
        prober: grpc
        http:
            ip_protocol_fallback: true
            follow_redirects: true
            enable_http2: true
        tcp:
            ip_protocol_fallback: true
        icmp:
            ip_protocol_fallback: true
            ttl: 64
        dns:
            ip_protocol_fallback: true
            recursion_desired: true
        grpc:
            tls: true
            ip_protocol_fallback: true
            preferred_ip_protocol: ip4
    grpc_plain:
        prober: grpc
        http:
            ip_protocol_fallback: true
            follow_redirects: true
            enable_http2: true
        tcp:
            ip_protocol_fallback: true
        icmp:
            ip_protocol_fallback: true
            ttl: 64
        dns:
            ip_protocol_fallback: true
            recursion_desired: true
        grpc:
            service: service1
            ip_protocol_fallback: true
    http_2xx:
        prober: http
        http:
            preferred_ip_protocol: ip4
            ip_protocol_fallback: true
            follow_redirects: true
            enable_http2: true
        tcp:
            ip_protocol_fallback: true
        icmp:
            ip_protocol_fallback: true
            ttl: 64
        dns:
            ip_protocol_fallback: true
            recursion_desired: true
    http_post_2xx:
        prober: http
        http:
            ip_protocol_fallback: true
            method: POST
            follow_redirects: true
            enable_http2: true
        tcp:
            ip_protocol_fallback: true
        icmp:
            ip_protocol_fallback: true
            ttl: 64
        dns:
            ip_protocol_fallback: true
            recursion_desired: true
    icmp:
        prober: icmp
        http:
            ip_protocol_fallback: true
            follow_redirects: true
            enable_http2: true
        tcp:
            ip_protocol_fallback: true
        icmp:
            ip_protocol_fallback: true
            ttl: 64
        dns:
            ip_protocol_fallback: true
            recursion_desired: true
    icmp_ttl5:
        prober: icmp
        timeout: 5s
        http:
            ip_protocol_fallback: true
            follow_redirects: true
            enable_http2: true
        tcp:
            ip_protocol_fallback: true
        icmp:
            ip_protocol_fallback: true
            ttl: 5
        dns:
            ip_protocol_fallback: true
            recursion_desired: true
    irc_banner:
        prober: tcp
        http:
            ip_protocol_fallback: true
            follow_redirects: true
            enable_http2: true
        tcp:
            ip_protocol_fallback: true
            query_response:
                - send: NICK prober
                - send: USER prober prober prober :prober
                - expect: PING :([^ ]+)
                  send: PONG ${1}
                - expect: ^:[^ ]+ 001
        icmp:
            ip_protocol_fallback: true
            ttl: 64
        dns:
            ip_protocol_fallback: true
            recursion_desired: true
    pop3s_banner:
        prober: tcp
        http:
            ip_protocol_fallback: true
            follow_redirects: true
            enable_http2: true
        tcp:
            ip_protocol_fallback: true
            query_response:
                - expect: ^+OK
            tls: true
        icmp:
            ip_protocol_fallback: true
            ttl: 64
        dns:
            ip_protocol_fallback: true
            recursion_desired: true
    ssh_banner:
        prober: tcp
        http:
            ip_protocol_fallback: true
            follow_redirects: true
            enable_http2: true
        tcp:
            ip_protocol_fallback: true
            query_response:
                - expect: ^SSH-2.0-
                - send: SSH-2.0-blackbox-ssh-check
        icmp:
            ip_protocol_fallback: true
            ttl: 64
        dns:
            ip_protocol_fallback: true
            recursion_desired: true
    tcp_connect:
        prober: tcp
        http:
            ip_protocol_fallback: true
            follow_redirects: true
            enable_http2: true
        tcp:
            ip_protocol_fallback: true
        icmp:
            ip_protocol_fallback: true
            ttl: 64
        dns:
            ip_protocol_fallback: true
            recursion_desired: true

What is the prometheus.yml scrape config.

N/A

I would like to see the logs produced by the probe on the stdout of the containers. --log.level=error, the log could be reduiced to a minimum.

This avoid the required to make the export web ui Accessable.

@rei-ber
Copy link

rei-ber commented Oct 19, 2023

I am also interested in this feature :) Is there any plan to implement it or another option to get the logs into stdout?

@jkroepke
Copy link
Contributor Author

@rei-ber PR is merged: #1091

@rei-ber
Copy link

rei-ber commented Oct 23, 2023

Thanks for implementing :)
When do you deploy a new release, which contains this feature?

@jkroepke
Copy link
Contributor Author

I'm not a maintainer here, maybe @electron0zero cam give us some details.

@electron0zero
Copy link
Member

it will be in next release but we don't have timeline for next release, in the meantime you can use docker images built from master branch. we publish them here: https://quay.io/repository/prometheus/blackbox-exporter?tab=info

another option is build it from master and use that. building it is fairly easy, see https://github.com/prometheus/blackbox_exporter?tab=readme-ov-file#building-the-software for details.

@frittentheke
Copy link

frittentheke commented Oct 30, 2024

@electron0zero can this be closed? I suppose the release 0.25.0 now does what @rei-ber and @jkroepke want via --log.prober arg?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants