diff --git a/check_http_multi/README.md b/check_http_multi/README.md new file mode 100644 index 0000000..5d1bf24 --- /dev/null +++ b/check_http_multi/README.md @@ -0,0 +1,40 @@ +Introduction +============ +Check http multi was created to check multiple websites in one plugin. You can check the following: + +* Latency per website +* Overall runtime of http requests (serial) +* Number of failed websites +* Percentage of failed websites + + +How +=== + +Check Percentage Failed +----------------------- +Here we check http://www.google.com and http://adagios.org + +Failure rates of +* 0%-30% are ok +* 30%-60% are warning +* everything above is critical + +``` +$ check_http_multi -u http://www.google.com -u http://adagios.org/ \ + --th metric=failed_percentage,warning=30..60,critical=60..inf +Checked 2 uris, 0 failed | 'http://www.google.com'=0.24s;;;; 'http://adagios.org/'=0.47s;;;; 'failed'=0;;;; 'failed_percentage'=0.0%;30..60;60..inf;; 'runtime'=0.711745977402s;;;; +http://www.google.com fetched in 0.24 seconds +http://adagios.org/ fetched in 0.47 seconds +``` + + + +Author +====== +Tomas Edwardsson + + +License +======= +GPLv3 or later diff --git a/check_http_multi/nagios-okplugin-check_http_multi.spec b/check_http_multi/nagios-okplugin-check_http_multi.spec new file mode 100644 index 0000000..e17a442 --- /dev/null +++ b/check_http_multi/nagios-okplugin-check_http_multi.spec @@ -0,0 +1,40 @@ +%define debug_package %{nil} +%define plugin check_http_multi + +Summary: A Nagios plugin to check multiple websites +Name: nagios-okplugin-%{plugin} +Version: 0.1.0 +Release: 1%{?dist} +License: GPLv3+ +Group: Applications/System +URL: https://github.com/opinkerfi/misc/tree/master/nagios-plugins/check_%{plugin} +Source0: https://github.com/opinkerfi/misc/tree/master/nagios-plugins/check_%{plugin}/releases/%{name}-%{version}.tar.gz +Requires: nagios-okconfig-nrpe >= 0.0.4 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Packager: Tomas Edwardsson +BuildArch: noarch + + +%description +Checks multiple websites for latency and failures. You can specify how many +of them will fail to return warning or critical state. + +%prep +%setup -q + +%build + + +%install +rm -rf %{buildroot} +install -D -p -m 0755 %{plugin} %{buildroot}%{_libdir}/nagios/plugins/%{plugin} + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc README.md +%{_libdir}/nagios/plugins/* + +%changelog