Alexander A. Klimov
190e2f8fd9
Icinga DB: introduce icinga:downtime#scheduled_by
2021-06-23 16:49:19 +02:00
Alexander Aleksandrovič Klimov
2cd9c1d902
Merge pull request #8835 from Icinga/bugfix/api-filename-truncation
...
Fix/restrict truncation of filenames for API-created objects
2021-06-23 12:06:31 +02:00
Julian Brost
fbed8a0463
Merge pull request #8768 from Icinga/bugfix/scheduleddowntime-interfer
...
ScheduledDowntime: ignore not related Downtimes while creating Downtimes
2021-06-22 15:48:37 +02:00
Julian Brost
02f761798c
Merge pull request #8825 from Icinga/bugfix/validate-config-package-name
...
ConfigPackageUtility::ValidateName: replace broken regex
2021-06-22 15:45:38 +02:00
Julian Brost
54a7da437d
Merge pull request #8447 from Icinga/feature/deprecated-relative-removal
...
Relativize future removals of deprecated features
2021-06-22 12:05:33 +02:00
Julian Brost
118df982f1
GetObjectConfigPath: only truncate and hash comment and downtime filenames
...
This partially reverts 68a0079c26
and keeps the
fix only for comment and downtime objects for now. For reasoning, please see
the comment in the code.
2021-06-17 16:21:01 +02:00
Julian Brost
e079762c8e
GetObjectPath: ensure use of escaped name in all cases and use TruncateUsingHash()
...
68a0079c26
introduced two problems that are fixed
with this commit:
1. The new truncated/hashed name did not use EscapeName()
2. There was a possible collision of names when creating objects with a full
name of format "[80 characters]...[40 hex digits]" (i.e. the same as the
truncated/hashed variant but short enough that it isn't hashed)
2021-06-17 16:21:01 +02:00
Julian Brost
97d6876803
Utility: add a function to truncate strings while avoiding collisions
2021-06-17 16:21:01 +02:00
Julian Brost
005fac0a23
Merge pull request #8742 from Icinga/bugfix/double-to-string
...
Convert::ToString(double): handle integral values too large for long long correctly
2021-06-15 12:28:15 +02:00
Julian Brost
c40b18ef61
ConfigPackageUtility::ValidateName: replace broken regex
...
The old validation regex matched if the name consists only of invalid
character, not that it does not contain them, i.e. something like "foo/bar" was
considered valid.
This commit replaces the regex with a check that all characters in the name are
allowed characters.
2021-06-15 12:16:54 +02:00
Julian Brost
06999faf25
Allow using E in perfdata both as exponent and unit prefix
2021-06-08 12:37:13 +02:00
Julian Brost
f346a9eea4
Merge pull request #8652 from Icinga/bugfix/l_appversionint-0-8628
...
l_AppVersionInt: respect versions like r2.12.0, not just v2.12.0
2021-06-07 16:07:04 +02:00
Julian Brost
62cbe72cdb
Merge pull request #8492 from Icinga/bugfix/perfdata-scientific-notation
...
Fix perfdata parser not recognize scientific notation
2021-06-07 15:29:52 +02:00
Julian Brost
9f6cbc38f2
Merge pull request #8754 from Icinga/feature/icingadb-replace-lua-with-xadd-maxlen
...
Icinga DB: Use XADD ... MAXLEN 1 instead of a custom Lua script
2021-06-04 13:52:30 +02:00
Alexander Aleksandrovič Klimov
dbcb2549aa
Merge pull request #8708 from Icinga/bugfix/reminder-notification-after-timeperiod-with-interval-0
...
Make sure not to send reminder notification, if problem notification has been suppressed by TimePeriod
2021-05-25 16:09:36 +02:00
Alexander Aleksandrovič Klimov
0156434b2e
Merge pull request #8677 from Icinga/bugfix/mysql-one-transaction-for-programstatus
...
IDO: Use own transaction for program status and make sure InternalNewTransaction() gets executed
2021-05-20 11:49:07 +02:00
Noah Hilverling
8150b0656e
Merge pull request #8764 from Icinga/bugfix/icingadb-change-id-fields-to-match-sql-schema
...
Icinga DB: Change ID fields to match SQL schema
2021-05-20 10:44:55 +02:00
Noah Hilverling
f551e95338
IDO-MySQL: Make sure InternalNewTransaction() and FinishAsyncQueries() get executed during high load
2021-05-19 17:28:11 +02:00
Noah Hilverling
15786baf3d
IDO: Use own transaction for programstatus
2021-05-19 17:26:32 +02:00
Noah Hilverling
898e7fdf35
Icinga DB: Change ID fields to match SQL schema
2021-05-19 17:01:08 +02:00
Alexander A. Klimov
f28b9fb7f3
ScheduledDowntime: ignore not related Downtimes while creating Downtimes
2021-05-19 16:10:57 +02:00
Noah Hilverling
fb89c88ca9
Icinga DB: Replace global keys spacer '_' with ':' to fit new schema
2021-05-18 08:58:52 +02:00
Eric Lippmann
c0cbc4533c
Fix group member keys
2021-05-07 08:41:38 +02:00
Noah Hilverling
4005d81a43
Icinga DB: Sync state using runtime updates
2021-05-07 08:41:38 +02:00
Noah Hilverling
ab04a4ee98
Icinga DB: Sync runtime updates using streams
2021-05-07 08:41:38 +02:00
Julian Brost
a5dc52dea5
IcingaDB: use XADD MAXLEN instead of custom Lua script for heartbeats
...
The existing Lua script adds a new entry to a stream and then deletes all older
entries. The same can be achieved by using `XADD ... MAXLEN 1`.
2021-05-03 17:21:11 +02:00
Julian Brost
9dd210df84
IcingaDB: use XADD MAXLEN instead of custom Lua script for dump signals
...
The existing Lua script adds a new entry to a stream and then deletes all older
entries. The same can be achieved by using `XADD ... MAXLEN 1`.
2021-05-03 17:21:01 +02:00
Noah Hilverling
aca8d063dc
Icinga DB: Change redis key prefix to 'icinga:*'
2021-04-27 21:27:46 +02:00
Eric Lippmann
b08b30ee80
Merge pull request #8684 from Icinga/feature/icingadb-signals-for-all-types
...
IcingaDB: Add dump signals for type dependencies and global keys and change signal pattern
2021-04-27 21:26:52 +02:00
Julian Brost
2d6d87d10f
Convert::ToString(double): handle integral values too large for long long correctly
...
Even if a double represents an integer value, it might not be safe to cast it
to long long as it may overflow the type. Instead just use print the double
value with 0 decimals using std::setprecision.
Before:
<1> => 18446744073709551616.to_string()
"-9223372036854775808"
After:
<1> => 18446744073709551616.to_string()
"18446744073709551616"
2021-04-27 17:31:50 +02:00
Noah Hilverling
60412dd991
Icinga DB: Add dump signals for type dependencies and global keys
2021-04-27 12:32:14 +02:00
Alexander Aleksandrovič Klimov
7f5225ecaa
Merge pull request #8706 from Icinga/bugfix/icingadb-endpoint-zone
...
Icinga DB: dump the correct icinga:config:endpoint#zone_id
2021-04-26 11:31:51 +02:00
Noah Hilverling
08e586fbf0
Notifications: Make sure not to send reminder notification, if problem notification has been suppressed
2021-03-30 15:32:49 +02:00
Alexander Aleksandrovič Klimov
ee705bb110
Merge pull request #8547 from Icinga/bugfix/unable-to-toggle-notifications-from-icingaweb2-8533
...
Fix runtime config updates not working for objects without zone
2021-03-26 17:18:22 +01:00
Alexander Aleksandrovič Klimov
ca9ce92b69
Merge pull request #8698 from Icinga/feature/icingadb-cache-environment-id
...
Icinga DB: cache environment ID instead of recomputing it every time
2021-03-26 17:16:42 +01:00
Alexander Aleksandrovič Klimov
0ee93754ee
Merge pull request #8691 from Icinga/bugfix/retry-rename-on-windows
...
Retry file rename operations on Windows for some errors
2021-03-26 17:16:25 +01:00
Alexander Aleksandrovič Klimov
65a77d4955
Merge pull request #8702 from Icinga/bugfix/missing-iostream-include
...
Add missing #include <iostream>
2021-03-26 17:16:01 +01:00
Alexander A. Klimov
7dcf48f707
Icinga DB: dump the correct icinga:config:endpoint#zone_id
2021-03-26 13:53:31 +01:00
Julian Brost
180132806f
Merge pull request #8696 from Icinga/feature/improve-redisconnection-write-performance
...
RedisConnection::WriteRESP: Use one asio::async_write instead of many
2021-03-26 12:36:44 +01:00
Julian Brost
8813b74c9f
Merge pull request #8693 from Icinga/bugfix/stringbuilder-malloc
...
PackObject(): avoid one malloc()
2021-03-25 18:02:12 +01:00
Julian Brost
b34818d3fc
Add missing #include <iostream>
...
Fixes the following build error:
/home/jbrost/dev/icinga2/lib/base/stdiostream.cpp: In member function ‘virtual size_t icinga::StdioStream::Read(void*, size_t, bool)’:
/home/jbrost/dev/icinga2/lib/base/stdiostream.cpp:28:15: error: invalid use of incomplete type ‘std::iostream’ {aka ‘class std::basic_iostream<char>’}
28 | m_InnerStream->read(static_cast<char *>(buffer), size);
| ^~
2021-03-25 11:30:02 +01:00
Noah Hilverling
5c8b32618c
RedisConnection::WriteRESP: Use one asio::async_write instead of many
2021-03-24 13:14:01 +01:00
Alexander A. Klimov
9531de3835
JsonEncode(): serialize integers w/o trailing .0
...
... so Icinga DB can parse them as integers.
2021-03-23 17:52:37 +01:00
Julian Brost
41f7124692
Icinga DB: cache environment ID instead of recomputing it every time
2021-03-23 17:09:32 +01:00
Alexander A. Klimov
070b4f9d06
Drop StringBuilder
2021-03-23 13:13:47 +01:00
Alexander A. Klimov
f89f35c798
PackObject(): avoid one malloc()
...
... for performance reasons.
2021-03-23 13:13:47 +01:00
Julian Brost
05c8e7f36f
Retry file rename operations on Windows for some errors
2021-03-23 09:54:01 +01:00
Alexander Aleksandrovič Klimov
9830dc194b
Merge pull request #8688 from Icinga/feature/sha1-without-sprintf
...
Speed up SHA1 function by removing calls to sprintf
2021-03-22 18:46:08 +01:00
Alexander Aleksandrovič Klimov
1c0ce89cb3
Merge pull request #8681 from Icinga/bugfix/problem-notification-at-downtime-end
...
Send problem notifications after downtime end for checkables in child zones
2021-03-22 17:56:25 +01:00
Julian Brost
2a2229a49b
Don't use sprintf for SHA1 to hex conversion
2021-03-19 10:31:01 +01:00