2024-01-06 07:12:48 +01:00
|
|
|
%define moncgi_version 1.52
|
|
|
|
|
|
|
|
Name: mon
|
2024-01-06 07:12:49 +01:00
|
|
|
Version: 1.2.3
|
|
|
|
Release: 1mamba
|
2024-01-06 07:12:48 +01:00
|
|
|
Summary: A scheduler and alert management tool used for monitoring service availability and triggering alerts upon failure detection
|
|
|
|
Group: System/Servers
|
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
|
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
2024-01-06 07:12:49 +01:00
|
|
|
URL: https://mirrors.edge.kernel.org/pub/software/admin/mon/html/
|
|
|
|
Source0: https://github.com/tj/mon.git/%{version}/mon-%{version}.tar.bz2
|
2024-01-06 07:12:48 +01:00
|
|
|
Source1: mon-initscript
|
|
|
|
Source2: mon-lvs.alert
|
|
|
|
Source3: mon-bring-ha-down.alert
|
|
|
|
Source4: mon-squid.monitor
|
|
|
|
Source5: http://www.kernel.org/pub/software/admin/mon/contrib/all-monitors.tar.gz
|
|
|
|
Source6: http://www.kernel.org/pub/software/admin/mon/contrib/all-alerts.tar.gz
|
|
|
|
Source7: http://www.kernel.org/pub/software/admin/mon/contrib/cgi-bin/mon.cgi/mon.cgi-%{moncgi_version}.tar.bz2
|
|
|
|
Source8: mon-bring-ha-up.alert
|
|
|
|
Patch0: mon-1.2.0-Makefile.patch
|
|
|
|
License: GPL
|
|
|
|
## AUTOBUILDREQ-BEGIN
|
|
|
|
BuildRequires: glibc-devel
|
2024-01-06 07:12:49 +01:00
|
|
|
BuildRequires: libperl
|
|
|
|
BuildRequires: perl(SNMP_Session)
|
|
|
|
BuildRequires: perl-Authen-Radius
|
|
|
|
BuildRequires: perl-HTML-Parser
|
|
|
|
BuildRequires: perl-HTTP-Cookies
|
|
|
|
BuildRequires: perl-HTTP-Message
|
|
|
|
BuildRequires: perl-Net-SSLeay
|
|
|
|
BuildRequires: perl-Net-Telnet
|
|
|
|
BuildRequires: perl-NetSNMP
|
|
|
|
BuildRequires: perl-ParallelUserAgent
|
|
|
|
BuildRequires: perl-URI
|
|
|
|
BuildRequires: perl-devel
|
|
|
|
BuildRequires: perl-libwww
|
2024-01-06 07:12:48 +01:00
|
|
|
## AUTOBUILDREQ-END
|
|
|
|
|
|
|
|
%description
|
|
|
|
mon is a general-purpose scheduler and alert management tool used for monitoring service availability and triggering alerts upon failure detection.
|
|
|
|
mon was designed to be open and extensible in the sense that it supports arbitrary monitoring facilities and alert methods via a common interface, all of which are easily implemented with programs in C, Perl, shell, etc., SNMP traps, and special mon traps.
|
|
|
|
mon views resource monitoring as two separate tasks: the testing of a condition, and triggering an action upon failure. mon was designed to implement the testing and action-taking tasks as separate, stand-alone programs. mon is fundamentally a scheduler which executes the monitors (each test a specific condition), and calls the appropriate alerts if the monitor fails.
|
|
|
|
The decision to invoke an alert is governed by logic which offers various "squelch" features and dependencies, all of which are configurable by the user.
|
|
|
|
Monitors and alerts are not a part of the core mon server, even though the distribution comes with a handful of them to get you started.
|
|
|
|
This means that if a new service needs monitoring, or if a new alert is necessary, the mon server does not need to be changed.
|
|
|
|
This makes mon easily extensible.
|
|
|
|
|
2024-01-06 07:12:49 +01:00
|
|
|
%debug_package
|
|
|
|
|
2024-01-06 07:12:48 +01:00
|
|
|
%prep
|
|
|
|
%setup -q
|
2024-01-06 07:12:49 +01:00
|
|
|
#%patch0 -p1
|
2024-01-06 07:12:48 +01:00
|
|
|
|
|
|
|
%build
|
2024-01-06 07:12:49 +01:00
|
|
|
%make
|
|
|
|
|
|
|
|
#-C mon.d LDLIBS="-ltirpc"
|
2024-01-06 07:12:48 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
|
|
|
|
|
2024-01-06 07:12:49 +01:00
|
|
|
#make -C mon.d install MONPATH=%{buildroot}%{_libdir}/mon
|
|
|
|
#make install DESTDIR=%{buildroot}
|
|
|
|
install -D -m0755 mon %{buildroot}%{_bindir}/mon
|
2024-01-06 07:12:48 +01:00
|
|
|
|
2024-01-06 07:12:49 +01:00
|
|
|
#install -m 755 %{S:1} %{buildroot}%{_initrddir}/mon
|
|
|
|
install -D -m0644 %{S:2} %{buildroot}%{_prefix}/lib/mon/alert.d/lvs.alert
|
|
|
|
install -D -m0644 %{S:3} %{buildroot}%{_prefix}/lib/mon/alert.d/bring-ha-down.alert
|
|
|
|
install -D -m0644 %{S:4} %{buildroot}%{_prefix}/lib/mon/mon.d/squid.monitor
|
|
|
|
install -D -m0644 %{S:8} %{buildroot}%{_prefix}/lib/mon/alert.d/bring-ha-up.alert
|
2024-01-06 07:12:48 +01:00
|
|
|
|
|
|
|
#sed -i "s|/usr/lib/sendmail|/usr/sbin/sendmail|" \
|
|
|
|
# %{buildroot}%{_libdir}/mon/alert.d/*
|
|
|
|
|
|
|
|
install -d %{buildroot}/var/log/mon
|
|
|
|
|
|
|
|
rm -f %{buildroot}%{_sysconfdir}/mon/S99mon
|
|
|
|
|
|
|
|
# install additional monitors and alerts
|
2024-01-06 07:12:49 +01:00
|
|
|
install -d %{buildroot}%{_prefix}/lib/mon/examples
|
2024-01-06 07:12:48 +01:00
|
|
|
|
2024-01-06 07:12:49 +01:00
|
|
|
pushd %{buildroot}%{_prefix}/lib/mon/examples
|
2024-01-06 07:12:48 +01:00
|
|
|
tar xzf %{S:5}
|
|
|
|
tar xzf %{S:6}
|
|
|
|
sed -i "s|/usr/local/bin/perl|/usr/bin/perl|" \
|
|
|
|
alerts/*/* monitors/*/*
|
|
|
|
# remove aim to avoid a perl dependency on aol perl module we don't want
|
|
|
|
rm -rf alerts/aim
|
|
|
|
popd
|
|
|
|
|
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2024-01-06 07:12:49 +01:00
|
|
|
#%dir %{_sysconfdir}/mon
|
|
|
|
#%config(noreplace) %{_sysconfdir}/mon/*
|
|
|
|
%{_bindir}/mon
|
|
|
|
%dir %{_prefix}/lib/mon
|
|
|
|
%dir %{_prefix}/lib/mon/mon.d
|
|
|
|
%{_prefix}/lib/mon/mon.d/*
|
|
|
|
#%dir %{_prefix}/lib/mon/state.d
|
|
|
|
#%{_prefix}/lib/mon/state.d/*
|
|
|
|
%dir %{_prefix}/lib/mon/alert.d
|
|
|
|
%{_prefix}/lib/mon/alert.d/*
|
|
|
|
%dir %{_prefix}/lib/mon/examples
|
|
|
|
%{_prefix}/lib/mon/examples/*
|
2024-01-06 07:12:48 +01:00
|
|
|
%dir /var/log/mon
|
2024-01-06 07:12:49 +01:00
|
|
|
#%{_mandir}/man1/*
|
|
|
|
#%{_mandir}/man8/*
|
2024-01-06 07:12:48 +01:00
|
|
|
|
|
|
|
%changelog
|
2024-01-06 07:12:49 +01:00
|
|
|
* Mon Dec 27 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.2.3-1mamba
|
|
|
|
- update to 1.2.3
|
|
|
|
|
2024-01-06 07:12:48 +01:00
|
|
|
* Mon Nov 19 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.2.0-3mamba
|
|
|
|
- remove monitor which requires obsoleted module perl-LWP-Parallel-UserAgent
|
|
|
|
|
|
|
|
* Fri Feb 05 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 1.2.0-2mamba
|
|
|
|
- rebuilt to remove executable requirements
|
|
|
|
|
|
|
|
* Thu Jan 01 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 1.2.0-1mamba
|
|
|
|
- automatic update by autodist
|
|
|
|
|
|
|
|
* Wed Oct 18 2006 Davide Madrisan <davide.madrisan@qilinux.it> 0.99.2-11qilnx
|
|
|
|
- specfile fixes and updates
|
|
|
|
- stop and restart the mon service using the 'service' command
|
|
|
|
- fixed %%preun script
|
|
|
|
|
|
|
|
* Thu Nov 25 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 0.99.2-10qilnx
|
|
|
|
- added bring-ha-up.alert script to allow ha auto-failback
|
|
|
|
|
|
|
|
* Fri Oct 15 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 0.99.2-9qilnx
|
|
|
|
- added additional monitors and alerts from ftp.kernel.org as examples
|
|
|
|
|
|
|
|
* Thu Oct 14 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 0.99.2-8qilnx
|
|
|
|
- added squid.monitor script
|
|
|
|
- changed references to sendmail from /usr/lib/sendmail to /usr/sbin/sendmail
|
|
|
|
|
|
|
|
* Thu Oct 14 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 0.99.2-7qilnx
|
|
|
|
- fix for previous fix
|
|
|
|
|
|
|
|
* Thu Oct 14 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 0.99.2-6qilnx
|
|
|
|
- added bring-ha-down.alert script for use with heartbeat
|
|
|
|
|
|
|
|
* Fri Jun 18 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 0.99.2-5qilnx
|
|
|
|
- really fixed initscript (oops I forgot to add the install line)
|
|
|
|
- don't overwrite config files on update
|
|
|
|
- create log directory (/var/log/mon)
|
|
|
|
|
|
|
|
* Thu Jun 10 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 0.99.2-4qilnx
|
|
|
|
- added script lvs.alert
|
|
|
|
- fixed initscript restart
|
|
|
|
|
|
|
|
* Mon May 03 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 0.99.2-3qilnx
|
|
|
|
- fixed requirement list (excluded "-Dopt")
|
|
|
|
|
|
|
|
* Fri Apr 30 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 0.99.2-2qilnx
|
|
|
|
- fixed references tu /usr/local/bin/perl
|
|
|
|
|
|
|
|
* Fri Apr 30 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 0.99.2-1qilnx
|
|
|
|
- first build
|