mirror of https://github.com/Icinga/icinga2.git
commit
51aa2d7f43
|
@ -44,6 +44,7 @@ install_if_not_exists(icinga2/features-available/perfdata.conf ${CMAKE_INSTALL_S
|
|||
install_if_not_exists(icinga2/features-available/statusdata.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/features-available)
|
||||
install_if_not_exists(icinga2/features-available/syslog.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/features-available)
|
||||
install_if_not_exists(icinga2/scripts/mail-notification.sh ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/scripts)
|
||||
install_if_not_exists(logrotate.d/icinga2 ${CMAKE_INSTALL_SYSCONFDIR}/logrotate.d)
|
||||
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_SYSCONFDIR}/icinga2/features-enabled\")")
|
||||
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink ../features-available/checker.conf \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_SYSCONFDIR}/icinga2/features-enabled/checker.conf\")")
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
# ----- logrotate config -------------
|
||||
/var/log/icinga2/icinga2.log {
|
||||
daily
|
||||
rotate 90
|
||||
compress
|
||||
delaycompress
|
||||
missingok
|
||||
notifempty
|
||||
create 644 icinga icinga
|
||||
copytruncate
|
||||
#postrotate
|
||||
# if /etc/init.d/icinga2 status > /dev/null ; then \
|
||||
# /etc/init.d/icinga2 reload > /dev/null; \
|
||||
# fi;
|
||||
#endscript
|
||||
}
|
||||
|
||||
/var/log/icinga2/error.log {
|
||||
daily
|
||||
rotate 90
|
||||
compress
|
||||
delaycompress
|
||||
missingok
|
||||
notifempty
|
||||
create 644 icinga icinga
|
||||
copytruncate
|
||||
}
|
||||
|
||||
/var/log/icinga2/debug.log {
|
||||
hourly
|
||||
rotate 90
|
||||
compress
|
||||
delaycompress
|
||||
missingok
|
||||
notifempty
|
||||
create 644 icinga icinga
|
||||
copytruncate
|
||||
}
|
||||
|
|
@ -418,6 +418,7 @@ exit 0
|
|||
%files common
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING COPYING.Exceptions README NEWS AUTHORS ChangeLog
|
||||
%attr(755,-,-) %{_sysconfdir}/logrotate.d/%{name}
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/perfdata
|
||||
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/tmp
|
||||
|
|
|
@ -37,7 +37,7 @@ void FileLogger::Start()
|
|||
String path = GetPath();
|
||||
|
||||
try {
|
||||
stream->open(path.CStr(), std::fstream::out | std::fstream::trunc);
|
||||
stream->open(path.CStr(), std::fstream::app | std::fstream::out);
|
||||
|
||||
if (!stream->good())
|
||||
BOOST_THROW_EXCEPTION(std::runtime_error("Could not open logfile '" + path + "'"));
|
||||
|
|
Loading…
Reference in New Issue