Michael Friedrich
64e273afdd
Merge pull request #6639 from Icinga/fix/windows-api-log-rename
...
Ensure to _unlink before renaming replay log on Windows
2018-09-27 08:02:00 +02:00
Jordi van Scheijen
bc1dc9c7a7
Fix issue 5022
2018-09-27 07:52:37 +02:00
Michael Friedrich
c979f86e4e
Merge pull request #6632 from Icinga/feature/cluster-faster-reconnect
...
Increase the cluster reconnect frequency to 10s
2018-09-25 17:07:01 +02:00
Michael Friedrich
cbde35ff22
Use a dynamic thread pool for API connections
...
The full analysis is located in #6517 .
fixes #6517
2018-09-25 12:43:10 +02:00
Michael Friedrich
cd819f74f4
Increase the cluster reconnect frequency to 10s
...
This is blocked by #6517 .
refs #6234
2018-09-25 12:36:30 +02:00
Michael Friedrich
c8dcd1297f
Initialize Socket Event Engine on application startup
...
Previously this happened inside the TlsStream constructor
during the first connection attempt.
2018-09-24 15:50:59 +02:00
Michael Friedrich
eee4426dcb
Merge pull request #6622 from Icinga/bugfix/ido-pgsql-cleanup-timestamp-utc
...
Ensure to use UTC timestamps for IDO PgSQL cleanup queries
2018-09-17 11:20:49 +02:00
Michael Friedrich
3038b150a9
Merge pull request #6616 from Icinga/feature/tls-handshake-timeout-config
...
Add ApiListener#tls_handshake_timeout option
2018-09-17 11:20:12 +02:00
Michael Friedrich
05f7e0dae8
Merge pull request #6621 from Icinga/bugfix/ido-remove-unused-timestamp-function
...
Remove unused timestamp function in DB IDO
2018-09-17 11:16:47 +02:00
Michael Friedrich
5d36546a99
Ensure to use UTC timestamps for IDO PgSQL cleanup queries
...
refs #6584
2018-09-17 11:06:54 +02:00
Michael Friedrich
c0c17fc340
Remove unused timestamp function in DB IDO
...
refs #6584
2018-09-17 10:06:30 +02:00
Michael Friedrich
b81ac972b9
Silence compiler warning for nice()
2018-09-14 14:29:52 +02:00
Michael Friedrich
29701b4db5
Add ApiListener#tls_handshake_timeout option
...
This allows to specify the previously hardcoded
timeout of 10s.
refs #6517
2018-09-14 09:20:09 +02:00
Michael Friedrich
c8d4e785a1
Merge pull request #6519 from Icinga/fix/erroneous-console-exit
...
Reset terminal on erroneous console exit
2018-09-13 13:34:58 +02:00
Michael Friedrich
af1f2e0c55
Only check for Problem types in user filers for Recovery/Acknowledgement notifications
...
refs #6047
2018-09-12 17:09:15 +02:00
Noah Hilverling
834e37d3e2
Still notify on acknowledgement and recovery if user does not get problem notifications at all
...
refs #6047
2018-09-12 14:54:45 +02:00
Noah Hilverling
bfe7d46a68
Only send acknowledgement notification if user received a problem notification
...
refs #6047
2018-09-12 14:54:45 +02:00
Michael Friedrich
dd59964702
Merge pull request #6596 from Icinga/bugfix/gcc-8-f28-hardening-crash
...
Fix crash on API queries with Fedora 28 hardening and GCC 8
2018-09-11 20:44:12 +02:00
Michael Friedrich
f297881e23
Call SSL_shutdown() at least twice
2018-09-10 16:10:16 +02:00
Noah Hilverling
3854ed683b
Improve TLS handshake exception logging
2018-09-06 15:58:42 +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
Michael Insel
cc417ca176
Fix CI builds
2018-09-04 18:56:54 +02:00
Michael Insel
46163700b4
Include api user configuration file during api setup
...
refs #6557
2018-09-04 18:38:38 +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
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
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
Jean Flach
c721c302cd
Shuffle items before config validation
2018-09-04 11:10:27 +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
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
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
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
6a71b75f63
ApiListener: Dump the state file port detail as number
...
refs #6511
2018-08-22 12:57:47 +02:00
Gunnar Beutner
e678fa1aa5
Refactor Application::*Const()
2018-08-13 15:27:05 +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
Gunnar Beutner
10d6f70a85
Move constants and functions into different namespaces
2018-08-13 13:44:31 +02:00
Gunnar Beutner
1a8692d972
Implement support for namespaces
2018-08-13 13:44:31 +02:00
Gunnar Beutner
9d513d8f05
Implement support for modifying frozen attributes
2018-08-13 13:44:31 +02:00
Gunnar Beutner
d9c0b6f806
Refactor REGISTER_SCRIPTFUNCTION_* macros
2018-08-13 13:44:31 +02:00
Michael Friedrich
060a1ebbd9
Merge pull request #6512 from Icinga/feature/sni-environment
...
Refactor environment for API connections
2018-08-10 13:15:48 +02:00
Michael Friedrich
2ee6dfaf93
Re-add environment to IcingaApplication feature stats
2018-08-10 13:01:53 +02:00
Michael Friedrich
97513965e6
Introduce IcingaApplication#environment
...
Precedence as follows:
- DEnvironment=...
- const Environment = ...
- object IcingaApplication "app" { environment = "..." }
The wrapped script constant handling is required
since we cannot directly link from libremote (SNI handling)
to libicinga where the object resides. Instead we'll
use the Application class helpers for hiding the ScriptGlobal
calls.
2018-08-10 12:49:48 +02:00
Michael Friedrich
a4c689e5cf
Build fix for CentOS 7 and non-unity builds
2018-08-09 16:23:24 +02:00
Michael Friedrich
b350512b11
Rename to Environment constant
2018-08-09 13:19:33 +02:00
Markus Frosch
eb02d9041d
Refactor environment for API connections
...
* Const renamed to `ApiEnvironment`
* Handling moved to ApiListener
* Now a property of ApiListener
2018-08-09 13:19:33 +02:00
Michael Friedrich
f1e7e635a2
Merge pull request #6531 from Icinga/feature/zone-all_parents
...
Expose Zone#all_parents via API
2018-08-09 13:11:23 +02:00
Michael Friedrich
3cc8bd2fcc
Merge pull request #6511 from Icinga/feature/apilistener-dynamic-port
...
ApiListener: Add support for dynamic port handling
2018-08-09 12:09:23 +02:00
Michael Friedrich
ecb73e08ed
Implement ApiListener status file removal on shutdown
2018-08-09 11:54:34 +02:00
Noah Hilverling
7b977b2c52
Do not send 'finished reconnecting...' if failed
2018-08-09 08:29:27 +02:00
Markus Frosch
20269a89d0
ApiListener: Add support for dynamic port handling
2018-08-08 17:42:57 +02:00
Michael Friedrich
ba21a54443
Merge pull request #6530 from Icinga/bugfix/query-was-empty
...
IDO/MySQL: avoid empty queries
2018-08-08 14:41:57 +02:00
Alexander A. Klimov
ea5614f7df
Expose Zone#all_parents via API
2018-08-08 14:38:02 +02:00
Alexander A. Klimov
7bcbd9b497
Rename Zone#GetAllParents() to Zone#GetAllParentsRaw()
2018-08-08 14:38:02 +02:00
Alexander A. Klimov
7a31cd4fe7
IDO/MySQL: avoid empty queries
2018-08-08 12:11:37 +02:00
Michael Friedrich
9be3ee1a1a
Update output for `--version`
...
This moves the system and build information before
the application paths which are normally not that important.
2018-08-07 18:46:18 +02:00
Michael Friedrich
a2a1f5c8d2
Take a note why the explicit configDir variable is needed on Windows
2018-08-07 18:33:59 +02:00
Markus Frosch
9fbc40615a
Improve path handling in cmake and daemon
2018-08-07 14:10:26 +02:00
Michael Friedrich
8bac1dc99e
Merge pull request #6521 from gunnarbeutner/feature/references
...
Implement references
2018-08-07 12:00:19 +02:00
Gunnar Beutner
24de1963b1
Merge pull request #6526 from Icinga/bugfix/wpessimizing-move-6524
...
icinga::PackObject(): shorten conversion to string
2018-08-07 10:05:18 +02:00
Alexander A. Klimov
137f5363c4
icinga::PackObject(): shorten conversion to string
...
refs #6524
2018-08-07 09:57:08 +02:00
Gunnar Beutner
8bfd419702
Implement references
2018-08-07 07:44:48 +02:00
Michael Insel
eea42c6807
Fix windows build
2018-08-05 20:17:43 +02:00
Michael Insel
51b900b307
Reset terminal on erroneous console exit
...
This ensures that the terminal is resetted on an erroneous exit when using the Icinga 2 console.
refs #6382
2018-08-05 16:30:36 +02:00
Michael Friedrich
33492420f3
Merge pull request #6427 from gunnarbeutner/fix/recursive-serialize
...
Improve error message for serializing objects with recursive references
2018-08-03 11:03:42 +02:00
Gunnar Beutner
56cf64f590
Improve error message for serializing objects with recursive references
2018-08-02 11:06:24 +02:00
Jean Flach
065bc23d9a
Merge pull request #6508 from gunnarbeutner/feature/dictionary-clear
...
Implement the Dictionary#clear script function
2018-08-02 10:30:08 +02:00
Gunnar Beutner
a5a0119799
Implement the Dictionary#clear script function
2018-08-02 08:45:19 +02:00
Christopher Schirner
b870e84904
Only check lag if connected
2018-07-31 10:41:14 +02:00
Christopher Schirner
35038f72d6
Invert connected check
2018-07-31 10:40:54 +02:00
Peter Eckel
b5a7af126d
Fixed indentation
2018-07-29 15:39:02 +02:00
Peter Eckel
f788795415
Reduce the log level for missing env macros to debug
...
refs #6460
2018-07-29 15:17:50 +02:00
Jean Flach
2e3a1ff0c6
Merge pull request #6498 from Icinga/bugfix/match-regex-match-any-regression
...
Fix regression with MatchAny false conditions on match/regex/cidr_match
2018-07-27 17:28:13 +02:00
Jean Flach
a5afaf5b40
Merge pull request #6497 from Icinga/bugfix/match-dictionary-error-handling
...
Improve error logging for match/regex/cidr_match functions and unsupported dictionary usage
2018-07-27 17:26:12 +02:00
Michael Friedrich
72c0f07661
Fix regression with MatchAny false conditions on match/regex/cidr_match
...
fixes #6496
2018-07-27 16:55:37 +02:00
Michael Friedrich
8e682ce9b1
Improve error logging for match/regex/cidr_match functions and unsupported dictionary usage
...
fixes #6442
2018-07-27 16:34:50 +02:00
Michael Friedrich
1d22b6e176
Merge pull request #6410 from Icinga/remove-dead-code
...
Remove unused code
2018-07-27 15:56:52 +02:00
Michael Friedrich
b16d96d197
Merge pull request #6489 from Icinga/feature/object-packer
...
Implement object packer for consistent hashing
2018-07-27 12:49:28 +02:00
Alexander A. Klimov
dd8cb42969
Implement object packer for consistent hashing
2018-07-26 17:36:48 +02:00
Markus Frosch
ddc5b951b3
Revert "Implement support for the --env command-line argument"
2018-07-26 17:09:06 +02:00
Michael Friedrich
46e71a83dc
Merge pull request #6414 from Icinga/feature/icinga-envs
...
Implement support for the --env command-line argument
2018-07-26 10:09:42 +02:00
Michael Friedrich
e519d6bbc6
Merge pull request #6110 from gunnarbeutner/feature/for-loop-var
...
Implement support for optionally specifying the 'var' keyword in 'for' loops
2018-07-26 10:05:17 +02:00
Michael Friedrich
272176e2d0
Merge pull request #6475 from dh-harald/master
...
lib->compat->statusdatawriter: fix notifications_enabled
2018-07-26 10:03:57 +02:00
Michael Friedrich
3fc3d86fbb
Merge pull request #6386 from Icinga/fix/timeperiods-do-not-clear-after-restart
...
Fix that TimePeriod segments are not cleared on restart
2018-07-26 10:02:46 +02:00
Michael Friedrich
020bd86b4c
Merge pull request #6408 from Icinga/bugfix/objectlock-unlock-m_lockowner
...
ObjectLock#Unlock(): don't reset m_Object->m_LockOwner too early
2018-07-26 10:02:26 +02:00
Michael Friedrich
038b2fb94c
Merge pull request #6379 from Icinga/global-zone-validation
...
Throw config error when using global zones as parent
2018-07-26 10:01:46 +02:00
Michael Friedrich
fcc32957cb
Merge pull request #6455 from Icinga/feature/filelogger-started
...
Log something when the Filelogger has been started
2018-07-26 10:01:06 +02:00
Michael Friedrich
62e91e1891
Merge pull request #6430 from Icinga/fix/workqueue-log-message
...
Fix negative 'empty in' value in WorkQueue log message
2018-07-26 09:59:53 +02:00
Michael Friedrich
89d42fee72
Merge pull request #6440 from Icinga/bugfix/typo
...
Fix typo
2018-07-26 09:59:20 +02:00
Michael Friedrich
b1adad0a42
Merge pull request #6456 from Icinga/feature/logger-flush-dev
...
Keep notes for immediately log flushing
2018-07-26 09:58:59 +02:00
Michael Friedrich
45a0518c78
Merge pull request #6458 from Icinga/bugfix/configitem-debug-log
...
Fix debug build log entry for ConfigItem activation priority
2018-07-26 09:57:19 +02:00
Michael Friedrich
5a8e98213c
Merge pull request #6487 from Icinga/bugfix/discard-warning-6485
...
Fix "Discard" message being warning
2018-07-26 09:52:33 +02:00
Jean Flach
2b44eff8da
Fix "Discard" message being warning
2018-07-26 09:39:03 +02:00
dh.harald
d9d701a05c
lib->compat->statusdatawriter: fix notifications_enabled
2018-07-23 22:28:09 +01:00
Michael Friedrich
14d88d90a0
Merge pull request #6470 from sebastic/spelling-errors
...
Fix spelling errors.
2018-07-23 17:59:45 +02:00
Bas Couwenberg
0891380789
Fix spelling errors.
...
* occured -> occurred
* dosen't -> doesn't
2018-07-21 10:38:09 +02:00
Alexander A. Klimov
f71bad96d5
Start and stop the timer thread lazily
...
refs #6461
2018-07-20 15:36:15 +02:00
Michael Friedrich
7519d23892
Add debug logging for daemonize/timers
...
The previous commit is 1:1 the same I've implemented
here already. Great teamwork with Alex :)
refs #6445
2018-07-19 13:34:12 +02:00
Alexander A. Klimov
d15e1006f3
Re-introduce Timer::Initialize()
...
refs #6445
2018-07-19 13:22:37 +02:00
Michael Friedrich
fc2da5047c
Fix debug build log entry for ConfigItem activation priority
...
This is not visible in release builds, minor fix.
2018-07-19 12:53:28 +02:00
Michael Friedrich
fd381ff5e0
Keep notes for immediately log flushing
...
Disabled, but kept for future debugging sessions.
Helps with things like #6455
2018-07-19 12:51:30 +02:00
Michael Friedrich
7c2e999f1f
Log something when the Filelogger has been started
...
Helps to see whether the logger object is active,
spotted during #6445
2018-07-19 12:48:29 +02:00
Alexander A. Klimov
030afee8b0
Fix typo
2018-07-17 14:23:20 +02:00
Michael Insel
4170bd5205
Fix negative 'empty in' value in WorkQueue log message
...
This fixes a negative 'empty in' value in WorkQueue log messages.
2018-07-10 19:21:04 +02:00
Alexander A. Klimov
ac6afadb5a
Make HttpServerConnection#m_DataHandlerMutex a boost::recursive_mutex
...
refs #6428
2018-07-09 14:40:32 +02:00
Gunnar Beutner
2eb46f1203
Implement support for optionally specifying the 'var' keyword in 'for' loops
2018-07-03 11:03:22 +02:00
Michael Friedrich
ab9a32d67d
Fix missing next check update causing the scheduler to execute checks too often
...
Regression from #6217 , only in git master.
fixes #6421
2018-07-02 16:17:53 +02:00
Michael Friedrich
601c54e44e
Add more debug logging for check scheduling
2018-07-02 16:17:33 +02:00
Gunnar Beutner
c577554073
Implement support for the --env command-line argument
2018-06-27 13:15:52 +02:00
Jean Flach
4159682cf8
Remove unused code
...
These methods and types were used only by the Icinga Studio
2018-06-25 10:09:30 +02:00
Alexander A. Klimov
02645c59ff
ObjectLock#Unlock(): don't reset m_Object->m_LockOwner too early
2018-06-22 14:13:09 +02:00
Michael Friedrich
ba680dc829
Merge pull request #6405 from Icinga/bugfix/windows-reload-behaviour-6378
...
TcpSocket#Bind(): reuse socket addresses on Windows, too
2018-06-22 12:25:28 +02:00
Michael Friedrich
a1c2eb3d87
Ensure to _unlink before renaming replay log on Windows
2018-06-22 11:12:09 +02:00
Alexander A. Klimov
79878ea286
TcpSocket#Bind(): reuse socket addresses on Windows, too
...
refs #6378
2018-06-22 10:33:31 +02:00
Michael Friedrich
0ffb8af8e3
Conform to RFC for CRLF in HTTP requests
...
refs #6242
2018-06-21 16:53:44 +02:00
Michael Friedrich
1b2af3f0c4
Merge pull request #6402 from Icinga/fix/tls-stream-read-pending
...
Use SSL_pending() for remaining TLS stream data
2018-06-21 16:43:03 +02:00
Michael Friedrich
257ad12646
Use SSL_pending() for remaining TLS stream data
...
We've used this previously, and according to the OpenSSL
docs we should just use it. From our experience everything
done different to the API functions from OpenSSL causes
undefined behaviour in the worst case.
This commit also breaks the packet size limit into a more
readable version, including logs for development debug builds.
refs #6242
2018-06-21 15:58:05 +02:00
Michael Friedrich
9ea0650edc
Fix connection error handling in Elasticsearch and InfluxDB features
...
Previously this would just throw the entire exception stack trace
which is not needed here.
fixes #6394
2018-06-21 15:41:40 +02:00
Michael Friedrich
cc294e14d2
Merge pull request #6393 from Icinga/bugfix/elasticsearchwriter-not-writing-6354
...
Stream#ReadLine(): fix false positive buffer underflow indicator
2018-06-21 15:06:21 +02:00
Alexander A. Klimov
1c213877a4
Stream#ReadLine(): simplify algorithm
...
refs #6354
2018-06-20 17:28:52 +02:00
Alexander A. Klimov
3c7851107c
TlsStream#IsEof(): fix false positive EOF indicator
...
refs #6242
2018-06-20 16:55:33 +02:00
Alexander A. Klimov
02d1f1cc57
Stream#ReadLine(): fix false positive buffer underflow indicator
...
refs #6354
2018-06-20 09:59:18 +02:00
Michael Friedrich
cfd6c79a03
Merge pull request #6387 from Icinga/fix/remove-broken-api-user-hash
...
Remove ApiUser password_hash functionality
2018-06-19 14:26:32 +02:00
Michael Friedrich
2fd6709952
Remove ApiUser password_hash functionality
...
This affects and fixes
- Windows reload
- Config validation
- RHEL 7.5 OpenSSL memory corruption
- Hash algorithm, requested changes
refs #6378
refs #6279
refs #6278
2018-06-19 11:32:03 +02:00
Noah Hilverling
ea08c85424
Fix that TimePeriod segments are not cleared on restart
...
refs #6282
2018-06-19 10:30:34 +02:00
Noah Hilverling
233d00d648
Merge pull request #6311 from Reamer/timeperiod_bugfix
...
refs #6282
2018-06-19 10:29:27 +02:00
Michael Friedrich
9b99c9d106
Remove leftover for sysconfig file parsing
...
refs #6255
2018-06-18 19:25:48 +02:00
Alexander A. Klimov
a0fca599da
HttpRequest#ParseBody(): indicate success on complete body
...
refs #6184
2018-06-18 16:02:22 +02:00
Michael Friedrich
eb1f37905d
Merge pull request #6368 from Icinga/fix/program-options-parsing-6365
...
Fix program option parsing
2018-06-15 16:09:13 +02:00
Jean Flach
ee9be90fa7
Throw config error when using global zones as parent
2018-06-15 14:40:09 +02:00
Michael Friedrich
8c3c4704d2
Merge pull request #6371 from Icinga/bugfix/socket-io-handling-with-http-json-rpc-6361
...
ApiListener#NewClientHandlerInternal(): Explicitly close the TLS stream on any failure
2018-06-15 14:35:48 +02:00
Michael Friedrich
b9bfe70444
Fix missing name for workqueue while creating runtime objects via API
...
fixes #6364
2018-06-15 14:25:03 +02:00
Alexander A. Klimov
7741517df7
ApiListener#NewClientHandlerInternal(): Explicitly close the TLS stream on any failure
...
refs #6361
2018-06-14 15:03:04 +02:00
Michael Insel
e885cf71c6
Fix program option parsing
...
This fixes the program option parsing.
2018-06-12 19:02:48 +02:00
Jean Flach
9a5d464448
Revert "Fix Windows reload"
...
This reverts commit 691e3cfd57
.
2018-06-12 12:19:16 +02:00
Jean Flach
0fc5db82dd
Fix ScheduledDowntimes replicating on restart
...
fixes #4272
2018-06-08 10:54:06 +02:00
Jean Flach
ee37c8c68e
Merge pull request #6343 from Icinga/fix/checks-via-command_endpoint-are-not-executed-6337
...
Fix that checks with command_endpoint don't return any check results
2018-06-07 11:42:40 +02:00
Michael Friedrich
447dad91c0
Increase header size to 8KB for HTTP requests
...
This is the default for Tomcat and Apache too
and avoids problems with cookies and long URLs.
fixes #6355
2018-06-06 20:25:36 +02:00
Michael Friedrich
bf0737ded5
Merge pull request #6328 from Icinga/sysconfig-env
...
Rework sysconfig file/startup environment
2018-06-05 13:27:36 +02:00
Noah Hilverling
d8b400dc17
Fix that checks with command_endpoint don't return any check results
...
fixes #6337
2018-05-29 13:51:34 +02:00
Michael Insel
d868780e6d
Fix unnecessary blank in log message
...
This fixes an unnecessary blank in the updating configuraiton log message.
information/cli: Updating ' "conf.d"' include in '/etc/icinga2/icinga2.conf'.
Should be:
information/cli: Updating '"conf.d"' include in '/etc/icinga2/icinga2.conf'.
2018-05-24 19:35:52 +02:00
Jean Flach
ed4e008e79
Rework sysconfig file
...
The sysconfig file now only contains the defaults as comments, changes
made there are given to the init.d script, prepare-dirs, safe-reload and
Icinga 2 itself. If nothing is set in the sysconfig file (as is the
default as all lines are commented out) the defaults are used.
fixes #6255
2018-05-23 15:18:42 +02:00
Michael Friedrich
4a6320d7f7
Update log message for skipped certificate renewal
...
Users kept asking about it, still it is just an "information"
that this isn't needed yet.
2018-05-23 15:18:38 +02:00
Michael Friedrich
653a2b4e7d
Merge pull request #6324 from Icinga/fix/6279-api-user-crash
...
Ensure that password hash generation from OpenSSL is atomic
2018-05-23 11:25:52 +02:00
Jean Flach
08a14cd136
Ensure that password hash generation from OpenSSL is atomic
...
This is supposed to solve a problem with segfaults caused by
race conditions withing the random byte generation of OpenSSL.
fixes #6279
2018-05-23 10:55:14 +02:00
Michael Friedrich
2d8158ec29
Merge pull request #6290 from jre3brg/opentsdb-metric-names
...
Fixed opentsdb metric name with colon chars
2018-05-22 15:46:04 +02:00
Michael Friedrich
f788878f79
Update log message for skipped certificate renewal
...
Users kept asking about it, still it is just an "information"
that this isn't needed yet.
2018-05-18 17:04:03 +02:00
Michael Friedrich
4a68ed9a5f
Ensure that icinga_min_version parameter is optional
...
Seen that here: https://github.com/Icinga/icinga2/issues/6319#issuecomment-390195058
refs #5960
refs #3998
2018-05-18 15:11:56 +02:00
Noah Hilverling
a5a2194fa2
Merge pull request #6292 from Icinga/fix/flapping-reminder-notification
...
Fix problem with reminder notifications if the checkable is flapping
2018-05-17 13:52:29 +02:00
Philipp Dallig
8e124e2abe
Do not add the old timeperiod segment, if we cut it in the middle
2018-05-16 12:04:38 +02:00
Michael Friedrich
120eb070d2
Merge pull request #6309 from Icinga/fix/compiler-warning-in-checkercomponent-ti
...
Fix compiler warning in checkercomponent.ti
2018-05-16 10:42:31 +02:00
Michael Friedrich
04af51b866
Merge pull request #6306 from Icinga/feature/checkresultreader-deprecated
...
Adjust message for CheckResultReader deprecation
2018-05-15 14:05:16 +02:00
Michael Friedrich
7f579db9af
Merge pull request #6305 from gunnarbeutner/feature/environment-variable
...
Introduce the 'Environment' variable
2018-05-15 14:04:50 +02:00
Gunnar Beutner
9c1e00eb94
Introduce the 'Environment' variable
2018-05-15 12:02:15 +02:00
Noah Hilverling
ead1f262e6
Fix compiler warning
...
fixes #6081
2018-05-15 11:25:28 +02:00
Michael Friedrich
ead3f0a227
Adjust message for CheckResultReader deprecation
...
refs #6031
2018-05-15 10:44:06 +02:00
Michael Friedrich
119965fe24
Adjust deprecation removal for compat features
...
As discussed with @lippserd :)
refs #6032
refs #6033
2018-05-14 15:55:30 +02:00
Michael Friedrich
5b19784b25
Change log level for failed event command execution
...
refs #5692
2018-05-11 15:24:37 +02:00
Michael Friedrich
2d87b667ab
Execute event commands only on actively checked host/service objects in an HA zone
...
fixes #3431
2018-05-11 12:58:33 +02:00
Michael Friedrich
964a5ebd57
Deprecate compatlog feature
...
fixes #6032
2018-05-09 17:37:28 +02:00
Michael Friedrich
f070d2136a
Ensure that user input for groups is unique on API object creation
...
refs #4732
2018-05-09 17:26:10 +02:00
Michael Friedrich
88d99094bf
Ensure that added group members are unique
...
refs #4732
2018-05-09 17:26:07 +02:00
Michael Friedrich
6660a45c41
Implement Array::Unique() and add unit tests
...
refs #4732
2018-05-09 17:25:55 +02:00
Michael Friedrich
16e8e3cf4b
Fix problem with reminder notifications if the checkable is flapping
2018-05-09 09:54:48 +02:00
Michael Friedrich
f0f0b47057
Fix style and logging from review; enhance output
...
refs #4508
2018-05-08 16:59:09 +02:00
Jean Flach
b8fc3a3ffa
Small changes to node wizard/command
...
refs #4508
2018-05-08 16:33:06 +02:00
Michael Insel
662d36fd16
Warn in case of failed conf.d exclusion also on master setup
...
refs #4508
2018-05-08 16:33:04 +02:00
Jean Flach
026359d404
Rename "dont-disable-confd"
...
Double negation is confusing. Also this would change the default
behaviour and could lead to problems in automated environments.
refs #4508
2018-05-08 16:32:56 +02:00
Jean Flach
a43cf8e9ef
Warn in case of failed conf.d exclusion
...
refs #4508
2018-05-08 16:32:53 +02:00
Michael Insel
58f923f5f7
Allow to disable conf.d inclusion through node wizard/setup
...
This implements a function to disable the conf.d directory through the node wizard/setup.
refs #4508
2018-05-08 16:31:59 +02:00
jre3brg
2fd94073ba
Fixed opentsdb metric name with colon chars
2018-05-08 09:40:13 +02:00
Jean Flach
c54e042942
Add activation priorities for config object types
...
This patch ensures that specific configuration types
are pre-activated and post-activated. In general,
logging is first, then common configuration objects
like host/service, downtimes, etc.
In the end, all features are activated after to ensure
that notifications are only sent once downtimes are applied.
A similar thing happens for starting with checks too early.
The ApiListener feature runs first to allow cluster connections
at first glance.
fixes #6057
fixes #6231
2018-05-04 11:25:47 +02:00
Jean Flach
88dc230294
Merge pull request #6285 from Icinga/feature/config-validation-timestamps
...
Add support for config validation log timestamps
2018-05-03 14:22:39 +02:00
Michael Friedrich
e606a443b7
Add support for config validation log timestamps
...
This also adds implicit support for the startup.log
generated from API config package validation, e.g. used by
the Icinga Director.
fixes #3455
2018-05-03 11:35:29 +02:00
Michael Friedrich
1102f60b43
Revert "Implement support for ECC certificates"
...
This reverts commit 10691db5b1
.
refs #5555
refs #6200
2018-05-02 16:54:07 +02:00
Jean Flach
0b1d5013ac
Revert "fixup set rlimit stack failed condition"
...
This reverts commit bf959371c4
.
fixes #6257
2018-04-25 14:26:40 +02:00
Jean Flach
04094032b5
Merge pull request #6236 from Icinga/feature/ido-pgsql-tls
...
Add TLS support for DB IDO PostgreSQL feature
2018-04-24 16:02:39 +02:00
Jean Flach
2c8dfcc1aa
Fix typo
2018-04-23 10:18:31 +02:00
Michael Friedrich
e6f214fa29
Log warning when sysconfig file cannot be read
...
refs #6215
2018-04-19 10:09:09 +02:00
Jean Flach
8b0126411b
Add improved error messages for resource limits
...
refs #6215
2018-04-19 08:55:05 +02:00
Michael Friedrich
fe0bf161cb
Add TLS support for DB IDO PostgreSQL feature
...
fixes #6211
2018-04-18 15:30:06 +02:00
Michael Friedrich
c7b6488e90
Merge pull request #6217 from Icinga/fix/reschedule-checks
...
Fix check behavior on restart
2018-04-17 20:59:03 +02:00
Michael Friedrich
a8b5d8e64a
Merge pull request #6205 from Icinga/feature/api-verbose-errors
...
API: Unify verbose error messages
2018-04-17 16:40:11 +02:00
Jean Flach
1e0f67d778
Fix ES 5 support
2018-04-17 09:17:20 +02:00
Jean Flach
fd5d4c5974
Move _type into url
2018-04-17 09:17:20 +02:00
Michael Friedrich
975ac47f8e
Fix Elastic 6 support
...
fixes #5905
2018-04-17 09:17:20 +02:00
Jan Beich
106be295eb
Explicitly use long with boost::posix_time
...
In file included from lib/base/base_unity.cpp:61:
lib/base/timer.cpp:295:31: error: no matching conversion for functional-style cast from 'double' to 'boost::posix_time::milliseconds' (aka 'subsecond_duration<boost::posix_time::time_duration, 1000>')
l_TimerCV.timed_wait(lock, boost::posix_time::milliseconds(wait * 1000));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from lib/remote/remote_unity.cpp:19:
lib/remote/eventqueue.cpp:111:30: error: no matching conversion for functional-style cast from 'double' to 'boost::posix_time::milliseconds' (aka 'subsecond_duration<boost::posix_time::time_duration, 1000>')
if (!m_CV.timed_wait(lock, boost::posix_time::milliseconds(timeout * 1000)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from lib/checker/checker_unity.cpp:1:
lib/checker/checkercomponent.cpp:128:26: error: no matching conversion for functional-style cast from 'double' to 'boost::posix_time::milliseconds' (aka 'subsecond_duration<boost::posix_time::time_duration, 1000>')
m_CV.timed_wait(lock, boost::posix_time::milliseconds(wait * 1000));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/date_time/time_duration.hpp:270:30: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'double' to 'const boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>' for 1st argument
class BOOST_SYMBOL_VISIBLE subsecond_duration : public base_duration
^
/usr/local/include/boost/date_time/time_duration.hpp:270:30: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'double' to 'boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>' for 1st argument
/usr/local/include/boost/date_time/time_duration.hpp:286:59: note: candidate template ignored: disabled by 'enable_if' [with T = double]
typename boost::enable_if<boost::is_integral<T>, void>::type* = 0) :
^
2018-04-15 04:06:11 +00:00
Michael Friedrich
b53685db59
Fix error handling on config package delete
2018-04-12 19:24:08 +02:00
Jean Flach
0e8971b48a
Merge pull request #6218 from terra-nova/issue-5277
...
Fix issue #5277
2018-04-12 14:50:11 +02:00
Michael Friedrich
026ce17fb6
Merge pull request #6209 from Icinga/feature/unify-master-zone-names
...
Unify zone name settings in node setup/wizard; add connection-less mode for node setup
2018-04-11 20:10:39 +02:00
fbachmann
3f75ccbe75
fix bug in Downtime::IsInEffect() method that would always return false if the triggering window for a flexible downtime had passed
2018-04-10 20:16:09 +02:00
Jean Flach
1a9c1591c0
Fix check behavior on restart
...
This patch changes the way checkresults are handled during a restart.
1. Check results coming in during a shutdown are ignored.
2. Upon start, checks which should have ran (next_check in the past),
are re-scheduled within the first minute.
This new behavior means there will be no more "Unknown - Terminated"
checkresults during a restart and checks with high check_interval will
be run earlier if they were already scheduled to run. The downside is
that after Icinga2 was down for a while, there will be a lot of checks
within the first minute. Our max concurrent check should take care of
this though.
2018-04-10 15:52:50 +02:00
Michael Friedrich
f2ce5b549c
Merge pull request #6207 from Icinga/fix/nscp-api-multiple-params
...
Fix multiple parameter problems for check_nscp_api
2018-04-09 10:07:04 +02:00
Michael Friedrich
7c0ef80279
Implement support for connection-less node setup (no csr auto-signing connect)
2018-04-06 19:49:01 +02:00
Michael Friedrich
9f2694bdc1
Unify setting the local and parent zone names for node wizard/setup
2018-04-06 19:18:19 +02:00
Michael Friedrich
abdc479d6a
Unify setting the master zone name for 'node wizard|setup` in master mode
2018-04-06 17:29:37 +02:00
Michael Friedrich
194c99a86e
Allow to disable brackets for the Url class and Format()
...
This commit also adds unit tests.
refs #5706
2018-04-06 15:22:17 +02:00
Michael Friedrich
2c5e142172
Add ApplicationVersion built-in constant
...
refs #5784
2018-04-06 13:41:22 +02:00
Michael Friedrich
1b31ec8378
Fix verbose errors in config files handler
2018-04-06 12:55:03 +02:00
Michael Friedrich
17846e04d8
Fix verbose error message in modify object handler
2018-04-06 12:52:17 +02:00
Michael Friedrich
6b2decb44b
Fix verbose error handling in variable and template query handlers
2018-04-06 12:50:06 +02:00
Noah Hilverling
24752f3733
Merge pull request #6204 from Icinga/fix/api-create-object-exists-errors
...
API: Check if objects exists and return proper error message
2018-04-06 12:47:31 +02:00
Michael Friedrich
3e83e94c15
Fix object and status query verbose errors
2018-04-06 12:47:20 +02:00
Michael Friedrich
bd7598cb1b
API: Check if objects exists and return proper error message
2018-04-06 12:32:27 +02:00
Michael Friedrich
c4a6ab0211
Add diagnostic_information as verbose error to config object handlers
2018-04-06 12:26:49 +02:00
Jean Flach
6d81c5c34f
Merge pull request #6199 from Icinga/fix/action-http-code
...
Return 500 when no api action is successful
2018-04-06 11:20:43 +02:00
Jean Flach
f133c7914e
Build fix
2018-04-06 10:43:33 +02:00
Michael Friedrich
a00197e919
Refactor actions error messages
2018-04-06 10:30:27 +02:00
Michael Friedrich
4bf731fc16
More config stages refactoring
2018-04-06 10:13:08 +02:00
Noah Hilverling
22c3a7933e
Fix API action status codes
2018-04-06 10:06:15 +02:00
Michael Friedrich
36cdf8a0d2
More refactoring of config packages errors
2018-04-06 09:53:54 +02:00
Michael Friedrich
de2d18d85d
Enhance error handling in type query handler
2018-04-05 17:23:26 +02:00
Michael Friedrich
7f015c0d2f
Enhance error handling in config packages handler
2018-04-05 17:21:14 +02:00
Michael Friedrich
75c5e6f6b0
Enhance error handling in config stages handler
2018-04-05 17:17:30 +02:00
Michael Friedrich
1dd8409691
Check for verbose error handling in SendJsonError()
2018-04-05 17:17:06 +02:00
Jean Flach
9b291be989
Return 500 when no api action is successful
...
fixes #5095
2018-04-05 15:56:06 +02:00
Michael Friedrich
3a8017fd99
Merge pull request #6195 from Icinga/fix/api-console-crash
...
Fix crash in remote api console
2018-04-05 15:34:47 +02:00
Michael Friedrich
8eec0487bb
Merge pull request #6198 from Icinga/deprecate-statusdatawriter
...
Deprecate Statusdatawriter
2018-04-05 15:32:32 +02:00
Michael Friedrich
d398eca581
Merge pull request #6196 from Icinga/fix/influxdb-escaping
...
Fix InfluxDB backslash escaping
2018-04-05 15:27:06 +02:00
Jean Flach
7bdbd2b074
Deprecate Statusdatawriter
...
refs #6033
2018-04-05 09:32:07 +02:00
Noah Hilverling
0e17632bc4
Fix InfluxDB backslash escaping
...
fixes #6182
2018-04-04 13:02:48 +02:00
Jean Flach
69ea2f3a64
Fix crash in remote api console
2018-04-04 12:23:45 +02:00
Michael Friedrich
da9b3991aa
Merge pull request #6163 from Icinga/fix/handle-restart
...
Fix reload handling by updating the PID file before process overtake
2018-04-03 17:18:29 +02:00
Michael Friedrich
ecbbc2fcc5
Merge pull request #6194 from Icinga/feature/metric-unit-elastic-gelf
...
Elasticsearch/GELF: Add metric unit to performance data fields
2018-04-03 17:12:29 +02:00
Michael Friedrich
d384dee204
Merge pull request #6193 from Icinga/fix/gelfwriter-invalid-perfdata-crash
...
GelfWriter: Fix crash on invalid performance data metrics
2018-04-03 14:52:12 +02:00
Michael Friedrich
313f25163b
Elasticsearch/GELF: Add metric unit to performance data fields
...
Seen this inside the InfluxDBWriter code, makes sense to store
this in Elasticsearch too.
2018-04-03 14:49:50 +02:00
Michael Friedrich
6609ec647f
GelfWriter: Fix crash on invalid performance data metrics
...
Spotted while comparing the source code of several performance data
writer.
refs #6191
2018-04-03 14:43:48 +02:00
Michael Friedrich
85eba79f55
Elasticsearch: Fix crash with invalid performance data metrics
...
fixes #6191
2018-04-03 14:38:25 +02:00
Michael Friedrich
b11ab95f41
Fix crash without CORS config settings
...
fixes #6173
refs #6098
2018-03-21 20:42:31 +01:00
Jean Flach
92f7242db1
Merge pull request #6119 from tclh123/dev
...
fixup set rlimit stack failed condition
2018-03-21 09:56:47 +01:00
Michael Friedrich
064fc80cc3
Merge pull request #6098 from Icinga/fix/improve-cors-implementation
...
Clean up CORS implementation
2018-03-19 16:00:36 +01:00
Michael Friedrich
313b2a759e
Merge pull request #6016 from Icinga/fix/state-filters-for-custom-notifications
...
Check notification state filters for problems only, not for Custom, etc.
2018-03-19 15:52:37 +01:00
Jean Flach
a742e64e4d
Fix reload handling
...
Make sure we have written the new PID before letting it take over.
2018-03-14 10:43:59 +01:00
Gunnar Beutner
9b0fccfd80
Merge pull request #6153 from Icinga/fix/api-no-packages
...
Improve error handling for empty packages in /v1/config/packages
2018-03-13 09:23:01 +01:00
Michael Insel
592d1c7d7e
Replace std::vector:push_back with initializer list
...
This replaces a few std::vector::push_back calls with initializer lists.
2018-03-12 20:35:49 +01:00
Michael Friedrich
429f518b49
Improve error handling for empty packages in /v1/config/packages
...
- If there is no package main directory, assume "empty packages".
- Catch exceptions thrown through GlobRecursive() and present a better http 500
to the user.
The packages directory tree is automatically created with the first
package creation, either from the user, or by the `_api` package.
fixes #6129
2018-03-07 13:35:09 +01:00
Gunnar Beutner
9cd5298d8b
Ensure that SetCorked() works properly
2018-03-06 09:03:35 +01:00
Gunnar Beutner
b172a67867
Fix incorrect argument type for JsonRpc::SendMessage
2018-03-06 08:58:19 +01:00
Gunnar Beutner
9b72a6c2f3
Merge pull request #6135 from Icinga/fix/limit-api-package-size
...
Limit JSON RPC message size
2018-03-05 13:24:09 +01:00
Jean Flach
1bdd14b428
Limit anonymous connections to 25
2018-03-05 13:22:43 +01:00
Noah Hilverling
54ff60cd8c
Limit JSON-RPC message size
2018-03-05 10:29:05 +01:00
Noah Hilverling
d0a97ddf64
Add counter for current concurrent checks to Icinga check
...
fixes #4939
2018-03-01 15:01:55 +01:00