[packages/nagios-plugin-check_http_json] Initial
arekm
arekm at pld-linux.org
Mon Mar 30 22:54:04 CEST 2026
commit aa912213b6e424f1c945fafc53cd8ac0769b990c
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Mon Mar 30 22:53:33 2026 +0200
Initial
nagios-plugin-check_http_json.spec | 49 ++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
---
diff --git a/nagios-plugin-check_http_json.spec b/nagios-plugin-check_http_json.spec
new file mode 100644
index 0000000..0ab2211
--- /dev/null
+++ b/nagios-plugin-check_http_json.spec
@@ -0,0 +1,49 @@
+%bcond_without tests # unit tests
+
+%define plugin check_http_json
+Summary: Nagios plugin to check HTTP JSON endpoints
+Name: nagios-plugin-%{plugin}
+Version: 2.3.1
+Release: 1
+License: Apache v2.0
+Group: Networking
+Source0: https://github.com/drewkerrigan/nagios-http-json/archive/v%{version}/nagios-http-json-%{version}.tar.gz
+# Source0-md5: 03db12a51f9d86ef58c865b2d9e9ebdf
+URL: https://github.com/drewkerrigan/nagios-http-json
+BuildRequires: python3 >= 1:3.8
+Requires: python3 >= 1:3.8
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define _sysconfdir /etc/nagios/plugins
+%define plugindir %{_prefix}/lib/nagios/plugins
+
+%description
+A generic Nagios/Icinga plugin to check HTTP JSON endpoints. It
+queries an HTTP endpoint returning JSON and evaluates values against
+user-specified rules (thresholds, existence, non-existence, equality)
+to determine service status and generate performance data.
+
+%prep
+%setup -q -n nagios-http-json-%{version}
+
+%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' %{plugin}.py
+
+%build
+%if %{with tests}
+# test_main_with_url_error fails with Python 3.13 (URLError message format change)
+%{__python3} -m unittest test.test_args test.test_check_http_json test.test_cli test.test_nagioshelper
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{plugindir}
+install -p %{plugin}.py $RPM_BUILD_ROOT%{plugindir}/%{plugin}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.md LICENSE
+%attr(755,root,root) %{plugindir}/%{plugin}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nagios-plugin-check_http_json.git/commitdiff/aa912213b6e424f1c945fafc53cd8ac0769b990c
More information about the pld-cvs-commit
mailing list