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

# spec file for package monitoring-plugins-buildservice
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# 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

Name:           monitoring-plugins-buildservice
Version:        0.003
Release:        0
Summary:        Nagios Checks for OpenBuildService
License:        GPL-2.0+ or Artistic-1.0
Group:          System/Monitoring
Source2:        check_buildservice_status.cfg
Source3:        check_bs_crit.cfg

BuildRequires:  nagios-rpm-macros
%if 0%{?suse_version}
# nagios can execute the script with embedded perl
Recommends:     perl
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

This script attempts to check if all buildservice schedulers are up.



install -D -m755 %{SOURCE0} %{buildroot}%{nagios_plugindir}/
install -D -m755 %{SOURCE1} %{buildroot}%{nagios_plugindir}/
install -D -m644 %{SOURCE2} %{buildroot}%{nrpe_sysconfdir}/check_buildservice_status.cfg
install -D -m644 %{SOURCE3} %{buildroot}%{nrpe_sysconfdir}/check_bs_crit.cfg

rm -rf %{buildroot}

# avoid build dependecy of nagios - own the dirs
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%dir %{nrpe_sysconfdir}
%config(noreplace) %{nrpe_sysconfdir}/check_buildservice_status.cfg
%config(noreplace) %{nrpe_sysconfdir}/check_bs_crit.cfg