Browse Source

icinga updates

Signed-off-by: monitorbuilder_pel7ppc64lebuilder0 <monitorbuilder@powerel.org>
master
monitorbuilder_pel7ppc64lebuilder0 4 months ago
parent
commit
37c398c1e3
  1. 2
      SOURCES/icinga-notifications.service
  2. 12
      SOURCES/nagios-plugins-systemd.pymodule.patch
  3. 2
      SPECS/icinga-notifications-web.spec
  4. 17
      SPECS/icinga-notifications.spec
  5. 2
      SPECS/icinga-php-library.spec
  6. 91
      SPECS/icingaweb2-module-director.spec
  7. 2
      SPECS/icingaweb2-module-graphite.spec
  8. 2
      SPECS/icingaweb2-module-reporting.spec
  9. 2
      SPECS/icingaweb2-module-toplevelview.spec
  10. 47
      SPECS/nagios-plugins-systemd.spec
  11. 2
      SPECS/prometheus.spec

2
SOURCES/icinga-notifications.service

@ -4,7 +4,7 @@ After=syslog.target network-online.target icinga2.service postgresql.service @@ -4,7 +4,7 @@ After=syslog.target network-online.target icinga2.service postgresql.service

[Service]
Type=notify
ExecStart=/usr/sbin/icinga-notifications-daemon --config /etc/icinga-notifications/config.yml
ExecStart=/usr/sbin/icinga-notifications --config /etc/icinga-notifications/config.yml
User=icinganotifications
Group=icinganotifications


12
SOURCES/nagios-plugins-systemd.pymodule.patch

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
diff --color -ur check_systemd-2.3.1/setup.py check_systemd-2.3.1.pymodule/setup.py
--- check_systemd-2.3.1/setup.py 2021-03-03 21:05:57.000000000 +0100
+++ check_systemd-2.3.1.pymodule/setup.py 2022-11-06 12:52:16.694700980 +0100
@@ -27,7 +27,7 @@
name='check_systemd',
packages=find_packages(),
version=find_version('check_systemd.py'),
- scripts=['check_systemd.py'],
+ py_modules=['check_systemd'],
install_requires=[
'nagiosplugin>=1.2',
],

2
SPECS/icinga-notifications-web.spec

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
%global docdir %{_datadir}/doc/icinganotifications

Name: icinga-notifications-web
Version: 0.0.4
Version: 0.0.5
Release: 1%{?dist}
Summary: Icinga Notifications Web — Manage incidents and who gets notified about them how and when
Group: Applications/System

17
SPECS/icinga-notifications.spec

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
%define service %{name}.service

Name: icinga-notifications
Version: 0.0.4
Version: 0.0.5
Release: 1%{?dist}
Summary: Icinga Notifications
Group: System Environment/Daemons
@ -31,10 +31,13 @@ Icinga Notifications @@ -31,10 +31,13 @@ Icinga Notifications
%prep
%setup -q -T -c %{name}-%{version}
git clone https://%{provider_prefix} .
sed 's/go 1.22$/go 1.22.0/' -i go.mod

%build
go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}"" -buildvcs=false -trimpath ./cmd/icinga-notifications-daemon
go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}"" -buildvcs=false -trimpath -o channel/ ./cmd/channel/...
go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}" \
-X 'icinga-notifications/internal.LibExecDir="%{_libexecdir}"/"%{name}"/' -X 'icinga-notifications/internal.SysConfDir="%{configdir}"'" \
-buildvcs=false -trimpath ./cmd/icinga-notifications
go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}"" -buildvcs=false -trimpath -o channels/ ./cmd/channels/...


%install
@ -42,8 +45,8 @@ install -d -m 0755 %{buildroot}%{_sbindir} @@ -42,8 +45,8 @@ install -d -m 0755 %{buildroot}%{_sbindir}
install -d -m 0755 %{buildroot}%{configdir}
install -d -m 0755 %{buildroot}%{_unitdir}
install -d -m 0755 %{buildroot}%{_libexecdir}/%{name}
install -m 0755 icinga-notifications-daemon %{buildroot}%{_sbindir}/
%{__cp} -r channel %{buildroot}%{_libexecdir}/%{name}/
install -m 0755 icinga-notifications %{buildroot}%{_sbindir}/
%{__cp} -r channels %{buildroot}%{_libexecdir}/%{name}/
install -m 0644 config.example.yml %{buildroot}%{configdir}/config.yml
install -m 0644 icinga2.conf %{buildroot}%{configdir}/icinga2-notifications.conf
install -m 0644 %{S:1} %{buildroot}%{_unitdir}/
@ -69,8 +72,8 @@ rm -rf %{buildroot} @@ -69,8 +72,8 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc LICENSE README.md
%{_sbindir}/icinga-notifications-daemon
%{_libexecdir}/%{name}/channel/
%{_sbindir}/icinga-notifications
%{_libexecdir}/%{name}/channels/
%{_unitdir}/%{service}
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/schema

2
SPECS/icinga-php-library.spec

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
%global basedir %{_datadir}/icinga-php/ipl

Name: icinga-php-library
Version: 0.13.2
Version: 0.14.0
Release: 1%{?dist}
Summary: Icinga PHP Library for Icinga Web 2
Group: Applications/System

91
SPECS/icingaweb2-module-director.spec

@ -0,0 +1,91 @@ @@ -0,0 +1,91 @@
%global module_name director
%global icingaweb_min_version 2.10.3
%global basedir %{_datadir}/icingaweb2/modules/%{module_name}

Name: icingaweb2-module-%{module_name}
Version: 1.11.1
Release: 1%{?dist}
Summary: Configuration deployment tool in the Icinga ecosystem
Group: Applications/System
License: GPLv2+
URL: https://icinga.com
Source0: https://github.com/Icinga/icingaweb2-module-%{module_name}/archive/v%{version}.tar.gz
BuildArch: noarch
Requires: icingaweb2 >= %{icingaweb_min_version}
Requires: php-Icinga >= %{icingaweb_min_version}
Requires: icingaweb2-module-%{module_name}-daemon = %{version}-%{release}


%description
Icinga Director is the configuration deployment tool in the Icinga ecosystem,
designed for automating configuration deployments,
but also for making changes directly in the webinterface.

%package daemon
Requires(pre): shadow-utils
Requires: icingaweb2-module-%{module_name} = %{version}-%{release}
Requires: icingacli >= %{icingaweb_min_version}
Requires: php-process
Summary: Icinga Director daemon files
%description daemon
Daemon files for Icinga Director.


%prep
%autosetup


%build


%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{basedir}
cp -r * %{buildroot}%{basedir}
install -Dpm 0644 contrib/systemd/icinga-director.service %{buildroot}%{_unitdir}/icinga-director.service
install -dm 0750 %{buildroot}/var/lib/icingadirector


%preun
if [ $1 == 0 ]; then
rm -f /etc/icingaweb2/enabledModules/director
fi
%post
if [ $1 == 1 ]; then
if [ ! -d /etc/icingaweb2/enabledModules ]; then
install -dm 2770 -g icingaweb2 /etc/icingaweb2/enabledModules
fi
ln -sf /usr/share/icingaweb2/modules/director /etc/icingaweb2/enabledModules/director
fi


%pre daemon
getent passwd icingadirector >/dev/null || useradd -r -G icingaweb2 -d /var/lib/icingadirector -s /sbin/nologin icingadirector
%post daemon
if [ $1 -eq 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then
/usr/lib/systemd/systemd-update-helper install-system-units icinga-director.service || :
fi
%preun daemon
if [ $1 -eq 0 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then
/usr/lib/systemd/systemd-update-helper remove-system-units icinga-director.service || :
fi
%postun daemon
if [ $1 -ge 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then
/usr/lib/systemd/systemd-update-helper mark-restart-system-units icinga-director.service || :
fi
test "$1" != 0 || userdel -rf icingadirector &>/dev/null || :


%files
%doc README.md
%docdir %{_datadir}/icingaweb2/modules/%{module_name}/doc
%license LICENSE
%{_datadir}/icingaweb2/modules/%{module_name}/


%files daemon
/usr/lib/systemd/system/icinga-director.service
%attr(-,icingadirector,icingaweb2) /var/lib/icingadirector


%changelog

2
SPECS/icingaweb2-module-graphite.spec

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
%global basedir %{_datadir}/icingaweb2/modules/%{module_name}

Name: icingaweb2-module-%{module_name}
Version: 1.2.2
Version: 1.2.4
Release: 1%{?dist}
Summary: Audit - Icinga Web 2 module
Group: Applications/System

2
SPECS/icingaweb2-module-reporting.spec

@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
%global service_user apache

Name: icingaweb2-module-%{module_name}
Version: 1.0.1
Version: 1.0.2
Release: 1%{?dist}
Summary: Reporting - Icinga Web 2 module
Group: Applications/System

2
SPECS/icingaweb2-module-toplevelview.spec

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
%global icingaweb_min_version 2.6.0
%global basedir %{_datadir}/icingaweb2/modules/%{module_name}
Name: icingaweb2-module-%{module_name}
Version: 0.3.2
Version: 0.4.0
Release: 1%{?dist}
Summary: TopLevelView is a drill down view into your Icinga environment
Group: Applications/System

47
SPECS/nagios-plugins-systemd.spec

@ -0,0 +1,47 @@ @@ -0,0 +1,47 @@
%global nagiospluginsdir %{_libdir}/nagios/plugins
%global debug_package %{nil}

Name: nagios-plugins-systemd
Version: 2.3.1
Release: 1%{dist}
Summary: Nagios Plugin - check_systemd
License: LGPL-2.1-only
URL: https://exchange.icinga.com/joseffriedrich/check_systemd
Source: https://github.com/Josef-Friedrich/check_systemd/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0: nagios-plugins-systemd.pymodule.patch
BuildRequires: python3-devel
Requires: python3


%description
This systemd check for nagios compatible monitoring systems will report a
degraded systemd to your monitoring solution. It can also be used to monitor
individual systemd services and timers units.


%prep
%autosetup -p1 -n check_systemd-%{version}


%build
%{__python3} setup.py build


%install
%{__python3} setup.py install --root %{buildroot} --optimize 2
mkdir -p %{buildroot}/%{nagiospluginsdir}
mv %{buildroot}/%{_bindir}/check_systemd %{buildroot}/%{nagiospluginsdir}


%check
PYTHONPATH=%{buildroot}/%{nagiospluginsdir}:${PYTHONPATH} PATH=%{buildroot}/%{nagiospluginsdir}:${PATH} %tox


%files
%doc README.*
%license LICENSE
%{nagiospluginsdir}/check_systemd
%{python3_sitelib}


%changelog

2
SPECS/prometheus.spec

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
#%define debug_package %{nil}

Name : prometheus
Version : 2.37.0
Version : 2.52.0
Release : 1%{dist}
License : MIT
URL : https://prometheus.io

Loading…
Cancel
Save