Skip to content

Commit 8038398

Browse files
add systemd_exporter inside promethues rpm
1 parent 50c70a9 commit 8038398

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

prometheus2/prometheus2.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Provides: prometheus
1111
Source0: https://github.com/prometheus/prometheus/releases/download/v%{version}/prometheus-%{version}.linux-amd64.tar.gz
1212
Source1: %{name}.service
1313
Source2: %{name}.default
14+
Source3: https://github.com/prometheus-community/systemd_exporter/releases/download/v0.7.0/systemd_exporter-0.7.0.linux-amd64.tar.gz
1415

1516
%{?systemd_requires}
1617
%if 0%{?fedora} >= 19
@@ -25,7 +26,7 @@ configured targets at given intervals, evaluates rule expressions, displays the
2526
results, and can trigger alerts if some condition is observed to be true.
2627

2728
%prep
28-
%setup -q -n prometheus-%{version}.linux-amd64
29+
%setup -q -n prometheus-%{version}.linux-amd64 -a 3
2930

3031
%build
3132
/bin/true
@@ -34,6 +35,7 @@ results, and can trigger alerts if some condition is observed to be true.
3435
mkdir -vp %{buildroot}%{_sharedstatedir}/prometheus
3536
install -D -m 755 prometheus %{buildroot}%{_bindir}/prometheus
3637
install -D -m 755 promtool %{buildroot}%{_bindir}/promtool
38+
install -D -m 755 systemd_exporter-0.7.0.linux-amd64/systemd_exporter %{buildroot}%{_bindir}/systemd_exporter
3739
for dir in console_libraries consoles; do
3840
for file in ${dir}/*; do
3941
install -D -m 644 ${file} %{buildroot}%{_datarootdir}/prometheus/${file}
@@ -63,6 +65,7 @@ exit 0
6365
%defattr(-,root,root,-)
6466
%{_bindir}/prometheus
6567
%{_bindir}/promtool
68+
%{_bindir}/systemd_exporter
6669
%config(noreplace) %{_sysconfdir}/prometheus/prometheus.yml
6770
%{_datarootdir}/prometheus
6871
%{_unitdir}/prometheus.service

0 commit comments

Comments
 (0)