2014-07-30 19:15:15 +00:00
|
|
|
#
|
2014-07-30 22:50:12 +00:00
|
|
|
# spec file for package monitoring-plugins-haproxy
|
2014-07-30 19:15:15 +00:00
|
|
|
#
|
2024-02-14 22:19:40 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2020-06-14 14:46:30 +00:00
|
|
|
#
|
2014-07-30 19:15:15 +00:00
|
|
|
# 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.
|
|
|
|
|
2020-06-14 14:46:30 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
2014-07-30 19:15:15 +00:00
|
|
|
|
|
|
|
|
2014-07-30 22:50:12 +00:00
|
|
|
Name: monitoring-plugins-haproxy
|
2020-06-14 14:46:30 +00:00
|
|
|
Version: 1.1g6790d7f
|
|
|
|
Release: 0
|
2014-07-30 19:15:15 +00:00
|
|
|
Summary: Plugin to check HAProxy (csv) stats url
|
2020-06-14 14:46:30 +00:00
|
|
|
License: GPL-2.0-or-later
|
2014-07-30 19:15:15 +00:00
|
|
|
Group: System/Monitoring
|
2020-06-14 14:46:30 +00:00
|
|
|
URL: https://github.com/Napsty/check_haproxy
|
|
|
|
Source0: check_haproxy-%{version}.tar.gz
|
2014-07-30 19:15:15 +00:00
|
|
|
Source1: gpl-2.0.txt
|
|
|
|
BuildRequires: nagios-rpm-macros
|
2021-05-20 15:03:14 +00:00
|
|
|
# For directory ownership:
|
|
|
|
BuildRequires: icinga2-bin
|
|
|
|
BuildRequires: icinga2-common
|
2020-06-14 14:46:30 +00:00
|
|
|
Requires: perl(Data::Dumper)
|
2014-07-30 19:15:15 +00:00
|
|
|
Requires: perl(File::Basename)
|
|
|
|
Requires: perl(HTTP::Request)
|
|
|
|
Requires: perl(HTTP::Status)
|
2024-02-14 22:19:40 +00:00
|
|
|
Requires: perl(LWP::Protocol::https)
|
2020-06-14 14:46:30 +00:00
|
|
|
Requires: perl(LWP::UserAgent)
|
|
|
|
Requires: perl(Locale::gettext)
|
|
|
|
Requires: perl(Nagios::Plugin)
|
|
|
|
Requires: perl(Time::HiRes)
|
|
|
|
Provides: nagios-plugins-haproxy = %{version}-%{release}
|
|
|
|
Obsoletes: nagios-plugins-haproxy < %{version}-%{release}
|
2014-07-30 19:15:15 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
The plugin checks HAProxy statistic url (csv) and gets UP and DOWN services.
|
|
|
|
|
|
|
|
%prep
|
2020-06-14 14:46:30 +00:00
|
|
|
%setup -q -n check_haproxy-%{version}
|
2014-07-30 19:15:15 +00:00
|
|
|
install -m644 %{SOURCE1} LICENSE
|
|
|
|
|
|
|
|
%build
|
2024-02-14 22:19:40 +00:00
|
|
|
|
2014-07-30 19:15:15 +00:00
|
|
|
#
|
|
|
|
%install
|
2020-06-14 14:46:30 +00:00
|
|
|
install -D -m755 check_haproxy.pl %{buildroot}%{nagios_plugindir}/check_haproxy.pl
|
|
|
|
# icinga2 check_command template
|
|
|
|
install -D -m0644 icinga2/CheckCommand.conf %{buildroot}%{icinga2_datadir}/include/plugins-contrib.d/%{name}.conf
|
|
|
|
# NRPE configuration check_connections
|
|
|
|
mkdir -p %{buildroot}%{nrpe_sysconfdir}
|
|
|
|
cat > %{buildroot}%{nrpe_sysconfdir}/check_haproxy.cfg << EOF
|
|
|
|
# default check, please adjust the URL, User and Password
|
|
|
|
command[check_haproxy]=/usr/lib/nagios/plugins/check_haproxy.pl -u 'https://proxy.example.com/;csv;norefresh' -U admin -P 's3cr3t'
|
|
|
|
# define backends, that will immediately turn the check critical. Other backends will only result in a warning
|
|
|
|
#command[check_haproxy]=/usr/lib/nagios/plugins/check_haproxy.pl -u 'https://proxy.example.com/;csv;norefresh' -U admin -P 's3cr3t' --critical-backends=www,galera
|
|
|
|
# ignore backends
|
|
|
|
#command[check_haproxy]=/usr/lib/nagios/plugins/check_haproxy.pl -u 'https://proxy.example.com/;csv;norefresh' -U admin -P 's3cr3t' --ignore-backends=test
|
|
|
|
EOF
|
2014-07-30 19:15:15 +00:00
|
|
|
|
|
|
|
%files
|
2020-06-14 14:46:30 +00:00
|
|
|
%license LICENSE
|
2014-07-30 19:15:15 +00:00
|
|
|
%dir %{nagios_libdir}
|
2020-06-14 14:46:30 +00:00
|
|
|
%dir %{nagios_plugindir}
|
|
|
|
%{nagios_plugindir}/check_haproxy.pl
|
|
|
|
%{icinga2_datadir}/include/plugins-contrib.d/%{name}.conf
|
|
|
|
%dir %{nrpe_sysconfdir}
|
|
|
|
%config(noreplace) %{nrpe_sysconfdir}/check_haproxy.cfg
|
2014-07-30 19:15:15 +00:00
|
|
|
|
|
|
|
%changelog
|