2010-03-01 11:00:15 +01:00
|
|
|
%define debug_package %{nil}
|
|
|
|
|
|
|
|
Summary: A Nagios plugin to check CPU on Linux servers
|
|
|
|
Name: nagios-plugins-check_cpu
|
2014-02-20 19:08:20 +01:00
|
|
|
Version: 2
|
2010-03-01 11:00:15 +01:00
|
|
|
Release: 1%{?dist}
|
|
|
|
License: GPLv2+
|
|
|
|
Group: Applications/System
|
|
|
|
URL: http://www.matejunkie.com/cpu-check-plugin-for-nagios/
|
2010-11-26 01:26:55 +01:00
|
|
|
Source0: http://opensource.ok.is/trac/browser/nagios-plugins/check_cpu/releases/nagios-plugins-check_cpu-%{version}.tar.gz
|
2012-10-23 12:49:57 +02:00
|
|
|
Requires: nrpe bc
|
2010-03-01 11:00:15 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
Packager: Tomas Edwardsson <tommi@ok.is>
|
2012-04-20 16:41:11 +02:00
|
|
|
BuildArch: noarch
|
2010-03-01 11:00:15 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
This shell script checks cpu utilization (user,system,iowait,idle in %)
|
|
|
|
through /proc/stat accepting seperate threshholds and returning the data in a
|
|
|
|
format suitable for performance data processing
|
|
|
|
|
|
|
|
%prep
|
2010-11-26 01:26:55 +01:00
|
|
|
%setup -q
|
|
|
|
perl -pi -e "s|/usr/lib/|%{_libdir}/|g" nrpe.d/check_cpu.cfg
|
|
|
|
perl -pi -e "s|/usr/lib64/|%{_libdir}/|g" nrpe.d/check_cpu.cfg
|
2010-03-01 11:00:15 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
|
2010-11-26 01:26:55 +01:00
|
|
|
|
2010-03-01 11:00:15 +01:00
|
|
|
%install
|
|
|
|
rm -rf %{buildroot}
|
2010-11-26 01:26:55 +01:00
|
|
|
install -D -p -m 0755 check_cpu.sh %{buildroot}%{_libdir}/nagios/plugins/check_cpu.sh
|
|
|
|
install -D -p -m 0755 nrpe.d/check_cpu.cfg %{buildroot}/etc/nrpe.d/check_cpu.cfg
|
2010-03-01 11:00:15 +01:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
2013-03-14 18:47:11 +01:00
|
|
|
%post
|
|
|
|
/sbin/service nrpe reload
|
|
|
|
|
2010-03-01 11:00:15 +01:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2010-11-26 01:26:55 +01:00
|
|
|
#%doc README LICENSE
|
|
|
|
%{_libdir}/nagios/plugins/*
|
|
|
|
/etc/nrpe.d/check_cpu.cfg
|
|
|
|
|
2010-03-01 11:00:15 +01:00
|
|
|
|
|
|
|
%changelog
|
2014-02-20 19:08:20 +01:00
|
|
|
* Thu Feb 20 2014 Pall Sigurdsson <palli@opensource.is> 2-1
|
|
|
|
- Added nrpe reload to post section (tommi@tommi.org)
|
|
|
|
- Merge github.com:opinkerfi/misc (palli@opensource.is)
|
|
|
|
- Added dependency on bc (palli@opensource.is)
|
|
|
|
|
2012-08-23 12:50:56 +02:00
|
|
|
* Thu Aug 23 2012 Pall Sigurdsson <palli@opensource.is> 1.0-1
|
|
|
|
- Version number bumped
|
|
|
|
- Updates buildarch to noarch (tommi@tommi.org)
|
|
|
|
|
2012-03-12 17:08:57 +01:00
|
|
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.3-1
|
|
|
|
- new package built with tito
|
|
|
|
|
2010-11-26 01:26:55 +01:00
|
|
|
* Thu Nov 25 2010 Pall Sigurdsson <palli@opensource.is> 0.1-2
|
|
|
|
- Nrpe config now ships with plugin by default
|
2010-03-01 11:00:15 +01:00
|
|
|
* Mon Mar 1 2010 Tomas Edwardsson <tommi@ok.is> 0.1-1
|
|
|
|
- Initial packaging
|
2010-11-26 01:26:55 +01:00
|
|
|
|