Commit Graph

9827 Commits

Author SHA1 Message Date
Michael Friedrich 1c2a59bf63
Merge pull request #6591 from Icinga/bugfix/lto-builds-static-initialize-namespaces
Fix static initializer priority for namespaces in LTO builds
2018-09-04 16:54:30 +02:00
Michael Friedrich 709caaa578
Merge pull request #6590 from Icinga/fix/custom-var-workaround
Update workaround for custom vars
2018-09-04 16:41:55 +02:00
Michael Friedrich 19993df380 Fix static initializer priority for namespaces in LTO builds
fixes #6575
2018-09-04 16:36:22 +02:00
Jean Flach 72cc41d14e
Merge pull request #6356 from sourcejedi/fix/systemd
Fix logging under systemd
2018-09-04 15:24:43 +02:00
Michael Friedrich 18bf1ef519
Merge pull request #6568 from Icinga/feature/commit-order
Ensure that config object types are committed in dependent load order
2018-09-04 13:39:40 +02:00
Jean Flach e1a963f0ac
Update workaround for custom vars
This updates #6572 which did not work
2018-09-04 13:33:48 +02:00
Jean Flach 8fe490f945 Update variable names 2018-09-04 11:45:35 +02:00
Markus Frosch 13a8fa20f9 Ensure that config object types are committed in dependent load order 2018-09-04 11:45:35 +02:00
Michael Friedrich 81b9c9cef0
Merge pull request #6581 from Icinga/fix/speedup-config
Shuffle items before config validation
2018-09-04 11:15:13 +02:00
Jean Flach c721c302cd Shuffle items before config validation 2018-09-04 11:10:27 +02:00
Michael Friedrich b44187fc6b
Merge pull request #6588 from Icinga/bugfix/prepare-dirs-safe-reload-full-path
Fix using full path in prepare-dirs/safe-reload scripts
2018-09-04 11:04:02 +02:00
Michael Friedrich 64305b4466 Fix using full path in prepare-dirs/safe-reload scripts
This won't be visible with packages and overridden paths,
just source builds which invoke the scripts manually.

refs #6506
2018-09-03 16:47:38 +02:00
Michael Friedrich 504b8a17a3
Merge pull request #6583 from maxswjeon/master
Update PostgreSQL library path variable in INSTALL.md
2018-09-03 15:48:55 +02:00
Michael Friedrich 2358c67c3d
Merge pull request #6586 from Icinga/bugfix/centos-7-buildfix-non-unity-builds
Fix non-unity builds on CentOS 7 with std::shared_ptr
2018-09-03 15:47:45 +02:00
Michael Friedrich bc844aca06 Fix non-unity builds on CentOS 7 with std::shared_ptr
refs #6509
2018-09-03 15:32:28 +02:00
Michael Friedrich f0c9098a28
Merge pull request #6574 from gunnarbeutner/fix/move-downtime-constants
Move new downtime constants into the Icinga namespace
2018-09-03 09:28:16 +02:00
Jeon Sang Wan 6fa76ea498 Edited INSTALL.md File
Edited the Mistake of the PostgreSQL_LIBRARY_DIR comment error.
#6582
2018-09-02 22:11:19 +09:00
Gunnar Beutner 17c7131177 Move new downtime constants into the Icinga namespace 2018-08-25 19:35:01 +02:00
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
Alan Jenkins 50463a6a10 Daemonize(): use one error convention, not three
Standardize on exit() / _exit() (this depends whether we are considered
to be the "main" fork, which should run anything registered with atexit()).
Exclude `return false` and throwing exceptions.

This fixes the error path for fork().  Daemonize() would return false, but
the `return false` error convention was not tested in the caller.

It also fixes the error message for fork() to show the error code.
Everyone loves `strace`, but sysadmins should not have to rerun their
daemons under it just to see an error code.

Also in case an exception is thrown, show its diagnostic information
instead of dropping it on the floor.  In the log message, I mention why we
are uninitializing and then initializing the app at this point.

For the reader, it pushes all the weirdness into the error convention of
Daemonize().  This comes back to the exit() / _exit() distinction.  Once
we have forked, we technically don't want to allow the parent process to
exit(), so we don't want to return to the caller.
2018-08-25 10:07:02 +01:00
Alan Jenkins a0fb0bbfe3 fix "Console" log to flush
It's called "Console", which would be line-buffered anyway.  But, it's
implemented as std::cout.  This might be piped to a logger, as in
daemontools or systemd.  In this case it will not be a TTY, and log lines
should be flushed without too much delay.  Let's just flush each message.

Let's not introduce a static instance of StreamLogger (flushed by interval
timer).  That's too stressful to read, because static instances are really
annoying to order.  Example citation: "Yay, our static destructors are
pretty much beyond repair at this point." -- application.cpp.

I don't know if there will be any need to optimize logging syscalls.  The
init script uses `--daemonize`.  I think the systemd service should also
avoid using the "Console" log after startup (see next commit).  The
documentation does not warn that the syslog feature is less efficient
in system calls than mainlog; deferred flusing does not seem to be a highly
prominent feature.  There's no cool comment in the code about how much the
syscalls were slowing down some use case (or qualifying that this
optimization can only eliminate syscalls on platforms with both mutexes and
clocks that can work without syscalls).
2018-08-25 09:54:55 +01:00
Michael Friedrich e4e28421e8
Merge pull request #6532 from Icinga/feature/allow-down-times-to-apply-on-child-hosts-3935
Add child_options to ScheduledDowntime
2018-08-24 15:14:58 +02:00
Michael Friedrich 2372abb49a Add upgrading docs for API schedule-downtime 'child_options' 2018-08-24 14:56:04 +02:00
Jean Flach dec50bcf93
Merge pull request #6502 from jenslink/patch-2
Update 17-language-reference.md
2018-08-24 14:37:00 +02:00
Jean Flach 5792086f10
Merge pull request #6501 from jenslink/patch-1
Update 03-monitoring-basics.md
2018-08-24 14:36:45 +02:00
Jean Flach aed251a409
Merge pull request #6510 from Icinga/feature/windows-build-scripts
Update Appveyor build scripts
2018-08-24 14:31:57 +02:00
Noah Hilverling 01fea22c77 Add child_options to ScheduledDowntime
refs #3935
2018-08-24 14:29:39 +02:00
Michael Friedrich 237fd520db
Merge pull request #6509 from gunnarbeutner/feature/real-constants
Implement support for namespaces
2018-08-24 12:10:10 +02:00
Michael Friedrich 91b0b25b36 Update upgrading docs for v2.10 and namespaces 2018-08-24 11:54:20 +02:00
Michael Friedrich 5f4eb6518f
Merge pull request #6572 from Icinga/bugfix/29X-custom-vars-upgrade
Add note about workaround for broken custom vars
2018-08-24 11:25:08 +02:00
Jean Flach 130a74d91c Add note about workaround for broken custom vars 2018-08-24 11:03:29 +02:00
Michael Friedrich 7a22113f86
Merge pull request #6570 from Icinga/bugfix/tls-anonymous-clients-limit
Increase limit for simultaneously connected anonymous TLS clients
2018-08-23 17:13:41 +02:00
Michael Friedrich 0dd168fe80 Increase limit for simultaneously connected anonymous TLS clients 2018-08-23 17:10:51 +02:00
Michael Friedrich e8f0d6da4f
Merge pull request #6567 from Icinga/bugfix/env-api-port-number
ApiListener: Dump the state file port detail as number
2018-08-22 14:04:15 +02:00
Michael Friedrich d64d5f0804
Merge pull request #6556 from Icinga/feature/installer-msi-suppress
windows: Allow suppression of extra actions in the MSI package
2018-08-22 13:03:24 +02:00
Michael Friedrich 6a71b75f63 ApiListener: Dump the state file port detail as number
refs #6511
2018-08-22 12:57:47 +02:00
Michael Friedrich 8a172d39fe
Merge pull request #6561 from miso231/feature_itl_ceph
[Feature] Ceph health CheckCommand
2018-08-22 12:51:50 +02:00
Jean Flach d7fad934bf
Merge pull request #6469 from Icinga/fix/windows-resize-behavior
Fix Windows Agent resize behavior
2018-08-22 12:49:45 +02:00
Michael Friedrich ebe4bcea8e
Merge pull request #6563 from miso231/feature/itl-cloudera-check
[Feature] Cloudera service health CheckCommand
2018-08-22 12:39:57 +02:00
Michael Friedrich af00ac0e6c
Merge pull request #6544 from gunnarbeutner/fix/deprecated-strstream-header
Remove #include for deprecated header file
2018-08-22 11:50:25 +02:00
Michal Petko 4b5b5bdf5d Add cloudera plugin to itl 2018-08-21 21:03:55 +02:00
Michal Petko 31e72df9b0 Fix value attributes for ceph plugin 2018-08-21 20:00:19 +02:00
Michal Petko a4ad3c364f Fix table format for ceph check doc 2018-08-21 15:51:20 +02:00
Michal Petko 9d66f3c73c Add ceph plugin to itl 2018-08-21 12:09:43 +02:00
Markus Frosch 7b4e93b52a windows: Allow suppression of extra actions in the MSI package
By setting SUPPRESS_XTRA
2018-08-20 10:37:47 +02:00
Gunnar Beutner 15baa8e012 Update documentation 2018-08-14 15:26:59 +02:00
Gunnar Beutner e678fa1aa5 Refactor Application::*Const() 2018-08-13 15:27:05 +02:00
Gunnar Beutner e44848a664 Remove #include for deprecated header file 2018-08-13 14:07:24 +02:00
Gunnar Beutner 1a0311a49f Implement namespace support for the keys() function 2018-08-13 13:44:31 +02:00
Gunnar Beutner 8fda8d72ac Implement support for the namespace and using keywords 2018-08-13 13:44:31 +02:00