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

# spec file for package monitoring-plugins-gitlab
# Copyright (c) 2019 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-gitlab
Version:        0.3.2.gffd7ed6 
Release:        0
Summary:        Plugin to check verious stuff via Gitlab API(v4)
License:        GPL-3.0-or-later
Group:          System/Monitoring
Source:         check_gitlab-%{version}.tar.xz
Patch1:         check_gitlab_-_readiness_probe_format_changes.patch
Patch2:         check_gitlab_-_bad_gateway_is_critical.patch
BuildRequires:  nagios-rpm-macros
Requires:       ruby >= 2.3
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

This plugin checks various parameters of Gitlab

* health                    Check the Gitlab web endpoint for health
* services                  Check if any service of 'gitlab-ctl status' is down
* group_size                Check size of group in MB
* ci-pipeline               Check duration of a CI pipeline
* ci-runner                 Check status of CI runners
* ci-runner-jobs-duration   Check duration (in seconds) of running jobs of CI runners

%setup -q -n check_gitlab-%{version}
%patch1 -p0
%patch2 -p0
sed -i "s|/usr/bin/env ruby|%{_bindir}/ruby|g" check_gitlab.rb

install -Dm755 check_gitlab.rb %{buildroot}%{nagios_plugindir}/check_gitlab.rb

%if 0%{?suse_version} >= 1500
%license LICENSE
%dir %{nagios_libdir}
%dir %{nagios_plugindir}

openSUSE Build Service is sponsored by