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

# spec file for package monitoring-plugins-wmi_plus
# Copyright (c) 2017-2019, Martin Hauke <>
# Copyright (c) 2016, SUSE Linux GmbH, Nuremberg
# 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_wmi_plus
Name:           monitoring-plugins-wmi_plus
Version:        1.65
Release:        0
Summary:        A client-less Icinga/Nagios plugin for checking Windows systems
License:        GPL-2.0-or-later
Group:          System/Monitoring
Source:         %{realname}.v%{version}.tar.gz
BuildRequires:  monitoring-plugins-common
BuildRequires:  nagios-rpm-macros
BuildRequires:  perl(Config::IniFiles)
BuildRequires:  perl(DateTime)
BuildRequires:  perl(Number::Format)
Requires:       perl(Config::IniFiles)
Requires:       perl(DateTime)
Requires:       perl(Number::Format)
Requires:       wmic
BuildArch:      noarch

Check WMI Plus is a client-less Nagios plugin for checking Windows systems.
No more need to install any software on any of your Windows machines.
Monitor Microsoft Windows systems directly from your Nagios server.
Check WMI Plus uses the Windows Management Interface (WMI) to check for common
services (cpu, disk, sevices, eventlog...) on Windows machines. It requires
the open source wmi client for Linux (wmic).

%setup -q -c -n %{realname}-%{version}
# set proper basedir
sed -i 's|/opt/nagios/bin/plugins|/usr/lib/nagios/plugins|g'
# fix spurious exec permissions
chmod -x check_wmi_plus.README.txt
find etc -type f -exec chmod -x {} \;
# fix filename for the help-file
sed -i 's|$base_dir/|$base_dir/check_wmi_plus_help|g'


install -d %{buildroot}/%{nagios_plugindir}
install -d %{buildroot}/%{_sysconfdir}/check_wmi_plus/
install -D -m0755 %{buildroot}/%{nagios_plugindir}/check_wmi_plus
install -D -m0644 %{buildroot}/%{nagios_plugindir}/check_wmi_plus_help
mv etc/check_wmi_plus/* %{buildroot}/%{_sysconfdir}/check_wmi_plus/
# PRO-only - where the check_wmi_plus will store some persistent data
rm -r %{buildroot}/%{_sysconfdir}/check_wmi_plus/

%doc check_wmi_plus.README.txt
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%dir %{_sysconfdir}/check_wmi_plus
%config %{_sysconfdir}/check_wmi_plus/check_wmi_plus.d/*.ini
%dir %{_sysconfdir}/check_wmi_plus/check_wmi_plus.d

openSUSE Build Service is sponsored by