Fix the problem of failure to start node_exporter service

(cherry picked from commit 5b5bf285143c7f88d9d319ac59b932d6b5dc95af)
This commit is contained in:
jxy_git 2024-04-23 14:41:14 +08:00 committed by openeuler-sync-bot
parent 7338a17ac6
commit a1c921ff69

View File

@ -2,7 +2,7 @@
Name: node_exporter
Version: 1.7.0
Release: 2
Release: 3
Summary: Exporter for machine metrics
License: ASL 2.0
URL: https://github.com/prometheus/node_exporter
@ -40,6 +40,12 @@ install -D -m 0755 node_exporter %{buildroot}%{_sbindir}/node_exporter
install -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/node_exporter.service
install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/node_exporter
%pre
getent group node_exporter > /dev/null || groupadd -r node_exporter
getent passwd node_exporter > /dev/null || \
useradd -rg node_exporter -d /var/lib/node_exporter -s /sbin/nologin \
-c "Prometheus node exporter" node_exporter
%post
%systemd_post node_exporter.service
@ -57,6 +63,9 @@ install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/node_exporter
%config(noreplace)%{_sysconfdir}/sysconfig/node_exporter
%changelog
* Tue Apr 23 2024 jiangxinyu <jiangxinyu@kylinos.cn> - 1.7.0-3
- Fix the problem of failure to start node_exporter service
* Tue Feb 27 2024 Huang Yang <huangyang@loongson.cn> - 1.7.0-2
- add loongarch64 support