2021-02-28 20:14:27 +03:00
|
|
|
%define debug %nil
|
|
|
|
%define debug_package %nil
|
|
|
|
|
|
|
|
Name: node_exporter
|
2025-02-17 20:05:49 +00:00
|
|
|
Version: 1.9.0
|
2021-02-28 20:14:27 +03:00
|
|
|
Release: 1
|
|
|
|
Summary: Exporter for machine metrics
|
|
|
|
URL: https://prometheus.io
|
|
|
|
Source0: https://github.com/prometheus/node_exporter/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
|
|
License: ASL 2.0
|
|
|
|
Group: Development/Other
|
|
|
|
BuildRequires: go >= 1.11
|
|
|
|
BuildRequires: git-core
|
|
|
|
BuildRequires: upx
|
2021-02-28 20:47:52 +03:00
|
|
|
BuildRequires: curl
|
2021-02-28 20:14:27 +03:00
|
|
|
|
|
|
|
%description
|
|
|
|
Exporter for machine metrics
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
2025-02-10 22:18:55 +00:00
|
|
|
export GOPROXY=direct
|
2021-02-28 20:14:27 +03:00
|
|
|
make build
|
|
|
|
upx %{name}
|
|
|
|
|
|
|
|
%install
|
|
|
|
install -Dm0755 %{name} %{buildroot}%{_bindir}/%{name}
|
|
|
|
install -Dm0644 examples/systemd/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
|
|
|
|
install -Dm0644 examples/systemd/sysconfig.node_exporter %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
|
|
|
|
|
|
|
#/var/lib/node_exporter/textfile_collector
|
|
|
|
|
|
|
|
%files
|
|
|
|
%doc README.md LICENSE
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
%{_unitdir}/%{name}.service
|
|
|
|
%{_sysconfdir}/sysconfig/%{name}
|
|
|
|
|