Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions resmon.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ PORT 81;
STATUSFILE /var/run/resmon-status.txt;
TIMEOUT 10;

HOSTS ALLOW 10.80.116.112, 127.0.0.1;
HOSTS ALLOW 127.0.0.1;
# HOSTS {ALLOW/DENY} lists are the coma or blank separated lists of
# a dotted decimal IPv4 addresses of the form a.b.c.d. to match incoming machine’s IP address exactly,
# or an 'ipaddr/n' where ipaddr is the IP address and n is the number of one bits in the netmask.
# the first match gives the result, if nothing matches IP is allowed.
HOSTS DENY 10.80.117.128/25
HOSTS ALLOW 10.80.116.0/23
HOSTS DENY 0.0.0.0/0;

# Resmon health check. Shows the hostname, svn revision and
Expand Down
79 changes: 79 additions & 0 deletions resources/resmon.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
Name: resmon
Version: git.20120722
Release: 1%{?dist}
Summary: Client for the nagios/munin/reconnoiter network monitoring system.

Group: Applications/System
License: BSD
URL: http://labs.omniti.com/labs/resmon
Source0: resmon-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch

AutoReq: 0
Requires: perl, perl(Fcntl), perl(File::Basename), perl(Getopt::Long), perl(IO::File), perl(IO::Handle), perl(IO::Socket), perl(POSIX), perl(Socket), perl(Sys::Hostname), perl(Time::HiRes)

%description
Provides similar to NRPE functionality with better security and performance.

%package -n nagios_plugin_resmon
Summary: Nagios Plugin - check_resmon_metric
Group: Applications/System
Requires: nagios-plugins
%description -n nagios_plugin_resmon
check_resmon_metric plugin to give resmon data to nagios

%prep
%setup -n resmon

%build

%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__mkdir_p} $RPM_BUILD_ROOT/opt/resmon
%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/nagios/plugins
%{__mv} resources/check_resmon_metric $RPM_BUILD_ROOT/%{_libdir}/nagios/plugins/
%{__cp} -rp * $RPM_BUILD_ROOT/opt/resmon
%{__cp} -p resmon.conf.sample $RPM_BUILD_ROOT/opt/resmon/resmon.conf
%{__mkdir_p} ${RPM_BUILD_ROOT}%{_initrddir}
%{__install} resources/resmon_redhat_rc ${RPM_BUILD_ROOT}%{_initrddir}/resmon


%clean
%{__rm} -rf $RPM_BUILD_ROOT

%post
/sbin/chkconfig --add resmon
/sbin/service resmon start

%preun
if [ "$1" = 0 ] ; then
/sbin/service resmon stop > /dev/null 2>&1
/sbin/chkconfig --del resmon
fi
exit 0

%postun
if [ "$1" -ge 1 ]; then
/sbin/service resmon condrestart > /dev/null 2>&1
fi
exit 0


%files
%defattr(-,root,root,-)
%config(noreplace) /opt/resmon/resmon.conf
%{_initrddir}/resmon
/opt/resmon/lib
/opt/resmon/LICENSE
/opt/resmon/resmon
/opt/resmon/resmon.conf.sample
/opt/resmon/resources

%files -n nagios_plugin_resmon
%{_libdir}/nagios/plugins/check_resmon_metric


%changelog
* Sun Jul 22 2012 Sergey Ivanov <[email protected]> - git.20120722
- initial packaging.