File monitoring-plugins-sftp.spec of Package monitoring-plugins-sftp
#
# spec file for package monitoring-plugins-sftp
#
# Copyright (c) 2025, Martin Hauke <mardnh@gmx.de>
#
# 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 http://bugs.opensuse.org/
#
%define realname check_sftp
Name: monitoring-plugins-sftp
Version: 0~git20221227
Release: 0
Summary: A Nagios plugin to monitor SFTP servers
License: GPL-2.0-or-later
Group: System/Monitoring
URL: https://www.claudiokuenzler.com/monitoring-plugins/check_sftp.php
#Git-Clone: https://github.com/Napsty/check_sftp.git
Source0: %{realname}-%{version}.tar.xz
# For directory ownership:
BuildRequires: icinga2-bin
BuildRequires: icinga2-common
BuildRequires: nagios-rpm-macros
Requires: openssh-clients
Requires: sshpass
BuildArch: noarch
%description
This is a monitoring plugin written in Bash to check SFTP servers. The plugin
supports both key and password authentication. Both open and encrypted
(by passphrase) private keys are supported. The plugin will attempt to establish
a connection to a specified SFTP server -H. After a successful connection, the
plugin will upload and then download a temporary file into a specified remote
directory -d.
%prep
%autosetup -n %{realname}-%{version}
%build
%install
install -D -m0755 check_sftp.sh %{buildroot}/%{nagios_plugindir}/check_sftp.sh
# icinga2 ITL
install -D -m0644 icinga2/command.conf %{buildroot}%{icinga2_datadir}/include/plugins-contrib.d/%{name}.conf
%files
%license LICENSE
%doc README.md
%dir %{nagios_libdir}
%dir %{nagios_plugindir}/
%{nagios_plugindir}/check_sftp.sh
%{icinga2_datadir}/include/plugins-contrib.d/%{name}.conf
%changelog