62 lines
2.4 KiB
RPMSpec
62 lines
2.4 KiB
RPMSpec
|
#
|
||
|
# 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.
|
||
|
|
||
|
Name: nagios-plugins-openvpn
|
||
|
Summary: Verify the state of the clients connected to a openvpn server
|
||
|
Version: 1.1
|
||
|
Release: 1
|
||
|
Url: https://www.monitoringexchange.org/inventory/Check-Plugins/Software/Misc/check_openvpn_pl
|
||
|
License: GPL-3.0
|
||
|
Group: System/Monitoring
|
||
|
Source0: check_openvpn.pl
|
||
|
Patch1: check_openvpn-add-perfdata.patch
|
||
|
BuildRequires: nagios-rpm-macros
|
||
|
Requires: perl(Net::Telnet)
|
||
|
Requires: perl
|
||
|
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} .
|
||
|
%patch1 -p0
|
||
|
|
||
|
%build
|
||
|
|
||
|
%install
|
||
|
mkdir -p %buildroot/%{nagios_plugindir}
|
||
|
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}
|
||
|
%{nagios_plugindir}/check_openvpn
|
||
|
|
||
|
%changelog
|