diff --git a/kas-pypcc-rpi.yml b/kas-pypcc-rpi.yml index f15ed3f54ce709f8f82ea60ae3df4e1124dcb420..40595f3cb87a2ff04c9098963ab3a24f4567d208 100644 --- a/kas-pypcc-rpi.yml +++ b/kas-pypcc-rpi.yml @@ -86,7 +86,7 @@ local_conf_header: DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit" VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_initscripts = "systemd-compat-units" - IMAGE_INSTALL:append = "ntp python3-pypcc python3-halibut-ipconfig vcgencmd dtc i2c-tools swupdate swupdate-www libgpiod libgpiod-tools libgpiod-dev kernel-module-i2c-gpio" + IMAGE_INSTALL:append = "node-exporter ntp python3-pypcc python3-halibut-ipconfig vcgencmd dtc i2c-tools swupdate swupdate-www libgpiod libgpiod-tools libgpiod-dev kernel-module-i2c-gpio" IMAGE_FSTYPES = "tar.bz2 ext4 ext4.gz wic.bz2 wic.bmap" SWUPDATE_IMAGES_FSTYPES[core-image-full-cmdline] = ".ubifs" IMAGE_BOOT_FILES:append = "halibut.dtbo;overlays/halibut.dtbo" diff --git a/recipes/node-exporter_1.9.1.bb b/recipes/node-exporter_1.9.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..e8fa1332e6e56b1566d50549e8bb82b5294eb59f --- /dev/null +++ b/recipes/node-exporter_1.9.1.bb @@ -0,0 +1,26 @@ +SUMMARY = "Prometheus Node Exporter - hardware and OS metrics exporter" +HOMEPAGE = "https://github.com/prometheus/node_exporter" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${GO_INSTALL}/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI = "git://github.com/prometheus/node_exporter.git;branch=release-1.8;protocol=https" +SRCREV = "f1e0e8360aa60b6cb5e5cc1560bed348fc2c1895" +PV = "1.8.2" + +GO_IMPORT = "github.com/prometheus/node_exporter" +GO_INSTALL = "src/${GO_IMPORT}/" + +inherit go go-mod + +export GO111MODULE = "on" +export GOPROXY = "https://proxy.golang.org" + +FILES:${PN} += "\ + ${systemd_unitdir}/system/*.service \ +" + +do_install() { + install -Dm755 bin/linux_arm64/node_exporter ${D}${bindir}/node_exporter + install -Dm644 ${S}/${GO_INSTALL}/examples/systemd/node_exporter.service ${D}${systemd_unitdir}/system/node_exporter.service +}