monitoring-plugins-contentage/monitoring-plugins-contentage.spec

72 lines
2.3 KiB
RPMSpec
Raw Normal View History

#
# spec file for package monitoring-plugins-contentage
#
# Copyright (c) 2020 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 https://bugs.opensuse.org/
#
Name: monitoring-plugins-contentage
Version: 0.7
Release: 0
Summary: Check age of files in a directory
License: BSD-3-Clause
Group: System/Monitoring
Url: http://en.opensuse.org/Monitoring-plugins-contentage
Source0: check_contentage
BuildRequires: nagios-rpm-macros
Provides: nagios-plugins-contentage = %{version}-%{release}
Obsoletes: nagios-plugins-contentage < %{version}-%{release}
Requires: perl(File::Basename)
Requires: perl(File::stat)
Requires: perl(Getopt::Long)
Requires: perl(POSIX)
Requires: perl(Time::HiRes)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
This plugin checks one or more directory for files older than a specified age.
You can define the age of files for warning and critical states.
Note: the plugin checks the mtime of files, not the ctime.
Usage: check_dircontent.pl -w 24 -c 48 -p /tmp,/var/tmp -i foo,bar
Options:
-w|--warning : time for warnings (minutes)
-c|--critical : time for critical warnings (minutes)
-p|--pathnames : absolute path to the folders, split mutliple pathnames with commata
-t|--timeout : timeout (default: 15)
-i|--ignore : ignore filenames (comma separated)
-d|--debug : print debug output
%prep
#
%build
#
%install
install -D -m755 %{SOURCE0} %{buildroot}%{nagios_plugindir}/check_contentage
%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_contentage
%changelog