Page MenuHomeFreeBSD

NEW PORT: sysutils/blackbox_exporter
ClosedPublic

Authored by fabian.freyer_physik.tu-berlin.de on Feb 27 2018, 6:35 PM.
Tags
None
Referenced Files
F81660451: D14537.diff
Fri, Apr 19, 2:47 PM
Unknown Object (File)
Mon, Apr 15, 10:53 PM
Unknown Object (File)
Thu, Apr 11, 12:12 PM
Unknown Object (File)
Mar 10 2024, 5:46 AM
Unknown Object (File)
Feb 1 2024, 9:38 PM
Unknown Object (File)
Feb 1 2024, 9:38 PM
Unknown Object (File)
Feb 1 2024, 9:35 PM
Unknown Object (File)
Jan 16 2024, 12:38 AM

Details

Summary

blackbox_exporter is a prometheus exporter that allows
blackbox probing of endpoints over HTTP, HTTPS, DNS, TCP
and ICMP.

see bugzilla: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226250

Test Plan
make install
sysrc blackbox_exporter_enable="YES"
cat > /usr/local/etc/blackbox_exporter.yml << EOF
modules:
  http_2xx:
    prober: http
    timeout: 5s
    http:
      valid_http_versions: ["HTTP/1.1", "HTTP/2"]
      valid_status_codes: []  # Defaults to 2xx
      method: GET
      headers:
        Host: vhost.example.com
        Accept-Language: en-US
      no_follow_redirects: false
      fail_if_ssl: false
      fail_if_not_ssl: false
      fail_if_matches_regexp:
        - "Could not connect to database"
      fail_if_not_matches_regexp:
        - "Download the latest version here"
      tls_config:
        insecure_skip_verify: false
      preferred_ip_protocol: "ip4" # defaults to "ip6"
EOF
service blackbox_exporter start
curl http://localhost:9115/probe\?target=www.prometheus.io\&module=http_2xx

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sysutils/blackbox_exporter/Makefile
4 ↗(On Diff #39804)
17 ↗(On Diff #39804)

why += ?

26 ↗(On Diff #39804)

Never, ever, use CP to install files, always use INSTALL_* macros, here, INSTALL_DATA.

sysutils/blackbox_exporter/pkg-plist
2 ↗(On Diff #39804)

As a side note, you should run the rc file through devel/rclint to make sure it conforms to our standards. Optionnally, you could also run it through devel/hs-ShellCheck to make sure there are no obvious bugs :-)

sysutils/blackbox_exporter/Makefile
4–5 ↗(On Diff #39822)
sysutils/blackbox_exporter/files/blackbox_exporter.in
32–33 ↗(On Diff #39822)

nothing should ever run as nobody, it's the group nobody uses.

53 ↗(On Diff #39822)

This is never defined, so, can't really work.

sysutils/blackbox_exporter/files/pkg-message.in
2–3 ↗(On Diff #39822)
and run "sysrc ​blackbox_exporter_enable=yes"
fabian.freyer_physik.tu-berlin.de added inline comments.
sysutils/blackbox_exporter/files/blackbox_exporter.in
32–33 ↗(On Diff #39822)

Ah, I just copied that from sysutils/node_exporter. What user should it run as then?

53 ↗(On Diff #39822)

You're right, I will remove this block, it's a relic from sysutils/node_exporter that I forgot to remove.

sysutils/blackbox_exporter/files/blackbox_exporter.in
32–33 ↗(On Diff #39822)

It should probably use another user, either shared with whatever blackbox or prometehus are using, or one of its own.

ping? Anything else I can do to improve this patch?

This revision is now accepted and ready to land.Mar 6 2018, 7:04 AM
This revision was automatically updated to reflect the committed changes.