Add and enable blackbox_exporter package
Some checks failed
dustin/metricspi/pipeline/head There was a failure building this commit
Some checks failed
dustin/metricspi/pipeline/head There was a failure building this commit
*blackbox_exporter* is a generic exporter for Prometheus that can be used to provide metrics about HTTP, etc. services. I use it to monitor the availability and responsiveness of websites I host.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
source "$BR2_EXTERNAL_metricspi_PATH/package/alertmanager/Config.in"
|
||||
source "$BR2_EXTERNAL_metricspi_PATH/package/blackbox_exporter/Config.in"
|
||||
source "$BR2_EXTERNAL_metricspi_PATH/package/grafana/Config.in"
|
||||
source "$BR2_EXTERNAL_metricspi_PATH/package/victoriametrics/Config.in"
|
||||
|
||||
@@ -110,6 +110,7 @@ BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
# BR2_TARGET_ROOTFS_TAR is not set
|
||||
BR2_PACKAGE_ALERTMANAGER=y
|
||||
BR2_PACKAGE_BLACKBOX_EXPORTER=y
|
||||
BR2_PACKAGE_GRAFANA=y
|
||||
BR2_PACKAGE_VICTORIAMETRICS=y
|
||||
BR2_PACKAGE_VICTORIAMETRICS_SINGLE=y
|
||||
|
||||
4
package/blackbox_exporter/Config.in
Normal file
4
package/blackbox_exporter/Config.in
Normal file
@@ -0,0 +1,4 @@
|
||||
config BR2_PACKAGE_BLACKBOX_EXPORTER
|
||||
bool "blackbox_exporter"
|
||||
help
|
||||
Prometheus Blackbox Exporter
|
||||
20
package/blackbox_exporter/blackbox_exporter.mk
Normal file
20
package/blackbox_exporter/blackbox_exporter.mk
Normal file
@@ -0,0 +1,20 @@
|
||||
###############################################################################
|
||||
#
|
||||
# Prometheus Blackbox Exporter
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
BLACKBOX_EXPORTER_VERSION = 0.22.0
|
||||
BLACKBOX_EXPORTER_SITE = $(call github,prometheus,blackbox_exporter,v$(BLACKBOX_EXPORTER_VERSION))
|
||||
BLACKBOX_EXPORTER_LICENSE = Apache-2.0
|
||||
BLACKBOX_EXPORTER_LICENSE_FILES = LICENSE
|
||||
|
||||
BLACKBOX_EXPORTER_LDFLAGS = -extldflags '-static'
|
||||
|
||||
define BLACKBOX_EXPORTER_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m u=rw,go=r \
|
||||
$(BR2_EXTERNAL_metricspi_PATH)/package/blackbox_exporter/blackbox_exporter.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/blackbox_exporter.service
|
||||
endef
|
||||
|
||||
$(eval $(golang-package))
|
||||
45
package/blackbox_exporter/blackbox_exporter.service
Normal file
45
package/blackbox_exporter/blackbox_exporter.service
Normal file
@@ -0,0 +1,45 @@
|
||||
[Unit]
|
||||
Description=Blackbox exporter
|
||||
Documentation=https://github.com/prometheus/blackbox_exporter/blob/master/README.md
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=exec
|
||||
ExecStart=/usr/bin/blackbox_exporter \
|
||||
--config.file=/etc/prometheus/blackbox.yml \
|
||||
--web.listen-address=[::1]:9115
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
|
||||
CapabilityBoundingSet=
|
||||
DeviceAllow=
|
||||
DevicePolicy=closed
|
||||
DynamicUser=yes
|
||||
LockPersonality=yes
|
||||
MemoryDenyWriteExecute=yes
|
||||
NoNewPrivileges=yes
|
||||
PrivateDevices=yes
|
||||
PrivateUsers=yes
|
||||
PrivateTmp=yes
|
||||
ProcSubset=pid
|
||||
ProtectClock=yes
|
||||
ProtectControlGroups=yes
|
||||
ProtectHome=yes
|
||||
ProtectHostname=yes
|
||||
ProtectKernelLogs=yes
|
||||
ProtectKernelModules=yes
|
||||
ProtectKernelTunables=yes
|
||||
ProtectProc=invisible
|
||||
ProtectSystem=strict
|
||||
RestrictAddressFamilies=AF_INET AF_INET6
|
||||
RestrictNamespaces=yes
|
||||
RestrictRealtime=yes
|
||||
RestrictSUIDSGID=yes
|
||||
SystemCallArchitectures=native
|
||||
SystemCallFilter=@system-service
|
||||
SystemCallFilter=~@privileged @resources
|
||||
UMask=0027
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user