File monitoring-plugins-mongodb.spec of Package monitoring-plugins-mongodb
#
# spec file for package monitoring-plugins-mongodb
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2015-2024, Martin Hauke <mardnh@gmx.de>
#
# 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 http://bugs.opensuse.org/
#
%define realname check_mongodb
Name: monitoring-plugins-mongodb
Version: 0~git20230104
Release: 0
Summary: Nagios Plugin to monitor MongoDB servers
License: BSD-3-Clause
Group: System/Monitoring
URL: https://github.com/mzupan/nagios-plugin-mongodb
Source0: %{name}-%{version}.tar.xz
BuildRequires: nagios-rpm-macros
BuildRequires: xz
Requires: python3-pymongo
Provides: nagios-plugins-mongodb = %{version}-%{release}
Obsoletes: nagios-plugins-mongodb < %{version}-%{release}
BuildArch: noarch
%description
Nagios Plugin to monitor MongoDB servers
* Check Connection
* Check Percentage of Open Connections
* Check Memory Usage
* Check Mapped Memory Usage
* Check Lock Time Percentage
* Check Average Flush Time
* Check Last Flush Time
* Check status of mongodb replicaset
* Check status of index miss ratio
* Check number of databases and number of collections
* Check size of a database
* Check index size of a database
* Check index size of a collection
* Check the number of queries per second
* Check Primary Connection
* Check Collection State
* Check Replication Lag
* Check Replication Lag Percentage
* Check the primary server of replicaset
%prep
%setup -q
sed -i 's|#!%{_bindir}/env python|#!%{_bindir}/python3|g' check_mongodb.py
%build
%install
install -D -m755 check_mongodb.py %{buildroot}/%{nagios_plugindir}/check_mongodb
%files
%license LICENSE
%doc README.md
%dir %{nagios_libdir}
%dir %{nagios_plugindir}/
%{nagios_plugindir}/check_mongodb
%changelog