2014-07-30 21:19:35 +02:00
|
|
|
#
|
2014-07-30 23:02:57 +02:00
|
|
|
# spec file for package monitoring-plugins-openvpn
|
|
|
|
#
|
2021-01-16 14:57:22 +01:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2014-07-30 23:02:57 +02:00
|
|
|
#
|
2014-07-30 21:19:35 +02: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.
|
|
|
|
|
2021-01-16 14:57:22 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-07-30 23:02:57 +02:00
|
|
|
#
|
|
|
|
|
2017-09-15 14:49:30 +02:00
|
|
|
|
2014-07-30 23:02:57 +02:00
|
|
|
Name: monitoring-plugins-openvpn
|
2014-07-30 21:19:35 +02:00
|
|
|
Summary: Verify the state of the clients connected to a openvpn server
|
2021-01-16 14:57:22 +01:00
|
|
|
License: GPL-3.0-only
|
2014-07-30 21:19:35 +02:00
|
|
|
Group: System/Monitoring
|
2017-09-15 14:49:30 +02:00
|
|
|
Version: 1.1
|
|
|
|
Release: 0
|
2021-01-16 14:57:22 +01:00
|
|
|
URL: https://www.monitoringexchange.org/inventory/Check-Plugins/Software/Misc/check_openvpn_pl
|
2014-07-30 21:19:35 +02:00
|
|
|
Source0: check_openvpn.pl
|
2021-01-16 14:57:22 +01:00
|
|
|
Source1: check_openvpn.cfg
|
2014-07-30 21:19:35 +02:00
|
|
|
Patch1: check_openvpn-add-perfdata.patch
|
|
|
|
BuildRequires: nagios-rpm-macros
|
2014-07-30 23:02:57 +02:00
|
|
|
Provides: nagios-plugins-openvpn = %{version}-%{release}
|
|
|
|
Obsoletes: nagios-plugins-openvpn < %{version}-%{release}
|
2017-09-15 14:49:30 +02:00
|
|
|
Requires: monitoring-plugins-common
|
2014-07-30 21:19:35 +02:00
|
|
|
Requires: perl
|
2017-09-15 14:49:30 +02:00
|
|
|
Requires: perl(Net::Telnet)
|
2014-07-30 21:19:35 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
The -H [IP or hostname of the openvpn server] and -p options [port of the
|
|
|
|
openvpn server] are always obligatory. If plugin can be connected with the
|
|
|
|
management interface it will show the common name (as it is specified in the
|
|
|
|
client certificate) of the connected clients. Otherwise, it will finish with
|
|
|
|
critical state. The -i option shows the remote IP address of the client instead
|
|
|
|
of their common name and the -n option shows the number of connected clients.
|
|
|
|
It is possible to be verified that a client in particular is connected using
|
|
|
|
one of these two options -C [common name] or -r [remote IP address]. If these
|
|
|
|
options are used, also the exit state is due to specify that will give back
|
|
|
|
plugin if it does not find the client through the -w [warning] -c [critical]
|
|
|
|
options.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -T -c %name
|
|
|
|
install -m644 %{SOURCE0} .
|
2024-02-23 09:57:11 +01:00
|
|
|
%patch -P 1 -p0
|
2014-07-30 21:19:35 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %buildroot/%{nagios_plugindir}
|
2021-01-16 14:57:22 +01:00
|
|
|
install -Dm0644 %{SOURCE1} %buildroot/%{nrpe_sysconfdir}/check_openvpn.cfg
|
2014-07-30 21:19:35 +02:00
|
|
|
sed "s|/usr/nagios/libexec|%{nagios_plugindir}|g" check_openvpn.pl > %buildroot/%{nagios_plugindir}/check_openvpn
|
|
|
|
chmod +x %buildroot/%{nagios_plugindir}/check_openvpn
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf %buildroot
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
# avoid build dependecy of nagios - own the dirs
|
|
|
|
%dir %{nagios_libdir}
|
|
|
|
%dir %{nagios_plugindir}
|
2021-01-16 14:57:22 +01:00
|
|
|
%dir %{nrpe_sysconfdir}
|
|
|
|
%config(noreplace) %{nrpe_sysconfdir}/check_openvpn.cfg
|
2014-07-30 21:19:35 +02:00
|
|
|
%{nagios_plugindir}/check_openvpn
|
|
|
|
|
|
|
|
%changelog
|