File monitoring-plugins-proc-timed-hang.spec of Package monitoring-plugins-proc-timed-hang

# spec file for package monitoring-plugins-proc-timed-hang
# Copyright (c) 2019 SUSE LINUX Products 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

Name:           monitoring-plugins-proc-timed-hang
Version:        20190816
Release:        0
Summary:        Check a process against expiration time
License:        GPL-2.0
Group:          System/Monitoring
Source0:        monitoring-plugins-proc-timed-hang-%{version}.tar.bz2
Provides:       nagios-plugins-proc-timed-hang = %{version}-%{release}
Obsoletes:      nagios-plugins-proc-timed-hang < %{version}-%{release}
BuildRequires:  nagios-rpm-macros
Requires:       python3-docopt
Requires:       python3-python-dateutil
Requires:       python3-psutil
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

The script monitors a given process and if the process runs longer than the
specified time it is marked as critical or optionally killed. If the kill
operation fails the process is also marked as critical.

This is useful to monitor long running processes that may get stuck. One needs
to have an idea about the expected run time of the process. This is not useful
for monitoring time critical processes. The check can only be used on processes
that have a singular instance, i.e. there can only be one entry in the process
table for the process with the given name.

%setup -q -n monitoring-plugins-proc-timed-hang-%{version}

install -D -m755 check_proc_timed_hang %{buildroot}/%{nagios_plugindir}/check_proc_timed_hang

# avoid build dependecy of nagios - own the dirs
%dir %{nagios_libdir}
%dir %{nagios_plugindir}

openSUSE Build Service is sponsored by