File monitoring-plugins-nsc_web.spec of Package monitoring-plugins-nsc_web

#
# spec file for package monitoring-plugins-nsc_web
#
# Copyright (c) 2024, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define realname check_nsc_web
Name:           monitoring-plugins-nsc_web
Version:        0.7.2+git20240607
Release:        0
Summary:        Collects check results from NSClient++/SNClient+ agents using its REST API
License:        GPL-3.0-or-later
Group:          System/Monitoring
URL:            https://github.com/ConSol-Monitoring/check_nsc_web
#Git-Clone:     https://github.com/ConSol-Monitoring/check_nsc_web.git
#Source0:        https://github.com/ConSol-Monitoring/check_nsc_web/archive/refs/tags/v%%{version}.tar.gz#/%%{realname}-%%{version}.tar.gz
Source0:        %{realname}-%{version}.tar.gz
Source1:        vendor.tar.gz
BuildRequires:  go1.23
BuildRequires:  golang-packaging
BuildRequires:  nagios-rpm-macros
%{go_provides}

%description
check_nsc_web collects check results from NSClient++/SNClient+ agents using
its REST API. It is an alternative to check_nrpe et al.

It can be used with any monitoring tool, that can use Naemon/Nagios compatible
plugins.

%prep
%autosetup -a 1 -n %{realname}-%{version}

%build
go build \
  -mod=vendor \
  -buildmode=pie \
  -o check_nsc_web ./cmd/check_nsc_web

%install
install -Dm 0755 check_nsc_web %{buildroot}/%{nagios_plugindir}/check_nsc_web

%check
#go test -v ./cmd/check_nsc_web

%files
#%%license LICENSE
%doc Changes README.md
%doc sample.conf
%dir %{nagios_libdir}
%dir %{nagios_plugindir}/
%{nagios_plugindir}/check_nsc_web

%changelog
openSUSE Build Service is sponsored by