monitorbuilder_pel7ppc64lebuilder0
1 year ago
17 changed files with 456 additions and 79 deletions
@ -0,0 +1,12 @@
@@ -0,0 +1,12 @@
|
||||
[Unit] |
||||
Description=Icinga Notifications |
||||
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 |
||||
User=icinganotifications |
||||
Group=icinganotifications |
||||
|
||||
[Install] |
||||
WantedBy=multi-user.target |
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
[Unit] |
||||
Description=Icinga Reporting Scheduler |
||||
|
||||
[Service] |
||||
Type=simple |
||||
User=apache |
||||
ExecStart=/usr/bin/icingacli reporting schedule run |
||||
Restart=on-success |
||||
|
||||
[Install] |
||||
WantedBy=multi-user.target |
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/php |
||||
<?php |
||||
/*! Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */ |
||||
|
||||
require_once '/usr/share/php/Icinga/Application/Cli.php'; |
||||
|
||||
Icinga\Application\Cli::start('/usr/share/icingaweb2')->dispatch(); |
@ -0,0 +1,35 @@
@@ -0,0 +1,35 @@
|
||||
Alias /icingaweb2 "/usr/share/icingaweb2/public" |
||||
|
||||
<Directory "/usr/share/icingaweb2/public"> |
||||
Options SymLinksIfOwnerMatch |
||||
AllowOverride None |
||||
Require all granted |
||||
|
||||
DirectoryIndex index.php |
||||
|
||||
SetEnv ICINGAWEB_CONFIGDIR "/etc/icingaweb2" |
||||
|
||||
EnableSendfile Off |
||||
|
||||
<IfModule mod_rewrite.c> |
||||
RewriteEngine on |
||||
RewriteBase /icingaweb2/ |
||||
RewriteCond %{REQUEST_FILENAME} -s [OR] |
||||
RewriteCond %{REQUEST_FILENAME} -l [OR] |
||||
RewriteCond %{REQUEST_FILENAME} -d |
||||
RewriteRule ^.*$ - [NC,L] |
||||
RewriteRule ^.*$ index.php [NC,L] |
||||
</IfModule> |
||||
|
||||
<IfModule !mod_rewrite.c> |
||||
DirectoryIndex error_norewrite.html |
||||
ErrorDocument 404 /icingaweb2/error_norewrite.html |
||||
</IfModule> |
||||
|
||||
# Forward PHP requests to FPM |
||||
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 |
||||
<FilesMatch "\.php$"> |
||||
SetHandler "proxy:fcgi://127.0.0.1:9000" |
||||
ErrorDocument 503 /icingaweb2/error_unavailable.html |
||||
</FilesMatch> |
||||
</Directory> |
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
/etc/icingaweb2(/.*)? gen_context(system_u:object_r:icingaweb2_config_t,s0) |
||||
|
||||
/usr/share/icingaweb2(/.*)? gen_context(system_u:object_r:icingaweb2_content_t,s0) |
||||
|
||||
/var/log/icingaweb2(/.*)? gen_context(system_u:object_r:icingaweb2_rw_content_t,s0) |
||||
/var/cache/icingaweb2(/.*)? gen_context(system_u:object_r:icingaweb2_rw_content_t,s0) |
||||
/var/lib/icingaweb2(/.*)? gen_context(system_u:object_r:icingaweb2_rw_content_t,s0) |
@ -0,0 +1,45 @@
@@ -0,0 +1,45 @@
|
||||
######################################## |
||||
## <summary> |
||||
## Allow the specified domain to read |
||||
## icingaweb2 configuration files. |
||||
## </summary> |
||||
## <param name="domain"> |
||||
## <summary> |
||||
## Domain allowed access. |
||||
## </summary> |
||||
## </param> |
||||
## <rolecap/> |
||||
# |
||||
interface(`icingaweb2_read_config',` |
||||
gen_require(` |
||||
type icingaweb2_config_t; |
||||
') |
||||
|
||||
files_search_etc($1) |
||||
list_dirs_pattern($1, icingaweb2_config_t, icingaweb2_config_t) |
||||
read_files_pattern($1, icingaweb2_config_t, icingaweb2_config_t) |
||||
read_lnk_files_pattern($1, icingaweb2_config_t, icingaweb2_config_t) |
||||
') |
||||
|
||||
######################################## |
||||
## <summary> |
||||
## Allow the specified domain to read |
||||
## and write icingaweb2 configuration files. |
||||
## </summary> |
||||
## <param name="domain"> |
||||
## <summary> |
||||
## Domain allowed access. |
||||
## </summary> |
||||
## </param> |
||||
## <rolecap/> |
||||
# |
||||
interface(`icingaweb2_manage_config',` |
||||
gen_require(` |
||||
type icingaweb2_config_t; |
||||
') |
||||
|
||||
files_search_etc($1) |
||||
manage_dirs_pattern($1, icingaweb2_config_t, icingaweb2_config_t) |
||||
manage_files_pattern($1, icingaweb2_config_t, icingaweb2_config_t) |
||||
manage_lnk_files_pattern($1, icingaweb2_config_t, icingaweb2_config_t) |
||||
') |
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
<?php |
||||
/*! Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+ */ |
||||
|
||||
require_once '/usr/share/php/Icinga/Application/webrouter.php'; |
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
policy_module(icingaweb2, 0.0.1) |
||||
|
||||
######################################## |
||||
# |
||||
# Declarations |
||||
# |
||||
|
||||
require { |
||||
type httpd_t; |
||||
} |
||||
|
||||
## <desc> |
||||
## <p> |
||||
## Allow Apache to manage icingaweb2 configuration |
||||
## </p> |
||||
## </desc> |
||||
gen_tunable(httpd_can_manage_icingaweb2_config, true) |
||||
|
||||
type icingaweb2_config_t; |
||||
files_config_file(icingaweb2_config_t) |
||||
|
||||
optional_policy(` |
||||
apache_content_template(icingaweb2) |
||||
icingaweb2_read_config(httpd_t) |
||||
tunable_policy(`httpd_can_manage_icingaweb2_config',` |
||||
icingaweb2_manage_config(httpd_t) |
||||
') |
||||
') |
||||
|
@ -0,0 +1,63 @@
@@ -0,0 +1,63 @@
|
||||
%global module_name notifications |
||||
%global basedir %{_datadir}/icingaweb2/modules/notifications |
||||
%global docdir %{_datadir}/doc/icinganotifications |
||||
|
||||
Name: icinga-notifications-web |
||||
Version: 0.0.1 |
||||
Release: 1%{?dist} |
||||
Summary: Icinga Notifications Web — Manage incidents and who gets notified about them how and when |
||||
Group: Applications/System |
||||
License: GPLv2+ |
||||
URL: https://icinga.com |
||||
#Source0: https://github.com/Icinga/icinga-notifications-web/archive/v%{version}.tar.gz |
||||
BuildArch: noarch |
||||
Requires: icingaweb2 >= 2.9 |
||||
Requires: icinga-notifications |
||||
Requires: icinga-php-library |
||||
Requires: icinga-php-thirdparty |
||||
|
||||
|
||||
%description |
||||
Icinga DB Web offers a modern and streamlined design to provide a clear |
||||
and concise overview of your monitoring environment. |
||||
|
||||
|
||||
%prep |
||||
%setup -q -T -c %{name}-%{version} |
||||
git clone https://github.com/Icinga/icinga-notifications-web . |
||||
|
||||
|
||||
|
||||
%install |
||||
mkdir -vp %{buildroot}%{basedir} |
||||
mkdir -vp %{buildroot}%{docdir} |
||||
cp -vr application %{buildroot}%{basedir} |
||||
cp -vr library %{buildroot}%{basedir} |
||||
cp -vr public %{buildroot}%{basedir} |
||||
cp -vr configuration.php %{buildroot}%{basedir} |
||||
cp -vr module.info %{buildroot}%{basedir} |
||||
|
||||
|
||||
%clean |
||||
rm -rf %{buildroot} |
||||
|
||||
|
||||
%preun |
||||
set -e |
||||
# Only for removal |
||||
if [ $1 == 0 ]; then |
||||
echo "Disabling icingaweb2 module '%{module_name}'" |
||||
rm -f /etc/icingaweb2/enabledModules/%{module_name} |
||||
fi |
||||
exit 0 |
||||
|
||||
|
||||
%files |
||||
%doc README.md |
||||
%license LICENSE |
||||
%defattr(-,root,root) |
||||
%{basedir} |
||||
%{docdir} |
||||
|
||||
|
||||
%changelog |
@ -0,0 +1,79 @@
@@ -0,0 +1,79 @@
|
||||
%global provider github |
||||
%global provider_tld com |
||||
%global project Icinga |
||||
%global repo icinga-notifications |
||||
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} |
||||
%global import_path %{provider_prefix} |
||||
%define debug_package %nil |
||||
%define configdir %{_sysconfdir}/%{name} |
||||
%define service %{name}.service |
||||
|
||||
Name: icinga-notifications |
||||
Version: 0.0.1 |
||||
Release: 1%{?dist} |
||||
Summary: Icinga Notifications |
||||
Group: System Environment/Daemons |
||||
License: GPLv2+ |
||||
URL: https://%{provider_prefix} |
||||
#Source0: https://%{import_path}/archive/v%{version}.tar.gz |
||||
Source1: icinga-notifications.service |
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} |
||||
BuildRequires: gcc |
||||
BuildRequires: git |
||||
BuildRequires: systemd |
||||
Requires(pre): shadow-utils |
||||
|
||||
|
||||
%description |
||||
Icinga Notifications |
||||
|
||||
|
||||
%prep |
||||
%setup -q -T -c %{name}-%{version} |
||||
git clone https://%{provider_prefix} . |
||||
|
||||
%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 |
||||
|
||||
|
||||
%install |
||||
install -d -m 0755 %{buildroot}%{_sbindir} |
||||
install -d -m 0755 %{buildroot}%{configdir} |
||||
install -d -m 0755 %{buildroot}%{_unitdir} |
||||
install -m 0755 icinga-notifications-daemon %{buildroot}%{_sbindir}/ |
||||
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}/ |
||||
install -d -m 0755 %{buildroot}%{_datadir}/%{name} |
||||
(umask 0022 && cp -rv schema %{buildroot}%{_datadir}/%{name}/) |
||||
|
||||
|
||||
%pre |
||||
getent group icinganotifications >/dev/null || groupadd -r icinganotifications |
||||
getent passwd icinganotifications >/dev/null || useradd -r -g icinganotifications -d /etc/icinganotifications -s /sbin/nologin -c 'Icinga Notifications' icinganotifications |
||||
%post |
||||
%systemd_post %{service} |
||||
%preun |
||||
%systemd_preun %{service} |
||||
%postun |
||||
%systemd_postun %{service} |
||||
|
||||
|
||||
%clean |
||||
rm -rf %{buildroot} |
||||
|
||||
|
||||
%files |
||||
%defattr(-,root,root) |
||||
%doc LICENSE README.md |
||||
%{_sbindir}/icinga-notifications-daemon |
||||
%{_unitdir}/%{service} |
||||
%dir %{_datadir}/%{name} |
||||
%{_datadir}/%{name}/schema |
||||
%defattr(0644,icinganotifications,icinganotifications,0755) |
||||
%dir %{configdir} |
||||
%config(noreplace) %{configdir}/config.yml |
||||
%config(noreplace) %{configdir}/icinga2-notifications.conf |
||||
|
||||
|
||||
%changelog |
@ -0,0 +1,55 @@
@@ -0,0 +1,55 @@
|
||||
%global module_name pdfexport |
||||
%global icingaweb_min_version 2.6.0 |
||||
%global basedir %{_datadir}/icingaweb2/modules/%{module_name} |
||||
|
||||
Name: icingaweb2-module-%{module_name} |
||||
Version: 0.10.2 |
||||
Release: 1%{?dist} |
||||
Summary: PDF Export - Icinga Web 2 module |
||||
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} |
||||
|
||||
|
||||
%description |
||||
PDF export functionality for Icinga Web 2 using Google Chrome/Chromium for |
||||
rendering. |
||||
|
||||
|
||||
%prep |
||||
%setup -q |
||||
|
||||
|
||||
%build |
||||
|
||||
|
||||
%install |
||||
rm -rf %{buildroot} |
||||
mkdir -p %{buildroot}%{basedir} |
||||
cp -r * %{buildroot}%{basedir} |
||||
|
||||
|
||||
%clean |
||||
rm -rf %{buildroot} |
||||
|
||||
|
||||
%preun |
||||
set -e |
||||
if [ $1 == 0 ]; then |
||||
echo "Disabling icingaweb2 module '%{module_name}'" |
||||
rm -f /etc/icingaweb2/enabledModules/%{module_name} |
||||
fi |
||||
exit 0 |
||||
|
||||
|
||||
%files |
||||
%doc README.md LICENSE |
||||
%defattr(-,root,root) |
||||
%{basedir} |
||||
|
||||
|
||||
%changelog |
@ -0,0 +1,84 @@
@@ -0,0 +1,84 @@
|
||||
%global module_name reporting |
||||
%global icingaweb_min_version 2.6.0 |
||||
%global basedir %{_datadir}/icingaweb2/modules/%{module_name} |
||||
%global service_name icinga-%{module_name} |
||||
%global service_user apache |
||||
|
||||
Name: icingaweb2-module-%{module_name} |
||||
Version: 0.10.0 |
||||
Release: 1%{?dist} |
||||
Summary: Reporting - Icinga Web 2 module |
||||
Group: Applications/System |
||||
License: GPLv2+ |
||||
URL: https://icinga.com |
||||
Source0: https://github.com/Icinga/icingaweb2-module-%{module_name}/archive/v%{version}.tar.gz |
||||
Source1: %{service_name}.service |
||||
BuildArch: noarch |
||||
BuildRequires: systemd-devel |
||||
Requires: systemd |
||||
Requires: icingaweb2 >= %{icingaweb_min_version} |
||||
Requires: php-Icinga >= %{icingaweb_min_version} |
||||
Requires: icingaweb2-module-reactbundle >= 0.4 |
||||
Requires: icingaweb2-module-ipl >= 0.2.1 |
||||
Requires: icingaweb2-module-pdfexport >= 0.9 |
||||
|
||||
|
||||
%description |
||||
Icinga Reporting is the central component for reporting related functionality |
||||
in the monitoring web frontend and framework Icinga Web 2. The engine allows |
||||
you to create reports over a specified time period for ad-hoc and scheduled |
||||
generation of reports. Other modules use the provided functionality in order |
||||
to provide concrete reports. |
||||
If you are looking for SLA reports for your hosts and services, please also |
||||
install the idoreports module. |
||||
|
||||
|
||||
%prep |
||||
%setup -q |
||||
|
||||
|
||||
%build |
||||
|
||||
|
||||
%install |
||||
rm -rf %{buildroot} |
||||
mkdir -p %{buildroot}%{basedir} |
||||
cp -r * %{buildroot}%{basedir} |
||||
install -d %{buildroot}%{_unitdir} |
||||
install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{service_name}.service |
||||
# Replace user in service unit |
||||
sed -i -e 's~^User=.*~User=%{service_user}~' %{buildroot}%{_unitdir}/%{service_name}.service |
||||
|
||||
|
||||
%clean |
||||
rm -rf %{buildroot} |
||||
|
||||
|
||||
|
||||
%post |
||||
%systemd_post %{service_name}.service |
||||
|
||||
|
||||
%preun |
||||
%systemd_preun %{service_name}.service |
||||
if [ $1 == 0 ]; then |
||||
echo "Disabling icingaweb2 module '%{module_name}'" |
||||
rm -f /etc/icingaweb2/enabledModules/%{module_name} |
||||
fi |
||||
exit 0 |
||||
|
||||
|
||||
%postun |
||||
set -e |
||||
%systemd_postun_with_restart %{service_name}.service |
||||
exit 0 |
||||
|
||||
|
||||
%files |
||||
%doc README.md LICENSE |
||||
%defattr(-,root,root) |
||||
%{basedir} |
||||
%{_unitdir}/%{service_name}.service |
||||
|
||||
|
||||
%changelog |
Loading…
Reference in new issue