File monitoring-plugins-mysql_health.spec of Package monitoring-plugins-mysql_health

# spec file for package monitoring-plugins-mysql_health
# Copyright (c) 2016 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

%define         realname check_mysql_health
Name:           monitoring-plugins-mysql_health
Release:        0
Summary:        Check various parameters of a MySQL database
License:        GPL-2.0+
Group:          System/Monitoring
BuildRequires:  nagios-rpm-macros
Requires:       mysql-client
Recommends:     perl(DBD::mysql)
Recommends:     perl(DBI)
Provides:       nagios-plugins-mysql_health = %{version}-%{release}
Obsoletes:      nagios-plugins-mysql_health < %{version}-%{release}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

When using a database that are business critical it can be a good idea to
monitor the internals.

This Nagios plugin allows you to monitor the internal details of your
MySQL database.

%setup -q -n %{realname}-%{version}

%configure \
	--libexecdir=%{nagios_plugindir} \
	--with-nagios-user=%{nagios_user} \
	--with-nagios-group=%{nagios_group} \
	--with-mymodules-dyn-dir=%{nagios_plugindir} \
 	--with-mymodules-dir=%{nagios_plugindir} \

mkdir -p %{buildroot}/%{nagios_plugindir}
mkdir -p %{buildroot}/%{pnp4nagios_templatedir}
make %{?_smp_mflags} DESTDIR=%{buildroot} install
mv contrib/check_mysql_health.php %{buildroot}/%{pnp4nagios_templatedir}/check_mysql_health.php

%attr(0644,root,root) %doc README TODO NEWS ChangeLog AUTHORS COPYING contrib
# avoid build dependecy of nagios - own the dirs
%dir %{nagios_libdir}
%dir %{pnp4nagios_datadir}
%dir %{pnp4nagios_templatedir}
%attr(0644,root,root) %{pnp4nagios_templatedir}/check_mysql_health.php

openSUSE Build Service is sponsored by