forked from guilbaults/infiniband-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinfiniband-exporter-el7.spec
50 lines (37 loc) · 1.79 KB
/
infiniband-exporter-el7.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Name: infiniband-exporter
Version: 0.0.2
%global gittag 0.0.2
Release: 1%{?dist}
Summary: Prometheus exporter for a Infiniband Fabric
License: Apache License 2.0
URL: https://github.com/guilbaults/infiniband-exporter
Source0: https://github.com/guilbaults/%{name}/archive/v%{gittag}/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: systemd
Requires: python2-prometheus_client
Requires: infiniband-diags
%description
Prometheus exporter for a Infiniband fabric. This exporter only need to be installed on one server connected to the fabric, it will collect all the ports statistics on all the switches.
Metrics are identified by type, port number, switch GUID and name. The remote connection of each port is also collected. Thus each metric represents a cable between 2 switches, or between a switch and a card in a server.
When a node name map file is provided, it will be used by ibquerryerror to put a more human friendly name on switches.
This exporter takes 3 seconds to collect the information of 60+ IB switches, and 900+ compute nodes. The information takes about 7.5MB in ASCII format for that fabric.
%prep
%autosetup -n %{name}-%{gittag}
%setup -q
%build
%install
mkdir -p %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{_unitdir}
sed -i -e '1i#!/usr/bin/python' infiniband-exporter.py
install -m 0755 %{name}.py %{buildroot}/%{_bindir}/%{name}
install -m 0644 infiniband-exporter.service %{buildroot}/%{_unitdir}/infiniband-exporter.service
%clean
rm -rf $RPM_BUILD_ROOT
%files
%{_bindir}/%{name}
%{_unitdir}/infiniband-exporter.service
%changelog
* Mon Mar 30 2020 Simon Guilbault <[email protected]> 0.0.2-1
- Fixing counter reset using python subprocess.Popen()
* Fri Mar 20 2020 Simon Guilbault <[email protected]> 0.0.1-1
- Initial release