Alan Jenkins a21166dcf8 Fix logging under systemd
icinga2.service used `-e ${ICINGA2_ERROR_LOG}`, but this is documented
as having no effect without `-d`.  Furthermore, icinga2 under systemd
unconditionally logged everything to the system log (but without setting
the log level etc), which contradicted the documentation.  (Issue #6339)

Stop icinga2 on systemd from logging to stdout - and hence the system log -
once it has finished starting up.  Just like when you start icinga2 from a
terminal using `-d`.  And just like -d, we stop logging fatal errors to
stderr, and instead write to the log file passed with `-e`.

As per docs, mainlog (icinga2.log) is already enabled by default.  And
pre-startup messages including config errors will still appear in the
system log.

This uses a new option --close-stdio, which has the same effect on logging as
--daemonize, but does not fork or call setsid().

For this purpose, I moved setsid() up and into Daemonize().

Consequence of that last point: if anyone is weird enough to specify a TTY
device file as the fatal error log (-e option), that will become icinga's
controlling terminal, which you generally don't want as a daemon.  This
makes it consistent with the existing behaviour for icinga mainlog.  For
this reason you're supposed to use O_NOCTTY in Linux daemons.  But I wasn't
sure where icinga would want to put the ugly `#ifdef _WIN32 ... #else ...`.
2018-08-25 10:21:06 +01:00
2017-04-06 10:48:11 +02:00
2018-07-23 19:52:57 +02:00
2018-08-25 10:21:06 +01:00
2018-08-25 10:21:06 +01:00
2018-08-13 15:27:05 +02:00
2018-08-25 10:21:06 +01:00
2018-07-21 10:38:09 +02:00
2018-08-03 11:11:39 +02:00
2018-07-16 17:00:39 +02:00
2018-08-03 11:11:39 +02:00
2018-07-24 12:53:07 +02:00
2018-07-24 12:53:07 +02:00
2013-11-03 13:45:26 +01:00
2017-10-23 10:07:31 +02:00
2018-05-29 14:12:11 +02:00
2018-07-17 14:27:32 +02:00
2018-07-24 12:53:07 +02:00

Build Status

Icinga 2

Icinga Logo

Table of Contents

  1. About
  2. License
  3. Installation
  4. Documentation
  5. Support
  6. Contributing

About

Icinga 2 is an open source monitoring system which checks the availability of your network resources, notifies users of outages, and generates performance data for reporting.

Scalable and extensible, Icinga 2 can monitor large, complex environments across multiple locations.

Icinga 2 as monitoring core works best with Icinga Web 2 as web interface.

More information can be found at www.icinga.com and inside the documentation.

Licensing

Icinga 2 and the Icinga 2 documentation are licensed under the terms of the GNU General Public License Version 2, you will find a copy of this license in the COPYING file included in the source package.

In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library under certain conditions as described in each individual source file, and distribute linked combinations including the two.

You must obey the GNU General Public License in all respects for all of the code used other than OpenSSL. If you modify file(s) with this exception, you may extend this exception to your version of the file(s), but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. If you delete this exception statement from all source files in the program, then also delete it here.

Installation

Read the INSTALL.md file for more information about how to install it.

Documentation

The documentation is located in the doc/ directory. The latest documentation is also available on https://docs.icinga.com

Support

Check the project website at https://www.icinga.com for status updates. Join the community channels for questions or ask an Icinga partner for professional support.

Contributing

There are many ways to contribute to Icinga -- whether it be sending patches, testing, reporting bugs, or reviewing and updating the documentation. Every contribution is appreciated!

Please continue reading in the contributing chapter.

Description
The core of our monitoring platform with a powerful configuration language and REST API.
Readme 184 MiB
Languages
C++ 92.9%
CMake 2.8%
PLpgSQL 2%
C# 0.7%
Vim Script 0.5%
Other 1%