Commit Graph

9945 Commits

Author SHA1 Message Date
Noah Hilverling 3854ed683b Improve TLS handshake exception logging 2018-09-06 15:58:42 +02:00
Michael Friedrich 7e0f2f07a1
Merge pull request #6595 from Icinga/feature/limit-anonymous-rpc-connections
Allow to configure anonymous clients limit inside the ApiListener object
2018-09-06 13:26:46 +02:00
Michael Friedrich 208eb1accc
Merge pull request #6598 from dominik-r-s/patch-1
doc/09-object-types: states filter ignored for Acknowledgements
2018-09-06 10:40:39 +02:00
Michael Friedrich 80337c7814
Merge pull request #6597 from Icinga/feature/docs-development-fedora-debuginfos
Add Fedora to development docs for debuginfo packages
2018-09-06 10:40:11 +02:00
Michael Friedrich 694a992357 Add Fedora to development docs for debuginfo packages 2018-09-06 10:31:26 +02:00
Michael Friedrich 1f4f6282c7 Fix crash on API queries with Fedora 28 hardening and GCC 8
The actual fix is to handle nullptr references differently
for an empty filter expression. The other changes include
oob checks not necesarily involved.

fixes #6533
2018-09-06 09:56:04 +02:00
Michael Friedrich 9a75f47fc5 Allow to configure anonymous clients limit inside the ApiListener object
Previously this was hardcoded, and for security reasons users might want
to adjust this value. This affects CSR signing requests as well as
clients which have not yet been configured as endpoints on the current
node.

refs #6566
2018-09-05 17:45:35 +02:00
Michael Friedrich a1ec919f5b Raise the message size for anonymous client and pki request calls to 1MB
If one sends the full certificate chain, this previous limit of 64KB
could be hit.
2018-09-05 17:44:05 +02:00
dominik-r-s 4afeda4758
09-object-types: notifications: states filter ignored for Acknowledgements! 2018-09-05 16:46:36 +02:00
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