2024-01-06 07:31:01 +01:00
|
|
|
%define nscaport 5667
|
|
|
|
%define nscauser nagios
|
|
|
|
%define nscagroup nagios
|
|
|
|
|
|
|
|
Name: nagios-nsca
|
2024-01-06 07:31:01 +01:00
|
|
|
Version: 2.10.2
|
2024-01-06 07:31:01 +01:00
|
|
|
Release: 1mamba
|
|
|
|
Summary: Nagios Service Check Acceptor (NSCA)
|
|
|
|
Group: Network/Monitoring
|
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
2024-01-06 07:31:01 +01:00
|
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
|
|
URL: https://www.nagios.org/
|
2024-01-06 07:31:01 +01:00
|
|
|
Source0: https://github.com/NagiosEnterprises/nsca.git/nsca-%{version}/nsca-%{version}.tar.bz2
|
2024-01-06 07:31:01 +01:00
|
|
|
Source1: %{name}-sysconfig
|
2024-01-06 07:31:01 +01:00
|
|
|
Source2: nsca.service
|
2024-01-06 07:31:01 +01:00
|
|
|
Patch0: %{name}-2.9.1-initscript.patch
|
|
|
|
Patch1: %{name}-2.9.1-send_nsca_config.patch
|
|
|
|
# http://tracker.nagios.org/view.php?id=286
|
|
|
|
Patch2: %{name}-2.9.1-nagios_bug_286.patch
|
|
|
|
License: GPL
|
|
|
|
## AUTOBUILDREQ-BEGIN
|
|
|
|
BuildRequires: glibc-devel
|
|
|
|
BuildRequires: libmcrypt-devel
|
2024-01-06 07:31:01 +01:00
|
|
|
BuildRequires: libnsl-devel
|
|
|
|
BuildRequires: libwrap-devel
|
2024-01-06 07:31:01 +01:00
|
|
|
## AUTOBUILDREQ-END
|
|
|
|
Provides: nsca = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
Provides: nagios-plugins-nsca = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
|
|
|
|
%description
|
|
|
|
NSCA is a Nagios addon that allows you to send passive check results from remote Linux/Unix hosts to the Nagios daemon running on the monitoring server.
|
|
|
|
It listens for host and service check results from remote machines (sent using the send_nsca program).
|
|
|
|
Upon receiving data from a remote client, the daemon will make a *very* basic attempt at validating the data it has received from the client.
|
|
|
|
If the data looks okay the daemon will make entries in the Nagios external command file telling Nagios to process the host or service check result.
|
|
|
|
|
|
|
|
%package client
|
|
|
|
Summary: Client application for sending updates to a nsca server
|
|
|
|
Group: Network/Monitoring
|
|
|
|
|
|
|
|
%description client
|
|
|
|
Client application for sending service check informations to a nsca server.
|
|
|
|
|
2024-01-06 07:31:01 +01:00
|
|
|
%debug_package
|
|
|
|
|
2024-01-06 07:31:01 +01:00
|
|
|
%prep
|
|
|
|
%setup -q -n nsca-%{version}
|
|
|
|
%patch0 -p1
|
2024-01-06 07:31:01 +01:00
|
|
|
#%patch1 -p1
|
|
|
|
#%patch2 -p1
|
2024-01-06 07:31:01 +01:00
|
|
|
|
|
|
|
sed -i \
|
|
|
|
-e "s|^command_file=.*|command_file=%{_localstatedir}/spool/nagios/cmd/nagios.cmd|" \
|
|
|
|
-e "s|^alternate_dump_file=.*|alternate_dump_file=%{_localstatedir}/spool/nagios/cmd/nsca.dump|" \
|
|
|
|
sample-config/nsca.cfg.in
|
|
|
|
|
|
|
|
%build
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
|
|
|
|
%configure \
|
|
|
|
--with-nsca-user="%{nscauser}" \
|
|
|
|
--with-nsca-grp="%{nscagroup}" \
|
|
|
|
--with-nsca-port="%{nscaport}" \
|
|
|
|
--sysconfdir="%{_sysconfdir}/nagios" \
|
|
|
|
--localstatedir="%{_localstatedir}/log/nagios" \
|
|
|
|
|
|
|
|
%make all
|
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
|
|
|
|
install -Dp -m 0755 src/nsca %{buildroot}%{_sbindir}/nsca
|
|
|
|
install -Dp -m 0755 src/send_nsca %{buildroot}%{_sbindir}/send_nsca
|
|
|
|
install -Dp -m 0644 sample-config/nsca.cfg %{buildroot}%{_sysconfdir}/nagios/nsca.cfg
|
|
|
|
install -Dp -m 0644 sample-config/send_nsca.cfg %{buildroot}%{_sysconfdir}/nagios/send_nsca.cfg
|
|
|
|
install -Dp -m 0644 %{S:1} %{buildroot}%{_sysconfdir}/sysconfig/nsca
|
2024-01-06 07:31:01 +01:00
|
|
|
install -Dp -m 0644 %{S:2} %{buildroot}%{_unitdir}/nsca.service
|
2024-01-06 07:31:01 +01:00
|
|
|
|
|
|
|
%post
|
2024-01-06 07:31:01 +01:00
|
|
|
%systemd_post nsca
|
|
|
|
:
|
2024-01-06 07:31:01 +01:00
|
|
|
|
|
|
|
%preun
|
2024-01-06 07:31:01 +01:00
|
|
|
%systemd_preun nsca
|
|
|
|
:
|
2024-01-06 07:31:01 +01:00
|
|
|
|
|
|
|
%postun
|
2024-01-06 07:31:01 +01:00
|
|
|
%systemd_postun_with_restart nsca
|
|
|
|
:
|
2024-01-06 07:31:01 +01:00
|
|
|
|
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_sbindir}/nsca
|
|
|
|
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/nagios/nsca.cfg
|
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/nsca
|
2024-01-06 07:31:01 +01:00
|
|
|
%{_unitdir}/nsca.service
|
|
|
|
%doc LICENSE.md
|
2024-01-06 07:31:01 +01:00
|
|
|
|
|
|
|
%files client
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_sbindir}/send_nsca
|
|
|
|
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/nagios/send_nsca.cfg
|
|
|
|
|
|
|
|
%changelog
|
2024-01-06 07:31:01 +01:00
|
|
|
* Wed Jun 08 2022 Automatic Build System <autodist@mambasoft.it> 2.10.2-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-06 07:31:01 +01:00
|
|
|
* Mon Dec 27 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.10.1-1mamba
|
|
|
|
- update to 2.10.1
|
|
|
|
|
2024-01-06 07:31:01 +01:00
|
|
|
* Sat Jun 05 2021 Automatic Build System <autodist@mambasoft.it> 2.10.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-06 07:31:01 +01:00
|
|
|
* Wed Oct 24 2012 Davide Madrisan <davide.madrisan@gmail.com> 2.9.1-1mamba
|
|
|
|
- package created by autospec
|