Categorygithub.com/sciencemesh/blackbox_exporter
modulepackage
0.0.0-20220419144522-1fee0d95e69f
Repository: https://github.com/sciencemesh/blackbox_exporter.git
Documentation: pkg.go.dev

# README

Blackbox Exporter - ScienceMesh edition

This is a fork of the Blackbox Exporter extended for the ScienceMesh project.

Documentation

The original documentation of the Blackbox Exporter can be found here.

The Nagios prober

The main extension of this fork is the addition of a Nagios prober which can be used to perform checks using any Nagios probe. It can be configured as follows:

modules:
  nagios_test:
    prober: nagios
    nagios:
      check: check_test
      args:
        - --host $target$
        - --something=42
      proxy_url: 'http://someproxy:80'
      treat_warnings_as_failure: true

The following values are supported for the nagios prober:

ValueDescriptionDefault
checkThe check name; the corresponding binary must either reside in the checks subdirectory or anywhere on the system's PATH environment variable.
argsAn array of command-line arguments passed to the Nagios probe; see below for placeholders support.[]
proxy_urlAn optional proxy URL to use; note that this only sets corresponding environment variables internally (HTTP_PROXY, HTTPS_PROXY, etc.), so the Nagios probe needs to utilize these.
treat_warnings_as_failureThe Blackbox Exporter reports whether a check succeeded in the probe_succes metric; if this setting is set to true, a Warning result will be treated as an unsuccessful check.false

Argument placeholders

Placeholders in arguments passed to the Nagios probe via the args value have the form $name$:

args:
  - --host $target$ 

The following standard placeholders are supported:

PlaceholderDescription
targetThe full host name that should be used as the Nagios probe's target.
target_hostIf the target is a URL, this contains the host name of that URL.
target_portIf the target is a URL, this contains the host port of that URL.
target_schemeIf the target is a URL, this contains the scheme of that URL.
target_pathIf the target is a URL, this contains the path of that URL.
target_baseIf the target is a URL, this contains the scheme plus host name of that URL.
testclient_idThe ID of the site-specific test client.
testclient_secretThe secret of the site-specific test client.

Any additional parameters passed by URL can also be used as placeholders:

http://blackbox.example.com/probe?module=nagios_test&target=google.com&my_param=123

The custom parameter my_param can then be accessed as $my_param$ in the probe arguments.

Also note that placeholder names are not case-sensitive.

A note on building

The included Makefile should only be used for building inside a Docker container.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

DebugOutput returns plaintext debug output for a probe.

# Variables

No description provided by the author