prometheus blackbox exporter #4

Supports: xenial bionic focal
Add to new model

Description

The blackbox exporter allows blackbox probing of
endpoints over HTTP, HTTPS, DNS, TCP and ICMP.


Juju prometheus Blackbox exporter charm

This charm provides the Prometheus Blackbox exporter, part of the Prometheus monitoring system

The charm should be related to the prometheus charm

Configuration

To configure the blackbox exporter modules use the charm's modules config option.

As an example, if you store your exporter config in a local file called modules.yaml
you can update the charm's configuration using:

juju config prometheus-blackbox-exporter modules=@modules.yaml

To confirm configuration was set:

juju config prometheus-blackbox-exporter

Testing

This directory needs to be create in the charm path prior to testing

mkdir -p report/lint

Deployment

To avail of the metrics in grafana the following steps can be used

juju deploy grafana
juju deploy prometheus2
juju add-relation prometheus-blackbox-exporter:scrape prometheus2:target
juju add-relation prometheus-blackbox-exporter:dashboards grafana:dashboards

To setup reporting with nagios

juju deploy nrpe
juju add-relation prometheus-blackbox-exporter:nrpe-external-master  nrpe:nrpe-external-master

Change or update dashboards

# To provide your own dashboards, create a zip file and attach it as a resource 
zip grafana-dashboards.zip blackbox-simple.json blackbox-advanced.json
juju attach-resource prometheus-blackbox-exporter dashboards=./grafana-dashboards.zip

Contact Information


Configuration

modules
(string) Blackbox exporter configuratin in raw YAML format
http_2xx: prober: http timeout: 10s tcp_connect: prober: tcp timeout: 10s icmp: prober: icmp timeout: 10s
nagios_context
(string) A string that will be prepended to instance name to set the host name in nagios. So for instance the hostname would be something like: juju-myservice-0 If you're running multiple environments with the same services in them this allows you to differentiate between them.
juju
nagios_servicegroups
(string) Comma separated list of nagios servicegroups
juju
snap_channel
(string) If install_method is set to "snap" this option controlls channel name. Supported values are: "stable", "candidate", "beta" and "edge"
stable
snap_proxy
(string) DEPRECATED. Use snap-http-proxy and snap-https-proxy model configuration settings. HTTP/HTTPS web proxy for Snappy to use when accessing the snap store.
snap_proxy_url
(string) DEPRECATED. Use snap-store-proxy model configuration setting. The address of a Snap Store Proxy to use for snaps e.g. http://snap-proxy.example.com
snapd_refresh
(string) How often snapd handles updates for installed snaps. The default (an empty string) is 4x per day. Set to "max" to check once per month based on the charm deployment date. You may also set a custom string as described in the 'refresh.timer' section here: https://forum.snapcraft.io/t/system-options/87