47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
%define debug_package %{nil}
|
|
|
|
Name : check_systembasics
|
|
Version : 0.1.6
|
|
Release : 1%{?dist}
|
|
Summary : A Monitoring Plugin to test various basic operating system properties (on Linux for now)
|
|
Group : System/Web
|
|
License : GPL-2.0
|
|
URL : https://github.com/NETWAYS/check_system_basics
|
|
BuildRequires : golang
|
|
BuildRequires : git
|
|
Requires : git
|
|
|
|
|
|
%description
|
|
'check_system_basics' is a monitoring plugin, which is capable of retrieving and
|
|
processing various Linux metrics such as memory or filesystem usage.
|
|
In the current version check_system_basics supports
|
|
the memory, filesystem, psi, sensors, netdev and load sub commands.
|
|
|
|
|
|
%prep
|
|
%setup -T -q -c %{name}-%{version}
|
|
mkdir go
|
|
mkdir src
|
|
cd src
|
|
git clone https://github.com/NETWAYS/check_system_basics
|
|
|
|
|
|
%build
|
|
export GOPATH=`pwd`/go
|
|
export GO111MODULE=on
|
|
cd src/check_system_basics
|
|
git checkout tags/v%{version}
|
|
go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}" -X 'github.com/NETWAYS/check_system_basics/cmd.version="%{version}"'" -o check_system_basics
|
|
|
|
|
|
%install
|
|
install -p -D -m 0755 src/check_system_basics/check_system_basics %{buildroot}%{_libdir}/nagios/plugins/check_system_basics
|
|
|
|
|
|
%files
|
|
%{_libdir}/nagios/plugins/check_system_basics
|
|
|
|
|
|
%changelog
|