These patches add the new package node_exporter as discussed in the form thread: https://community.ipfire.org/t/please-add-prometheus-exporter/3555
GO language is required to compile node_exporter. In order to compile node_exporter for i586 arch, "go" package supported architecture must be extended for this. You'll likely want to download packages and adjust DL_FROM variables in "go" and "node_exporter" LFS scripts.
Holger Sunke (2): Added i586/386 support for GO language required for node_exporter. Added new node_exporter package.
config/rootfiles/packages/node_exporter | 3 + lfs/Config | 4 + lfs/go | 6 +- lfs/node_exporter | 88 +++++++++++++++++++ make.sh | 1 + src/paks/node_exporter/install.sh | 31 +++++++ src/paks/node_exporter/uninstall.sh | 30 +++++++ src/paks/node_exporter/update.sh | 27 ++++++ ..._exporter-configurable-initd-options.patch | 48 ++++++++++ 9 files changed, 235 insertions(+), 3 deletions(-) create mode 100644 config/rootfiles/packages/node_exporter create mode 100644 lfs/node_exporter create mode 100644 src/paks/node_exporter/install.sh create mode 100644 src/paks/node_exporter/uninstall.sh create mode 100644 src/paks/node_exporter/update.sh create mode 100644 src/patches/node_exporter-configurable-initd-options.patch
--- lfs/Config | 4 ++++ lfs/go | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/lfs/Config b/lfs/Config index eadbbc408..4d0f2f00b 100644 --- a/lfs/Config +++ b/lfs/Config @@ -138,6 +138,10 @@ ifeq "$(BUILD_ARCH)" "aarch64" GOARCH = arm64 endif
+ifeq "$(BUILD_ARCH)" "i586" + GOARCH = 386 +endif + ############################################################################### # Common Macro Definitions ############################################################################### diff --git a/lfs/go b/lfs/go index 6ebb37080..97effcb84 100644 --- a/lfs/go +++ b/lfs/go @@ -28,10 +28,9 @@ VER = 1.15.4
THISAPP = go-$(VER) DL_FILE = go$(VER).$(GOOS)-$(GOARCH).tar.gz -DL_FROM = $(URL_IPFIRE) +DL_FROM = https://golang.org/dl/ DIR_APP = $(DIR_SRC)/go TARGET = $(DIR_INFO)/$(THISAPP) -SUP_ARCH = x86_64
############################################################################### # Top-level Rules @@ -41,7 +40,8 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 8e9d11a16f03372c82c5134278a0bd7d +go$(VER).$(GOOS)-amd64.tar.gz_MD5 = 8e9d11a16f03372c82c5134278a0bd7d +go$(VER).$(GOOS)-386.tar.gz_MD5 = 8d1c3539c88710273f61b0c810b7448c
install : $(TARGET)
Hi Holger,
On 06/05/2021 21:46, Holger Sunke wrote:
lfs/Config | 4 ++++ lfs/go | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/lfs/Config b/lfs/Config index eadbbc408..4d0f2f00b 100644 --- a/lfs/Config +++ b/lfs/Config @@ -138,6 +138,10 @@ ifeq "$(BUILD_ARCH)" "aarch64" GOARCH = arm64 endif
+ifeq "$(BUILD_ARCH)" "i586"
- GOARCH = 386
+endif
A question I would have here is if creating this package in i586 architecture makes sense when in 7 months the i586 version of IPFire will have reached End Of Life and will no longer be updated.
Regards,
Adolf
############################################################################### # Common Macro Definitions ############################################################################### diff --git a/lfs/go b/lfs/go index 6ebb37080..97effcb84 100644 --- a/lfs/go +++ b/lfs/go @@ -28,10 +28,9 @@ VER = 1.15.4
THISAPP = go-$(VER) DL_FILE = go$(VER).$(GOOS)-$(GOARCH).tar.gz -DL_FROM = $(URL_IPFIRE) +DL_FROM = https://golang.org/dl/ DIR_APP = $(DIR_SRC)/go TARGET = $(DIR_INFO)/$(THISAPP) -SUP_ARCH = x86_64
############################################################################### # Top-level Rules @@ -41,7 +40,8 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 8e9d11a16f03372c82c5134278a0bd7d +go$(VER).$(GOOS)-amd64.tar.gz_MD5 = 8e9d11a16f03372c82c5134278a0bd7d +go$(VER).$(GOOS)-386.tar.gz_MD5 = 8d1c3539c88710273f61b0c810b7448c
install : $(TARGET)
Hello Holger,
Thanks for this patch, but I am afraid it doesn’t do exactly what you intend to do.
On 6 May 2021, at 20:46, Holger Sunke holger.sunke@posteo.de wrote:
lfs/Config | 4 ++++ lfs/go | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/lfs/Config b/lfs/Config index eadbbc408..4d0f2f00b 100644 --- a/lfs/Config +++ b/lfs/Config @@ -138,6 +138,10 @@ ifeq "$(BUILD_ARCH)" "aarch64" GOARCH = arm64 endif
+ifeq "$(BUILD_ARCH)" "i586"
- GOARCH = 386
+endif
This is fine.
############################################################################### # Common Macro Definitions ############################################################################### diff --git a/lfs/go b/lfs/go index 6ebb37080..97effcb84 100644 --- a/lfs/go +++ b/lfs/go @@ -28,10 +28,9 @@ VER = 1.15.4
THISAPP = go-$(VER) DL_FILE = go$(VER).$(GOOS)-$(GOARCH).tar.gz -DL_FROM = $(URL_IPFIRE) +DL_FROM = https://golang.org/dl/ DIR_APP = $(DIR_SRC)/go TARGET = $(DIR_INFO)/$(THISAPP) -SUP_ARCH = x86_64
This however enables Go for all architectures including aarch64 and armv5tel which is not what you intend.
The correct solution would be to add i586 to the list of supported architectures.
However, I would object to only add Go for i586 because you personally use IPFire on this architecture (please not Adolf’s remarks on our schedule to discontinue i586). We only build Go for x86_64 because the only package that uses it is the Amazon SSM agent which is not relevant on any other architecture. node_exporter seems to be a package that could in theory run on any architecture and I feel that we should not discriminate by only building something for one architecture because we do not want to test it on any of the others.
-Michael
############################################################################### # Top-level Rules @@ -41,7 +40,8 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 8e9d11a16f03372c82c5134278a0bd7d +go$(VER).$(GOOS)-amd64.tar.gz_MD5 = 8e9d11a16f03372c82c5134278a0bd7d +go$(VER).$(GOOS)-386.tar.gz_MD5 = 8d1c3539c88710273f61b0c810b7448c
install : $(TARGET)
-- 2.30.2
Hello Michael,
Am 07.05.21 um 13:28 schrieb Michael Tremer:
Hello Holger,
Thanks for this patch, but I am afraid it doesn’t do exactly what you intend to do.
On 6 May 2021, at 20:46, Holger Sunke holger.sunke@posteo.de wrote:
lfs/Config | 4 ++++ lfs/go | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/lfs/Config b/lfs/Config index eadbbc408..4d0f2f00b 100644 --- a/lfs/Config +++ b/lfs/Config @@ -138,6 +138,10 @@ ifeq "$(BUILD_ARCH)" "aarch64" GOARCH = arm64 endif
+ifeq "$(BUILD_ARCH)" "i586"
- GOARCH = 386
+endif
This is fine.
############################################################################### # Common Macro Definitions ############################################################################### diff --git a/lfs/go b/lfs/go index 6ebb37080..97effcb84 100644 --- a/lfs/go +++ b/lfs/go @@ -28,10 +28,9 @@ VER = 1.15.4
THISAPP = go-$(VER) DL_FILE = go$(VER).$(GOOS)-$(GOARCH).tar.gz -DL_FROM = $(URL_IPFIRE) +DL_FROM = https://golang.org/dl/ DIR_APP = $(DIR_SRC)/go TARGET = $(DIR_INFO)/$(THISAPP) -SUP_ARCH = x86_64
This however enables Go for all architectures including aarch64 and armv5tel which is not what you intend.
The correct solution would be to add i586 to the list of supported architectures.
However, I would object to only add Go for i586 because you personally use IPFire on this architecture (please not Adolf’s remarks on our schedule to discontinue i586). We only build Go for x86_64 because the only package that uses it is the Amazon SSM agent which is not relevant on any other architecture. node_exporter seems to be a package that could in theory run on any architecture and I feel that we should not discriminate by only building something for one architecture because we do not want to test it on any of the others.
Not sure if I get you right, but finally I think I should change the Config to make "go" compile for _all_ architectures supported by ipfire as node_exporter depends on it.
Kind regards
Holger
-Michael
############################################################################### # Top-level Rules @@ -41,7 +40,8 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 8e9d11a16f03372c82c5134278a0bd7d +go$(VER).$(GOOS)-amd64.tar.gz_MD5 = 8e9d11a16f03372c82c5134278a0bd7d +go$(VER).$(GOOS)-386.tar.gz_MD5 = 8d1c3539c88710273f61b0c810b7448c
install : $(TARGET)
-- 2.30.2
Hello,
On 7 May 2021, at 19:19, Holger Sunke holger.sunke@posteo.de wrote:
Hello Michael,
Am 07.05.21 um 13:28 schrieb Michael Tremer:
Hello Holger, Thanks for this patch, but I am afraid it doesn’t do exactly what you intend to do.
On 6 May 2021, at 20:46, Holger Sunke holger.sunke@posteo.de wrote:
lfs/Config | 4 ++++ lfs/go | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/lfs/Config b/lfs/Config index eadbbc408..4d0f2f00b 100644 --- a/lfs/Config +++ b/lfs/Config @@ -138,6 +138,10 @@ ifeq "$(BUILD_ARCH)" "aarch64" GOARCH = arm64 endif
+ifeq "$(BUILD_ARCH)" "i586"
- GOARCH = 386
+endif
This is fine.
############################################################################### # Common Macro Definitions ############################################################################### diff --git a/lfs/go b/lfs/go index 6ebb37080..97effcb84 100644 --- a/lfs/go +++ b/lfs/go @@ -28,10 +28,9 @@ VER = 1.15.4
THISAPP = go-$(VER) DL_FILE = go$(VER).$(GOOS)-$(GOARCH).tar.gz -DL_FROM = $(URL_IPFIRE) +DL_FROM = https://golang.org/dl/ DIR_APP = $(DIR_SRC)/go TARGET = $(DIR_INFO)/$(THISAPP) -SUP_ARCH = x86_64
This however enables Go for all architectures including aarch64 and armv5tel which is not what you intend. The correct solution would be to add i586 to the list of supported architectures. However, I would object to only add Go for i586 because you personally use IPFire on this architecture (please not Adolf’s remarks on our schedule to discontinue i586). We only build Go for x86_64 because the only package that uses it is the Amazon SSM agent which is not relevant on any other architecture. node_exporter seems to be a package that could in theory run on any architecture and I feel that we should not discriminate by only building something for one architecture because we do not want to test it on any of the others.
Not sure if I get you right, but finally I think I should change the Config to make "go" compile for _all_ architectures supported by ipfire as node_exporter depends on it.
Yes, that is correct. We aim to treat all architectures the same. Sometimes that isn’t possible, but that isn’t the case here.
Best, -Michael
Kind regards
Holger
-Michael
############################################################################### # Top-level Rules @@ -41,7 +40,8 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 8e9d11a16f03372c82c5134278a0bd7d +go$(VER).$(GOOS)-amd64.tar.gz_MD5 = 8e9d11a16f03372c82c5134278a0bd7d +go$(VER).$(GOOS)-386.tar.gz_MD5 = 8d1c3539c88710273f61b0c810b7448c
install : $(TARGET)
-- 2.30.2
Hello Michael,
Am 11.05.21 um 11:53 schrieb Michael Tremer:
Hello,
On 7 May 2021, at 19:19, Holger Sunke holger.sunke@posteo.de wrote:
Hello Michael,
Am 07.05.21 um 13:28 schrieb Michael Tremer:
Hello Holger, Thanks for this patch, but I am afraid it doesn’t do exactly what you intend to do.
On 6 May 2021, at 20:46, Holger Sunke holger.sunke@posteo.de wrote:
lfs/Config | 4 ++++ lfs/go | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/lfs/Config b/lfs/Config index eadbbc408..4d0f2f00b 100644 --- a/lfs/Config +++ b/lfs/Config @@ -138,6 +138,10 @@ ifeq "$(BUILD_ARCH)" "aarch64" GOARCH = arm64 endif
+ifeq "$(BUILD_ARCH)" "i586"
- GOARCH = 386
+endif
This is fine.
############################################################################### # Common Macro Definitions ############################################################################### diff --git a/lfs/go b/lfs/go index 6ebb37080..97effcb84 100644 --- a/lfs/go +++ b/lfs/go @@ -28,10 +28,9 @@ VER = 1.15.4
THISAPP = go-$(VER) DL_FILE = go$(VER).$(GOOS)-$(GOARCH).tar.gz -DL_FROM = $(URL_IPFIRE) +DL_FROM = https://golang.org/dl/ DIR_APP = $(DIR_SRC)/go TARGET = $(DIR_INFO)/$(THISAPP) -SUP_ARCH = x86_64
This however enables Go for all architectures including aarch64 and armv5tel which is not what you intend. The correct solution would be to add i586 to the list of supported architectures. However, I would object to only add Go for i586 because you personally use IPFire on this architecture (please not Adolf’s remarks on our schedule to discontinue i586). We only build Go for x86_64 because the only package that uses it is the Amazon SSM agent which is not relevant on any other architecture. node_exporter seems to be a package that could in theory run on any architecture and I feel that we should not discriminate by only building something for one architecture because we do not want to test it on any of the others.
Not sure if I get you right, but finally I think I should change the Config to make "go" compile for _all_ architectures supported by ipfire as node_exporter depends on it.
Yes, that is correct. We aim to treat all architectures the same. Sometimes that isn’t possible, but that isn’t the case here.
Best, -Michael
Dou you have a list of all architectures supported by IPFire beyond i586(legacy), aarch64(=arm64?), x86_64 and arm?
Kind regards
Holger
-Michael
############################################################################### # Top-level Rules @@ -41,7 +40,8 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 8e9d11a16f03372c82c5134278a0bd7d +go$(VER).$(GOOS)-amd64.tar.gz_MD5 = 8e9d11a16f03372c82c5134278a0bd7d +go$(VER).$(GOOS)-386.tar.gz_MD5 = 8d1c3539c88710273f61b0c810b7448c
install : $(TARGET)
-- 2.30.2
Hello Holger,
On 21 May 2021, at 09:56, Holger Sunke holger.sunke@posteo.de wrote:
Hello Michael,
Am 11.05.21 um 11:53 schrieb Michael Tremer:
Hello,
On 7 May 2021, at 19:19, Holger Sunke holger.sunke@posteo.de wrote:
Hello Michael,
Am 07.05.21 um 13:28 schrieb Michael Tremer:
Hello Holger, Thanks for this patch, but I am afraid it doesn’t do exactly what you intend to do.
On 6 May 2021, at 20:46, Holger Sunke holger.sunke@posteo.de wrote:
lfs/Config | 4 ++++ lfs/go | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/lfs/Config b/lfs/Config index eadbbc408..4d0f2f00b 100644 --- a/lfs/Config +++ b/lfs/Config @@ -138,6 +138,10 @@ ifeq "$(BUILD_ARCH)" "aarch64" GOARCH = arm64 endif
+ifeq "$(BUILD_ARCH)" "i586"
- GOARCH = 386
+endif
This is fine.
############################################################################### # Common Macro Definitions ############################################################################### diff --git a/lfs/go b/lfs/go index 6ebb37080..97effcb84 100644 --- a/lfs/go +++ b/lfs/go @@ -28,10 +28,9 @@ VER = 1.15.4
THISAPP = go-$(VER) DL_FILE = go$(VER).$(GOOS)-$(GOARCH).tar.gz -DL_FROM = $(URL_IPFIRE) +DL_FROM = https://golang.org/dl/ DIR_APP = $(DIR_SRC)/go TARGET = $(DIR_INFO)/$(THISAPP) -SUP_ARCH = x86_64
This however enables Go for all architectures including aarch64 and armv5tel which is not what you intend. The correct solution would be to add i586 to the list of supported architectures. However, I would object to only add Go for i586 because you personally use IPFire on this architecture (please not Adolf’s remarks on our schedule to discontinue i586). We only build Go for x86_64 because the only package that uses it is the Amazon SSM agent which is not relevant on any other architecture. node_exporter seems to be a package that could in theory run on any architecture and I feel that we should not discriminate by only building something for one architecture because we do not want to test it on any of the others.
Not sure if I get you right, but finally I think I should change the Config to make "go" compile for _all_ architectures supported by ipfire as node_exporter depends on it.
Yes, that is correct. We aim to treat all architectures the same. Sometimes that isn’t possible, but that isn’t the case here. Best, -Michael
Dou you have a list of all architectures supported by IPFire beyond i586(legacy), aarch64(=arm64?), x86_64 and arm?
We currently support these architectures:
* x86_64 which is our primary architecture with by far the most users on it
* aarch64
* i586 which is currently deprecated and will be dropped soon (https://blog.ipfire.org/post/new-year-more-bits)
* armv5tel - this might be tricky because we do not have any floating-point support. However, the kernel requires that which means that you will at least need an armv6l processor in order to run on this. Depending on what Go provides upstream, armv6l might be fine.
Best, -Michael
Kind regards
Holger
-Michael
############################################################################### # Top-level Rules @@ -41,7 +40,8 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 8e9d11a16f03372c82c5134278a0bd7d +go$(VER).$(GOOS)-amd64.tar.gz_MD5 = 8e9d11a16f03372c82c5134278a0bd7d +go$(VER).$(GOOS)-386.tar.gz_MD5 = 8d1c3539c88710273f61b0c810b7448c
install : $(TARGET)
-- 2.30.2
--- config/rootfiles/packages/node_exporter | 3 + lfs/node_exporter | 88 +++++++++++++++++++ make.sh | 1 + src/paks/node_exporter/install.sh | 31 +++++++ src/paks/node_exporter/uninstall.sh | 30 +++++++ src/paks/node_exporter/update.sh | 27 ++++++ ..._exporter-configurable-initd-options.patch | 48 ++++++++++ 7 files changed, 228 insertions(+) create mode 100644 config/rootfiles/packages/node_exporter create mode 100644 lfs/node_exporter create mode 100644 src/paks/node_exporter/install.sh create mode 100644 src/paks/node_exporter/uninstall.sh create mode 100644 src/paks/node_exporter/update.sh create mode 100644 src/patches/node_exporter-configurable-initd-options.patch
diff --git a/config/rootfiles/packages/node_exporter b/config/rootfiles/packages/node_exporter new file mode 100644 index 000000000..20ec55174 --- /dev/null +++ b/config/rootfiles/packages/node_exporter @@ -0,0 +1,3 @@ +usr/bin/node_exporter +etc/node_exporter +etc/rc.d/init.d/node_exporter diff --git a/lfs/node_exporter b/lfs/node_exporter new file mode 100644 index 000000000..3bb4db60e --- /dev/null +++ b/lfs/node_exporter @@ -0,0 +1,88 @@ +############################################################################## +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 1.1.2 + +THISAPP = node_exporter-$(VER) +DL_FILE = $(THISAPP).tar.gz +#DL_FROM = https://github.com/prometheus/node_exporter/archive/refs/tags/v1.1.2.tar.gz +DL_FROM = https://github.com/prometheus/node_exporter/archive/v$(VER)/ +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) +PROG = node_exporter +PAK_VER = 1 + +DEPS = "" + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = 33c2be846dbd502f9c0efab149a8cbc5 + +install : $(TARGET) +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download : $(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +dist : + @$(PAK) + +############################################################################### +# Downloading, checking, md5sum +############################################################################### + +$(patsubst %,$(DIR_CHK)/%,$(objects)) : + @$(CHECK) + +$(patsubst %,$(DIR_DL)/%,$(objects)) : + @$(LOAD) + +$(subst %,%_MD5,$(objects)) : + @$(MD5) + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/node_exporter-configurable-initd-options.patch + cd $(DIR_APP) && make build $(MAKETUNING) $(EXTRA_MAKE) + cd $(DIR_APP) && cp node_exporter /usr/bin + cd $(DIR_APP) && cp examples/init.d/node_exporter /etc/init.d/ + echo '# Customize node_exporter command line options by editing OPTIONS below:' > /etc/node_exporter + echo 'export OPTIONS="--web.listen-address=:9100"' >> /etc/node_exporter + @rm -rf $(DIR_APP) + @$(POSTBUILD) + diff --git a/make.sh b/make.sh index 2da3aca21..df2995ec5 100755 --- a/make.sh +++ b/make.sh @@ -1640,6 +1640,7 @@ buildipfire() { lfsmake2 ncdu lfsmake2 lshw lfsmake2 socat + lfsmake2 node_exporter }
buildinstaller() { diff --git a/src/paks/node_exporter/install.sh b/src/paks/node_exporter/install.sh new file mode 100644 index 000000000..e9272d7cb --- /dev/null +++ b/src/paks/node_exporter/install.sh @@ -0,0 +1,31 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team info@ipfire.org. # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +extract_files +restore_backup ${NAME} +start_service --background ${NAME} + +ln -svf ../init.d/node_exporter /etc/rc.d/rc0.d/K30node_exporter +ln -svf ../init.d/node_exporter /etc/rc.d/rc3.d/S40node_exporter +ln -svf ../init.d/node_exporter /etc/rc.d/rc6.d/K30node_exporter diff --git a/src/paks/node_exporter/uninstall.sh b/src/paks/node_exporter/uninstall.sh new file mode 100644 index 000000000..710baf8b4 --- /dev/null +++ b/src/paks/node_exporter/uninstall.sh @@ -0,0 +1,30 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team info@ipfire.org. # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +/etc/init.d/node_exporter stop +make_backup ${NAME} +remove_files + +rm -rfv /etc/rc.d/rc*.d/*node_exporter + diff --git a/src/paks/node_exporter/update.sh b/src/paks/node_exporter/update.sh new file mode 100644 index 000000000..99776659c --- /dev/null +++ b/src/paks/node_exporter/update.sh @@ -0,0 +1,27 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007-2020 IPFire-Team info@ipfire.org. # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +extract_backup_includes +./uninstall.sh +./install.sh diff --git a/src/patches/node_exporter-configurable-initd-options.patch b/src/patches/node_exporter-configurable-initd-options.patch new file mode 100644 index 000000000..9f662f918 --- /dev/null +++ b/src/patches/node_exporter-configurable-initd-options.patch @@ -0,0 +1,48 @@ +diff -Nur node_exporter-1.1.2.orig/examples/init.d/node_exporter node_exporter-1.1.2/examples/init.d/node_exporter +--- node_exporter-1.1.2.orig/examples/init.d/node_exporter 2021-03-05 10:27:11.000000000 +0100 ++++ node_exporter-1.1.2/examples/init.d/node_exporter 2021-05-04 14:45:20.644729176 +0200 +@@ -2,9 +2,11 @@ + + RETVAL=0 + PROG="node_exporter" +-EXEC="/etc/node_exporter/node_exporter" ++EXEC="/usr/bin/node_exporter" + LOCKFILE="/var/lock/subsys/$PROG" +-OPTIONS="--web.listen-address=:9100" ++ ++# read configurable OPTIONS ++. /etc/node_exporter + + # Source function library. + if [ -f /etc/rc.d/init.d/functions ]; then +@@ -22,18 +24,16 @@ + echo -n "Starting $PROG: " + nohup $EXEC $OPTIONS >/dev/null 2>&1 & + RETVAL=$? +- [ $RETVAL -eq 0 ] && touch $LOCKFILE && success || failure +- echo ++ [ $RETVAL -eq 0 ] && touch $LOCKFILE && echo success || echo failure + return $RETVAL + fi + } + + stop() { + echo -n "Stopping $PROG: " +- killproc $EXEC ++ killproc $EXEC > /dev/null + RETVAL=$? +- [ $RETVAL -eq 0 ] && rm -r $LOCKFILE && success || failure +- echo ++ [ $RETVAL -eq 0 ] && rm -r $LOCKFILE && echo success || echo failure + } + + restart () +@@ -51,7 +51,7 @@ + stop + ;; + status) +- status $PROG ++ statusproc $PROG + ;; + restart) + restart
Hi Holger,
On 06/05/2021 21:46, Holger Sunke wrote:
config/rootfiles/packages/node_exporter | 3 + lfs/node_exporter | 88 +++++++++++++++++++ make.sh | 1 + src/paks/node_exporter/install.sh | 31 +++++++ src/paks/node_exporter/uninstall.sh | 30 +++++++ src/paks/node_exporter/update.sh | 27 ++++++ ..._exporter-configurable-initd-options.patch | 48 ++++++++++ 7 files changed, 228 insertions(+) create mode 100644 config/rootfiles/packages/node_exporter create mode 100644 lfs/node_exporter create mode 100644 src/paks/node_exporter/install.sh create mode 100644 src/paks/node_exporter/uninstall.sh create mode 100644 src/paks/node_exporter/update.sh create mode 100644 src/patches/node_exporter-configurable-initd-options.patch
diff --git a/config/rootfiles/packages/node_exporter b/config/rootfiles/packages/node_exporter new file mode 100644 index 000000000..20ec55174 --- /dev/null +++ b/config/rootfiles/packages/node_exporter @@ -0,0 +1,3 @@ +usr/bin/node_exporter +etc/node_exporter +etc/rc.d/init.d/node_exporter diff --git a/lfs/node_exporter b/lfs/node_exporter new file mode 100644 index 000000000..3bb4db60e --- /dev/null +++ b/lfs/node_exporter @@ -0,0 +1,88 @@ +############################################################################## +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +###############################################################################
+############################################################################### +# Definitions +###############################################################################
+include Config
+VER = 1.1.2
+THISAPP = node_exporter-$(VER) +DL_FILE = $(THISAPP).tar.gz +#DL_FROM = https://github.com/prometheus/node_exporter/archive/refs/tags/v1.1.2.tar.gz +DL_FROM = https://github.com/prometheus/node_exporter/archive/v$(VER)/ +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) +PROG = node_exporter +PAK_VER = 1
+DEPS = ""
+############################################################################### +# Top-level Rules +###############################################################################
+objects = $(DL_FILE)
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+$(DL_FILE)_MD5 = 33c2be846dbd502f9c0efab149a8cbc5
+install : $(TARGET) +check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+download : $(patsubst %,$(DIR_DL)/%,$(objects))
+md5 : $(subst %,%_MD5,$(objects))
+dist :
- @$(PAK)
+############################################################################### +# Downloading, checking, md5sum +###############################################################################
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
- @$(CHECK)
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
- @$(LOAD)
+$(subst %,%_MD5,$(objects)) :
- @$(MD5)
+############################################################################### +# Installation Details +###############################################################################
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
- @$(PREBUILD)
- @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
- cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/node_exporter-configurable-initd-options.patch
- cd $(DIR_APP) && make build $(MAKETUNING) $(EXTRA_MAKE)
- cd $(DIR_APP) && cp node_exporter /usr/bin
- cd $(DIR_APP) && cp examples/init.d/node_exporter /etc/init.d/
- echo '# Customize node_exporter command line options by editing OPTIONS below:' > /etc/node_exporter
- echo 'export OPTIONS="--web.listen-address=:9100"' >> /etc/node_exporter
The echo commands don't make sense here. No user will ever see them. They will only show up when a build is being carried out. If the expectation is that the user can customise things then this needs to be part of the config of the package, not of the build.
- @rm -rf $(DIR_APP)
- @$(POSTBUILD)
diff --git a/make.sh b/make.sh index 2da3aca21..df2995ec5 100755 --- a/make.sh +++ b/make.sh @@ -1640,6 +1640,7 @@ buildipfire() { lfsmake2 ncdu lfsmake2 lshw lfsmake2 socat
lfsmake2 node_exporter }
buildinstaller() {
diff --git a/src/paks/node_exporter/install.sh b/src/paks/node_exporter/install.sh new file mode 100644 index 000000000..e9272d7cb --- /dev/null +++ b/src/paks/node_exporter/install.sh @@ -0,0 +1,31 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team info@ipfire.org. # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +extract_files +restore_backup ${NAME} +start_service --background ${NAME}
+ln -svf ../init.d/node_exporter /etc/rc.d/rc0.d/K30node_exporter +ln -svf ../init.d/node_exporter /etc/rc.d/rc3.d/S40node_exporter +ln -svf ../init.d/node_exporter /etc/rc.d/rc6.d/K30node_exporter diff --git a/src/paks/node_exporter/uninstall.sh b/src/paks/node_exporter/uninstall.sh new file mode 100644 index 000000000..710baf8b4 --- /dev/null +++ b/src/paks/node_exporter/uninstall.sh @@ -0,0 +1,30 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team info@ipfire.org. # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +/etc/init.d/node_exporter stop +make_backup ${NAME} +remove_files
+rm -rfv /etc/rc.d/rc*.d/*node_exporter
diff --git a/src/paks/node_exporter/update.sh b/src/paks/node_exporter/update.sh new file mode 100644 index 000000000..99776659c --- /dev/null +++ b/src/paks/node_exporter/update.sh @@ -0,0 +1,27 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007-2020 IPFire-Team info@ipfire.org. # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +extract_backup_includes +./uninstall.sh +./install.sh diff --git a/src/patches/node_exporter-configurable-initd-options.patch b/src/patches/node_exporter-configurable-initd-options.patch new file mode 100644 index 000000000..9f662f918 --- /dev/null +++ b/src/patches/node_exporter-configurable-initd-options.patch @@ -0,0 +1,48 @@ +diff -Nur node_exporter-1.1.2.orig/examples/init.d/node_exporter node_exporter-1.1.2/examples/init.d/node_exporter +--- node_exporter-1.1.2.orig/examples/init.d/node_exporter 2021-03-05 10:27:11.000000000 +0100 ++++ node_exporter-1.1.2/examples/init.d/node_exporter 2021-05-04 14:45:20.644729176 +0200 +@@ -2,9 +2,11 @@
- RETVAL=0
- PROG="node_exporter"
+-EXEC="/etc/node_exporter/node_exporter" ++EXEC="/usr/bin/node_exporter"
- LOCKFILE="/var/lock/subsys/$PROG"
+-OPTIONS="--web.listen-address=:9100" ++ ++# read configurable OPTIONS ++. /etc/node_exporter
- # Source function library.
- if [ -f /etc/rc.d/init.d/functions ]; then
+@@ -22,18 +24,16 @@
echo -n "Starting $PROG: "
nohup $EXEC $OPTIONS >/dev/null 2>&1 &
RETVAL=$?
+- [ $RETVAL -eq 0 ] && touch $LOCKFILE && success || failure +- echo ++ [ $RETVAL -eq 0 ] && touch $LOCKFILE && echo success || echo failure
return $RETVAL
- fi
- }
- stop() {
- echo -n "Stopping $PROG: "
+- killproc $EXEC ++ killproc $EXEC > /dev/null
- RETVAL=$?
+- [ $RETVAL -eq 0 ] && rm -r $LOCKFILE && success || failure +- echo ++ [ $RETVAL -eq 0 ] && rm -r $LOCKFILE && echo success || echo failure
- }
- restart ()
+@@ -51,7 +51,7 @@
stop
;;
- status)
+- status $PROG ++ statusproc $PROG
;;
- restart)
restart
I think it would be good to see if the IPFire initscript template makes sense to use for starting/stopping etc node_exporter rather than patching a file from the source tarball.
https://git.ipfire.org/?p=ipfire-2.x.git;a=blob;f=src/initscripts/system/tem...
Regards, Adolf.
Hi Holger,
Welcome to the development team and thanks for your patch submission.
I think that there is some additional information required in this covering note.
I think that it would be good to have some additional information about the use case for node_exporter compared to icinga, monit, zabbix_agentd, nagios, etc that already exist as addons in IPFire. What is it that node_exporter brings that cannot be accomplished by those other packages and warrants it being added to the list.
Historically many addons have been launched and then shortly afterwards the person who introduced the addon has stopped supporting the maintenance of it with updates, fixes etc. Typically then the package has ended up getting out of date.
I believe that the core devs will expect, if the addon is agreed to be a valuable additional package, a longer term commitment from yourself to take on the role of maintainer for the package. It would be good to have that commitment in this covering note.
Regards,
Adolf.
On 06/05/2021 21:46, Holger Sunke wrote:
These patches add the new package node_exporter as discussed in the form thread: https://community.ipfire.org/t/please-add-prometheus-exporter/3555
GO language is required to compile node_exporter. In order to compile node_exporter for i586 arch, "go" package supported architecture must be extended for this. You'll likely want to download packages and adjust DL_FROM variables in "go" and "node_exporter" LFS scripts.
Holger Sunke (2): Added i586/386 support for GO language required for node_exporter. Added new node_exporter package.
config/rootfiles/packages/node_exporter | 3 + lfs/Config | 4 + lfs/go | 6 +- lfs/node_exporter | 88 +++++++++++++++++++ make.sh | 1 + src/paks/node_exporter/install.sh | 31 +++++++ src/paks/node_exporter/uninstall.sh | 30 +++++++ src/paks/node_exporter/update.sh | 27 ++++++ ..._exporter-configurable-initd-options.patch | 48 ++++++++++ 9 files changed, 235 insertions(+), 3 deletions(-) create mode 100644 config/rootfiles/packages/node_exporter create mode 100644 lfs/node_exporter create mode 100644 src/paks/node_exporter/install.sh create mode 100644 src/paks/node_exporter/uninstall.sh create mode 100644 src/paks/node_exporter/update.sh create mode 100644 src/patches/node_exporter-configurable-initd-options.patch
Hello Adolf,
the node_exporter provides a simple http download on port 9100 (default) that common measures around the OS runtime in a plain text form like this:
http://%5Bfirewall%5D:9100/metrics
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles. # TYPE go_gc_duration_seconds summary go_gc_duration_seconds{quantile="0"} 5.3912e-05 go_gc_duration_seconds{quantile="0.25"} 7.1192e-05 go_gc_duration_seconds{quantile="0.5"} 7.947e-05 go_gc_duration_seconds{quantile="0.75"} 9.8797e-05 go_gc_duration_seconds{quantile="1"} 0.004091312 go_gc_duration_seconds_sum 1.5650559450000001 go_gc_duration_seconds_count 7994 # HELP go_goroutines Number of goroutines that currently exist. # TYPE go_goroutines gauge go_goroutines 8 # HELP go_info Information about the Go environment. # TYPE go_info gauge go_info{version="go1.15.4"} 1 # HELP go_memstats_alloc_bytes Number of bytes allocated and still in use. # TYPE go_memstats_alloc_bytes gauge go_memstats_alloc_bytes 3.542504e+06 # HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed. .... +about 1k additional lines
This is useful for those who have a Prometheus instance up and running somewhere in their network that collects these kind of measures from an arbitrary amount of machines. Prometheus then stores these in a time series database and provides easy query access against these data, allowing applications like Grafana simply aggregating and visualizing all them or configuring arbitrary kind of alerts.
Summing it up it is very lightweight, simple to integrate but useful only when there's a prometheus runnung for you. You'd not setup a prometheus/grafana stack just because ipfire can run a node_exporter.
In this first step, only general OS and IO stats are supported as node_exporter is nativly shipping with. In a later step we can think about adding metrics from log analyzis (number of packets dopped/rejected, number of suspectibles by intrusion detections, ...) or other custom stuff. These would be simply written regularly into a text file (ending with .prom) and placed in some specific local folder on the ipFire file system and would then be picked by node_exporter and simply appended to the http://...:9100/metrics response.
Yes, i'd like to maintain this package for the ipfire. I think this would include beside others: - Keep track of and upgrade to new versions - Keep track especially on security alerts - Being reponsive on questions regarding the package - Testing for each supported architecture
Kind regards
Holger
I believe that the core devs will expect, if the addon is agreed to be a valuable additional package, a longer term commitment from yourself to take on the role of maintainer for the package. It would be good to have that commitment in this covering note.
Regards,
Adolf.
On 06/05/2021 21:46, Holger Sunke wrote:
These patches add the new package node_exporter as discussed in the form thread: https://community.ipfire.org/t/please-add-prometheus-exporter/3555
GO language is required to compile node_exporter. In order to compile node_exporter for i586 arch, "go" package supported architecture must be extended for this. You'll likely want to download packages and adjust DL_FROM variables in "go" and "node_exporter" LFS scripts.
Holger Sunke (2): Added i586/386 support for GO language required for node_exporter. Added new node_exporter package.
config/rootfiles/packages/node_exporter | 3 + lfs/Config | 4 + lfs/go | 6 +- lfs/node_exporter | 88 +++++++++++++++++++ make.sh | 1 + src/paks/node_exporter/install.sh | 31 +++++++ src/paks/node_exporter/uninstall.sh | 30 +++++++ src/paks/node_exporter/update.sh | 27 ++++++ ..._exporter-configurable-initd-options.patch | 48 ++++++++++ 9 files changed, 235 insertions(+), 3 deletions(-) create mode 100644 config/rootfiles/packages/node_exporter create mode 100644 lfs/node_exporter create mode 100644 src/paks/node_exporter/install.sh create mode 100644 src/paks/node_exporter/uninstall.sh create mode 100644 src/paks/node_exporter/update.sh create mode 100644 src/patches/node_exporter-configurable-initd-options.patch
Hi all
I wanted to add that Zabbix server can also interpret Prometheus format out-of-the-box, so installing node_exporter on IPFire could provide a possibly more light-weight alternative to installing zabbix_agentd for monitoring IPFire with Zabbix (however already quite light-weight). Or an addition as both will probably have different capabilities and possibilities...Zabbix can fetch info from both.
Regards Robin
Holger Sunke schreef op vr 07-05-2021 om 18:05 [+0000]:
Hello Adolf,
the node_exporter provides a simple http download on port 9100 (default) that common measures around the OS runtime in a plain text form like this:
http://%5Bfirewall%5D:9100/metrics
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles. # TYPE go_gc_duration_seconds summary go_gc_duration_seconds{quantile="0"} 5.3912e-05 go_gc_duration_seconds{quantile="0.25"} 7.1192e-05 go_gc_duration_seconds{quantile="0.5"} 7.947e-05 go_gc_duration_seconds{quantile="0.75"} 9.8797e-05 go_gc_duration_seconds{quantile="1"} 0.004091312 go_gc_duration_seconds_sum 1.5650559450000001 go_gc_duration_seconds_count 7994 # HELP go_goroutines Number of goroutines that currently exist. # TYPE go_goroutines gauge go_goroutines 8 # HELP go_info Information about the Go environment. # TYPE go_info gauge go_info{version="go1.15.4"} 1 # HELP go_memstats_alloc_bytes Number of bytes allocated and still in use. # TYPE go_memstats_alloc_bytes gauge go_memstats_alloc_bytes 3.542504e+06 even if freed. .... +about 1k additional lines
This is useful for those who have a Prometheus instance up and running somewhere in their network that collects these kind of measures from an arbitrary amount of machines. Prometheus then stores these in a time series database and provides easy query access against these data, all them or configuring arbitrary kind of alerts.
Summing it up it is very lightweight, simple to integrate but useful only when there's a prometheus runnung for you. You'd not setup a prometheus/grafana stack just because ipfire can run a node_exporter.
In this first step, only general OS and IO stats are supported as node_exporter is nativly shipping with. In a later step we can think about adding metrics from log analyzis (number of packets dopped/rejected, number of suspectibles by intrusion detections, ...) or other custom stuff. .prom) and placed in some specific local folder on the ipFire file system and would then be picked by node_exporter and simply appended to the http://...:9100/metrics response.
Yes, i'd like to maintain this package for the ipfire. I think this would include beside others:
- Keep track of and upgrade to new versions
- Keep track especially on security alerts
- Being reponsive on questions regarding the package
- Testing for each supported architecture
Kind regards
Holger
I believe that the core devs will expect, if the addon is agreed to be a valuable additional package, a longer term commitment from yourself to take on the role of maintainer for the package. It would be good to have that commitment in this covering note.
Regards,
Adolf.
On 06/05/2021 21:46, Holger Sunke wrote:
These patches add the new package node_exporter as discussed in the form thread: https://community.ipfire.org/t/please-add-prometheus-exporter/3555
GO language is required to compile node_exporter. In order to compile node_exporter for i586 arch, "go" package supported architecture must be extended for this. You'll likely want to download packages and adjust DL_FROM variables in "go" and "node_exporter" LFS scripts.
Holger Sunke (2): Added i586/386 support for GO language required for node_exporter. Added new node_exporter package.
config/rootfiles/packages/node_exporter | 3 + lfs/Config | 4 + lfs/go | 6 +- lfs/node_exporter | 88 +++++++++++++++++++ make.sh | 1 + src/paks/node_exporter/install.sh | 31 +++++++ src/paks/node_exporter/uninstall.sh | 30 +++++++ src/paks/node_exporter/update.sh | 27 ++++++ ..._exporter-configurable-initd-options.patch | 48 ++++++++++ 9 files changed, 235 insertions(+), 3 deletions(-) create mode 100644 config/rootfiles/packages/node_exporter create mode 100644 lfs/node_exporter create mode 100644 src/paks/node_exporter/install.sh create mode 100644 src/paks/node_exporter/uninstall.sh create mode 100644 src/paks/node_exporter/update.sh create mode 100644 src/patches/node_exporter-configurable-initd-options.patch