2014-07-30 17:04:51 +02:00
|
|
|
#
|
|
|
|
# spec file for package monitoring-plugins-contentage
|
|
|
|
#
|
2020-01-04 23:19:05 +01:00
|
|
|
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-07-30 17:04:51 +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.
|
|
|
|
|
2020-01-04 23:19:05 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-07-30 17:04:51 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: monitoring-plugins-contentage
|
2020-01-04 23:19:05 +01:00
|
|
|
Version: 0.7
|
|
|
|
Release: 0
|
2014-07-30 17:04:51 +02:00
|
|
|
Summary: Check age of files in a directory
|
2020-01-04 23:19:05 +01:00
|
|
|
License: BSD-3-Clause
|
2014-07-30 17:04:51 +02:00
|
|
|
Group: System/Monitoring
|
2020-01-04 23:19:05 +01:00
|
|
|
Url: http://en.opensuse.org/Monitoring-plugins-contentage
|
2014-07-30 17:04:51 +02:00
|
|
|
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.
|
|
|
|
|
2020-01-04 23:19:05 +01:00
|
|
|
Usage: check_dircontent.pl -w 24 -c 48 -p /tmp,/var/tmp -i foo,bar
|
2014-07-30 17:04:51 +02:00
|
|
|
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)
|
2020-01-04 23:19:05 +01:00
|
|
|
-i|--ignore : ignore filenames (comma separated)
|
|
|
|
-d|--debug : print debug output
|
|
|
|
|
2014-07-30 17:04:51 +02:00
|
|
|
|
|
|
|
%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
|