Michael Friedrich
87248f703c
Merge pull request #7632 from Icinga/feature/dsl-get-templates
...
DSL: Add get_template{,s}
2019-11-15 14:42:48 +01:00
Alexander A. Klimov
5c347ef7bd
DSL: introduce x?y:z
2019-11-15 13:38:01 +01:00
Michael Friedrich
b3eb9c6a07
Merge pull request #7439 from Icinga/feature/timeperiod-seconds
...
LegacyTimePeriod: support specifying seconds
2019-11-15 13:02:05 +01:00
Michael Friedrich
b1787883f7
Merge pull request #7535 from tigercomputing/Icinga/feature/config-stage-activate-parameter
...
API /v1/config/stages 'activate' parameter
2019-11-15 12:58:03 +01:00
Michael Friedrich
38080405df
Merge pull request #7528 from Icinga/bugfix/api-put-error-handling
...
API: Handle permission exceptions soon enough, returning 404
2019-11-15 11:53:59 +01:00
Noah Hilverling
b6db34747a
IcingaDB: Remove redundant last_{hard/soft}_state
2019-11-14 10:57:11 +01:00
Noah Hilverling
fa892b613d
Merge pull request #7608 from Icinga/bugfix/icinga-history-stream-downtime
...
IcingaDB: avoid duplicates in icinga:history:stream:downtime
2019-11-12 11:40:45 +01:00
Noah Hilverling
4ea236aa64
IcingaDB: Fix state on unchecked objects
2019-11-11 15:28:16 +01:00
Michael Friedrich
1cda421bad
DSL: Add get_template{,s}
...
Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2019-11-08 11:13:26 +01:00
Alexander A. Klimov
1e2739aed6
IcingaDB::NotificationSentToAllUsersHandler(): copy set once, not N*(1+M) times
2019-11-07 17:23:48 +01:00
Noah Hilverling
42f959874e
IcingaDB: Add user notification history
2019-11-07 15:57:31 +01:00
Alexander A. Klimov
592872a6c3
IcingaDB: avoid duplicates in icinga:history:stream:downtime
2019-11-06 10:41:54 +01:00
Alexander A. Klimov
4e8584ee9e
IcingaDB: correct icinga:history:stream:state#{,last_}soft_state and icinga:history:stream:notification#state for hosts
2019-11-04 16:40:04 +01:00
Alexander A. Klimov
6c7a9eb651
IcingaDB#SendStatusUpdate(): add icinga:history:stream:state#previous_soft_state
2019-11-04 12:59:57 +01:00
Michael Friedrich
9d9804d50a
Styleguide for IcingaDB
2019-11-02 18:01:31 +01:00
Michael Friedrich
631a4ee9fa
Fix header guards
2019-11-02 17:24:34 +01:00
Michael Friedrich
904f2ce7d4
IcingaDB: Silence some developer logging
2019-11-02 15:47:51 +01:00
Michael Friedrich
36d18ed23a
IcingaDB: Log where we are connecting to
2019-11-02 15:47:46 +01:00
Michael Friedrich
9235246985
Fix rebase against master branch
2019-11-02 14:18:20 +01:00
Michael Friedrich
61d9130dd0
Fix Copyright headers
2019-11-02 14:00:24 +01:00
Michael Friedrich
f9b3e88bbb
Fix non-unity builds
2019-11-02 14:00:24 +01:00
Noah Hilverling
b65e5f5547
IcingaDB/Comment: Add is_sticky
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
071a1489aa
PUBLISH to icinga:stats with high priority
...
refs #57
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
67909210a6
RedisConnection: introduce high-priority queue
...
refs #57
2019-11-02 14:00:24 +01:00
Noah Hilverling
91ecfc35cf
Ensure that execution_time never goes below 0
2019-11-02 14:00:24 +01:00
Noah Hilverling
4e43c766ca
Improve CommentHistory
2019-11-02 14:00:24 +01:00
Noah Hilverling
6a7e83a5e6
Improve Downtime & DowntimeHistory
2019-11-02 14:00:24 +01:00
Noah Hilverling
0aa885573d
Fix notification history not setting text if notification is triggered by checkresult
2019-11-02 14:00:24 +01:00
Noah Hilverling
4a43dd1ce6
Rename event_type state to state_change
2019-11-02 14:00:24 +01:00
Noah Hilverling
5eb1c42a28
History: Use same names for event_time and event_type
2019-11-02 14:00:24 +01:00
Alexander Aleksandrovič Klimov
04dfbb07ce
Rename ICINGA2_WITH_REDIS to ICINGA2_WITH_ICINGADB
2019-11-02 14:00:24 +01:00
Alexander Aleksandrovič Klimov
13ab7eb609
Rename redis to icingadb
2019-11-02 14:00:24 +01:00
Alexander Aleksandrovič Klimov
f51454af65
git ls-files -z |xargs -0 perl -pi -e 's/RedisWriter/IcingaDB/g'
2019-11-02 14:00:24 +01:00
Alexander Aleksandrovič Klimov
c7e9997294
RedisWriter#SerializeState(): don't stringify previous_hard_state
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
617a4a2e92
RedisWriter: drop icinga:history:stream:notification#{,long_}output and add #{author,text}
2019-11-02 14:00:24 +01:00
Alexander Aleksandrovič Klimov
badcb5662c
RedisWriter: add icinga:state:stream:*#previous_hard_state
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
746a48e2ca
RedisWriter: add icinga:history:stream:{state,notification}#previous_hard_state
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
4a7a8cb6f8
RedisWriter: add icinga:history:stream:*#endpoint_id
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
8613365f1c
RedisWriter: add icinga:{state:stream:*,history:stream:*:state}#check_source
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
f314489d23
Merge host and service histories
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
e6043e908a
RedisWriter: adjust icinga:history:stream:*:flapping schema
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
0510e0cad0
Replace duration with flexible_duration
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
c89f354a84
Replace is_fixed with is_flexible
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
9d0e402d92
RedisWriter#SendStartedDowntime(): send also a config update
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
747521fa84
RedisWriter#SendStatusUpdate(): handle pending checkable
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
82898b31ae
RedisWriter: fix missing m_Rcon!=null checks
2019-11-02 14:00:24 +01:00
Noah Hilverling
52fb723d91
RedisWriter: Do not split up comments/downtimes into host/service keys
2019-11-02 14:00:24 +01:00
Noah Hilverling
846f327054
RedisWriter: Use TimestampToMilliseconds() instead of multiplying inline
2019-11-02 14:00:24 +01:00
Noah Hilverling
042ed8b9e9
RedisWriter: Add downtime schedule history event
2019-11-02 14:00:24 +01:00
Noah Hilverling
6f0822cbe8
RedisWriter: Use ms instead of seconds for timestamps
2019-11-02 14:00:24 +01:00
Noah Hilverling
5edf3623c5
RedisWriter-History: Add event_id and event_type to history entries
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
fb6d31fcde
RedisWriter: populate icinga:history:stream:*:flapping
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
81873248e1
RedisWriter: populate icinga:history:stream:*:comment
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
6c536c97e8
RedisWriter: populate icinga:history:stream:*:downtime
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
feeae9d518
RedisWriter: populate icinga:history:stream:*:state
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
d0165773d2
RedisWriter: populate icinga:history:stream:*:notification
2019-11-02 14:00:24 +01:00
Noah Hilverling
33bdc8b5c3
RedisWriter: Rename check_period to check_timeperiod
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
21a900cd9d
RedisWriter#SerializeState(): serialize also Checkable#next_update
...
refs #54
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
9a3ab8c547
Adjust IoEngine usage
2019-11-02 14:00:24 +01:00
Noah Hilverling
9f077e8216
RedisWriter: Streamline JSON key names
2019-11-02 14:00:24 +01:00
Noah Hilverling
1566c4f9ac
Fix runtime update of state not being published
2019-11-02 14:00:24 +01:00
Noah Hilverling
07515d4446
Fix RedisWriter not clearing "icinga:config:state:*" keys on initial dump
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
b0cd306b61
RedisWriter#InsertObjectDependencies(): PUBLISH icinga:config:update ... for all dependencies
2019-11-02 14:00:24 +01:00
Noah Hilverling
322f3fbb0d
RedisWriter: Fix state sync prefix
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
fe49141490
RedisWriter#SendStatusUpdate(): ensure valid UTF-8 output
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
d9ff921934
RedisWriter: publish the current config dump state via icinga:dump
...
refs #53
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
1d3109458d
RedisConnection: merge write queues
...
refs #50
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
3b61b3d37a
RedisConnection: log messages
...
refs #50
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
430c769371
RedisConnection: handle errors as expected
...
refs #50
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
06d88477bd
RedisConnection: forward I/O errors to async-ly waiting requestors
...
refs #50
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
fa5c9ac985
RedisConnection: don't read the response before the request has been written
...
refs #50
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
132b2dcb77
Get rid of hiredis
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
a5971df039
RedisConnection: I/O the Redis protocol by itself (PoC)
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
752c5998df
Prefer vector#emplace_back over #push_back
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
e60ca9bca9
RedisWriter#InsertObjectDependencies(): don't change config objects' attributes in-place
...
refs #52
2019-11-02 14:00:24 +01:00
Noah Hilverling
d5d3f3e60c
Remove unused function CollectScalarVars()
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
53d04cc4e8
RedisWriter#RedisGet(): std::move() query
...
refs #49
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
fb98d3edef
RedisConnection#ExecuteQuer{y,ies}(): std::move() queries
...
refs #49
2019-11-02 14:00:24 +01:00
Alexander A. Klimov
bb333b535b
RedisConnection#ExecuteQueries(): fire all queries at once
...
refs #49
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
74eccf60f2
Fix memory leak
2019-11-02 14:00:23 +01:00
Noah Hilverling
11d5415193
RedisWriter: Add depth attribute to zone
2019-11-02 14:00:23 +01:00
Noah Hilverling
8421a98a2c
Fix command arguments and envvars
2019-11-02 14:00:23 +01:00
Noah Hilverling
9308acfcd5
RedisWriter: Json encode command field command
2019-11-02 14:00:23 +01:00
Noah Hilverling
e41bcbc81c
Do not store timeperiod range in separate key (timerange)
2019-11-02 14:00:23 +01:00
Noah Hilverling
74b6839704
Add JsonEncode to customvar value
2019-11-02 14:00:23 +01:00
Noah Hilverling
fc718d99a7
Rename :overwrite: keys to :override:
2019-11-02 14:00:23 +01:00
Noah Hilverling
0bfdaccc7a
Split up redis arrays into single entries
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
6fd6f74b0f
Fix missing ( )
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
07823c4b90
RedisWriter#CreateConfigUpdate(): don't require prepared commands
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
1d126b66e9
RedisWriter#InsertObjectDependencies(): reduce memory allocations
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
def3c7df32
RedisWriter#CreateConfigUpdate(): reduce memory allocations
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
c24092a64e
RedisWriter#GenerateHmsetStatements(): reduce memory allocations
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
23448b0322
Make RedisWriter#ChunkObjects()'s result type more explicit
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
0534141aaf
Remove redundand vector#reserve()
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
7d0fc91c1b
RedisWriter#GetTypeObjectKeys(): move() the result
2019-11-02 14:00:23 +01:00
Noah Hilverling
13295acb72
RedisWriter: Write objects of same type in parallel
2019-11-02 14:00:23 +01:00
Noah Hilverling
68c88b3edf
Implement new Redis schema
...
WIP
WIP
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
1dcec6e77a
RedisConnection#SendMessageInternal(): lock only while actually using shared objects
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
50594ec1c8
Replace std::bind() with lambdas
...
refs #48
2019-11-02 14:00:23 +01:00
Noah Hilverling
a6ec60a992
RedisWriter: Use IcingaApplication environment
2019-11-02 14:00:23 +01:00
Noah Hilverling
c5b0884e44
RedisWriter: Heartbeat should occur every second
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
f601ba51e0
Revert "Eventqueue: Remove unused code"
...
This reverts commit a7873da89d
.
2019-11-02 14:00:23 +01:00
Jean Flach
23099904c0
Publish when config_dump_in progress
2019-11-02 14:00:23 +01:00
Jean Flach
7890c37357
Revert "Merge branch 'bugfix/execute-quieries' into 'feature/redis'"
...
This reverts commit f6c1fc3b43b1895eb87c1657f3e3355bfe9ddaac, reversing
changes made to ad1d448bcdead76a2bd45171a6efcd700b1c23d0.
2019-11-02 14:00:23 +01:00
Jean Flach
0ad008f465
Handle transaction vectors better
2019-11-02 14:00:23 +01:00
Jean Flach
b95e39952e
Use transaction for config dump
...
This wraps the config dump HMSETs into a transaction.
2019-11-02 14:00:23 +01:00
Jean Flach
d2dc0047a3
Lock before queueing multiple queries
2019-11-02 14:00:23 +01:00
Jean Flach
03a61347cd
Fix Service's name
2019-11-02 14:00:23 +01:00
Jean Flach
037357aea5
Add severity
2019-11-02 14:00:23 +01:00
Jean Flach
57b9fc94c3
Remove is_active_check
2019-11-02 14:00:23 +01:00
Jean Flach
6705158d31
Remove unused variable
2019-11-02 14:00:23 +01:00
Jean Flach
accadb5dfb
Only dump relevant object types
2019-11-02 14:00:23 +01:00
Jean Flach
dc5dc46364
Use ReflectionType instead of dynamic casts
2019-11-02 14:00:23 +01:00
Jean Flach
5cfd3c1ab0
Rewrite config dump
2019-11-02 14:00:23 +01:00
Jean Flach
e90fb43b91
Fix empty perf data strings
2019-11-02 14:00:23 +01:00
Jean Flach
446796dadb
Fix output and longOutput
2019-11-02 14:00:23 +01:00
Jean Flach
50aa0eb1d3
Fix command line string
2019-11-02 14:00:23 +01:00
Jean Flach
553f6f6ba9
Change commandline and performancedata
2019-11-02 14:00:23 +01:00
Noah Hilverling
3439ea755f
Fix that state does not get synced on acknowledgement removal
2019-11-02 14:00:23 +01:00
Noah Hilverling
992727707d
Redis: Encode check command
2019-11-02 14:00:23 +01:00
Jean Flach
08bfbbc070
Encode perfdata
2019-11-02 14:00:23 +01:00
Jean Flach
933de15c36
Remove TODO
2019-11-02 14:00:23 +01:00
Noah Hilverling
3fb3e8bb6d
Remove dev debug log
2019-11-02 14:00:23 +01:00
Noah Hilverling
2202bde56c
Add downtime handlers to state sync
2019-11-02 14:00:23 +01:00
Jean Flach
af05a354fa
Stop json-encoding everything
2019-11-02 14:00:23 +01:00
Jean Flach
d104eb4ac1
Fix timeout
2019-11-02 14:00:23 +01:00
Jean Flach
6ce4612cd7
Export last hard/soft state dummies
2019-11-02 14:00:23 +01:00
Jean Flach
e2caa47f18
Fix is_handled
2019-11-02 14:00:23 +01:00
Noah Hilverling
328adf1fc4
Add host/service state sync to acknowledgement
2019-11-02 14:00:23 +01:00
Jean Flach
916bfd20fb
Update state sync
2019-11-02 14:00:23 +01:00
Noah Hilverling
9aec47efb3
Use OnStateChange instead of OnStateChanged
2019-11-02 14:00:23 +01:00
Jean Flach
02ecc3e445
Add additional fields
2019-11-02 14:00:23 +01:00
Jean Flach
a7e615fbc0
Fix one unchecked checkresult access
2019-11-02 14:00:23 +01:00
Jean Flach
9b9cf6d5b0
Update sate sync
...
fix a crash, possibly two
2019-11-02 14:00:23 +01:00
Jean Flach
d8737b238a
Update state sync
2019-11-02 14:00:23 +01:00
Jean Flach
223ca6c6a0
Clean up code
2019-11-02 14:00:23 +01:00
Jean Flach
f68ad634b2
Rename state stream keys
2019-11-02 14:00:23 +01:00
Jean Flach
3def496b62
Update state sync
...
Makes state serialization its own function to be used also when writing
out the initial state
2019-11-02 14:00:23 +01:00
Jean Flach
fcb3752973
Remove debug log message
2019-11-02 14:00:23 +01:00
Jean Flach
3da4cef1e6
Update state sync
2019-11-02 14:00:23 +01:00
Jean Flach
2215e9e16f
Implement minimal state sync
2019-11-02 14:00:23 +01:00
Jean Flach
c825a3f4b5
Remove unnecessary parameter
2019-11-02 14:00:23 +01:00
Jean Flach
5f64d809d7
Check if RedisConnection exists before checking connection
2019-11-02 14:00:23 +01:00
Jean Flach
a056e14834
Fix another RedisWriter crash
...
Same as the other fix, this makes us lose events
2019-11-02 14:00:23 +01:00
Jean Flach
eec1928a0b
Fix segfault on startup
2019-11-02 14:00:23 +01:00
Jean Flach
67208c4f07
Handle runtime config updates
...
fixes #37
2019-11-02 14:00:23 +01:00
Noah Hilverling
f4145579ca
Add missing include
2019-11-02 14:00:23 +01:00
Jean Flach
47905a25e8
Improve event payload
...
Adds host/service_id Acknowledgement events. AcknowledgementSet events also send the comment_id.
fixes #29
2019-11-02 14:00:23 +01:00
Jean Flach
e889de966e
Publish dump event
...
fixes #34
2019-11-02 14:00:23 +01:00
Jean Flach
5e3e114a16
Handle icingadb- / icinga-type mismatches
...
fixes servicedowntimes being written to hostdowntimes (and vice versa)
2019-11-02 14:00:23 +01:00
Jean Flach
3c651b4c99
Fix icingadb specific type names
2019-11-02 14:00:23 +01:00
Jean Flach
77ce8f67bd
Add downtimes sync
2019-11-02 14:00:23 +01:00
Jean Flach
36588ce31a
Code formatting
2019-11-02 14:00:23 +01:00
Jean Flach
1d21626b30
Code style
2019-11-02 14:00:23 +01:00
Jean Flach
0634e27d6d
Add new connection handling
2019-11-02 14:00:23 +01:00
Jean Flach
f89e649871
Add recursive callback to manage auth and db select
2019-11-02 14:00:23 +01:00
Jean Flach
b59189b8d3
Simplify vector usage
...
Also leak less memory ;)
2019-11-02 14:00:23 +01:00
Jean Flach
6aaa35a0a6
Rewrite the RedisWriter
...
There should be more atomic commits but the whole thing was a mess. This
commit changes the synchrounous Redis connection into an asynchronous
one in its own class RedisConnection.
The RedisConnection uses a Workqueue with commands to fire against the
Redis server. When a response is required a callback must be supplied,
refer to RedisWriter::RedisGet().
Known Issues:
- Authentication has no error handling and can break the connection
- Error handling in general is iffy due to the nature of the async redis
connection
- Getting a reply out of RedisConnection is not trivial
- HandleRW... sunt dracones
2019-11-02 14:00:23 +01:00
Jean Flach
64515b81e3
Add disconnect
2019-11-02 14:00:23 +01:00
Jean Flach
d96dcf869e
Add RedisConnection object
...
This works using an async Redis connection. Multiple connections are not
possible. The connection is fed from a workqueue filled with
RedisCommands in the way of a vector of strings.
2019-11-02 14:00:23 +01:00
Jean Flach
0456298c58
Reformat code
...
CLion is now pretty close at what we use with Icinga, other changes do
make sense to me.
2019-11-02 14:00:23 +01:00
Jean Flach
8f411c7475
Support comments for icingadb
...
This splits comments into Host and Service comments
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
ed3db5b491
Fix elephant oversight
2019-11-02 14:00:23 +01:00
Jean Flach
315e9ffad8
Stringify flat values
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
d0a45521a9
Unify schema structure
...
refs #15
2019-11-02 14:00:23 +01:00
Jean Flach
c4962559ff
Remove parent_checksum
...
parent_checksum is always the first element in all_parents_checksums
2019-11-02 14:00:23 +01:00
Jean Flach
a47e16fb5b
Rename command_checksums
2019-11-02 14:00:23 +01:00
Jean Flach
65c38a3958
ignore user/usergroup for property checksum
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
3a8cf8d74d
RedisWriter: dump missing checksums for notifications
...
refs #18
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
4d40293217
RedisWriter: dump all_parents_checksum and all_parents_checksums for zones
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
cd05240624
RedisWriter: dump period_checksum for users
2019-11-02 14:00:23 +01:00
Michael Friedrich
de99d68351
Only use the type for commands in the object identifier checksum
2019-11-02 14:00:23 +01:00
Jean Flach
c70316a835
Sync ranges_checksum for timeperiods
...
Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
3e0a2f59e2
RedisWriter: make config object identifiers type-aware
...
SHA1(PackObject([Environment, Type, __name]))
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
b04b1d954e
RedisWriter: compute checksums of command arguments and env vars
...
refs #14
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
a908f84750
Revert unneccessary dynamic_pointer_cast
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
1b81b85582
RedisWriter: dump zone_checksum for endpoints
...
refs #11
2019-11-02 14:00:23 +01:00
Michael Friedrich
d65fb529eb
Simplify host_checksum
2019-11-02 14:00:23 +01:00
Jean Flach
d09a435fe3
Export usergroup(s)_checksum(s)
...
Warning: ugly code
2019-11-02 14:00:23 +01:00
Michael Friedrich
876d98a13f
Add 'parent_checksum' for zone objects
2019-11-02 14:00:23 +01:00
Michael Friedrich
bb2e7854fd
Add command_endpoint, event/check_command, action/notes_url, icon_image checksums for host/service objects
2019-11-02 14:00:23 +01:00
Michael Friedrich
4fb73a44bd
Add 'host_checksum' for services
2019-11-02 14:00:23 +01:00
Michael Friedrich
48f1ce215b
Drop obsolete delete query on config dump
2019-11-02 14:00:23 +01:00
Michael Friedrich
e31679b2de
Update Redis prefix namespaces and move their declaration into the class
...
icinga:config:object:<type>:<sha1>
icinga:config:checksum:<type> <sha1>
icinga:config:customvar:<type> <sha1>
icinga:status:object:<type>:<sha1>
This avoids multiple definitions all over the code. Maybe we want
to make the schema configurable at some point.
2019-11-02 14:00:23 +01:00
Michael Friedrich
3ce8f5599e
Fix missing object locks
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
413e351805
RedisWriter: dump custom vars verbosely
2019-11-02 14:00:23 +01:00
Michael Friedrich
e4355f27c9
Send zone_checksum globally, if 'zone' attribute is set
2019-11-02 14:00:23 +01:00
Jean Flach
a4b0f9125e
Only sync zone_checksum when object in zone
2019-11-02 14:00:23 +01:00
Jean Flach
85f621cb90
Add zone checksum for redis to checkables
2019-11-02 14:00:23 +01:00
Michael Friedrich
c5e913dfd4
Fix error handling for GetSubscriptionTypes()
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
50d83e850f
RedisWriter: dump endpoints' zones' identifiers (zone_checksum)
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
550e385b9e
RedisWriter: fix checksums of disappeared config objects not being deleted
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
d15769fa34
RedisWriter: fix disappeared config objects not being deleted
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
e7411ea158
RedisWriter#UpdateAllConfigObjects(): use one transaction per config object type
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
1ad9c80143
RedisWriter: sync all config objects atomically
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
c92827fa5e
RedisWriter: dump monitored objects' groups' identifiers (group_checksums)
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
724ce1f172
RedisWriter: dump also environment_checksum (per config object)
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
4eee9572ab
RedisWriter: identify config objects by SHA1(PackObject([Environment, __name]))
2019-11-02 14:00:23 +01:00
Michael Friedrich
fae5b88e48
Add all stats similar to /v1/status
2019-11-02 14:00:23 +01:00
Michael Friedrich
d7f6d7994b
Move stats into a separate file
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
3229982bee
RedisWriter: compute name_checksum as expected
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
f05a5eecc2
Centralize identifier computation
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
a5aef627f8
RedisWriter: use __name as object key
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
3ea3b2ba27
RedisWriter: checksum package, source_location and templates separately in metadata_checksum
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
e980485e23
RedisWriter: Explicitly checksum Zone#endpoints
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
dcdf6b8a44
RedisWriter: Exclude explicitly checksummed properties from properties_checksum
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
dc73db01b8
RedisWriter: use one checksum algo for everything
2019-11-02 14:00:23 +01:00
Alexander A. Klimov
b32b81d957
RedisWriter: Pack objects consistently for hashing
2019-11-02 14:00:23 +01:00
Michael Friedrich
60a5a14aa2
Checksums
2019-11-02 14:00:23 +01:00
Michael Friedrich
79f06a90d4
WIP
2019-11-02 14:00:23 +01:00
Michael Friedrich
782486ce9c
Ensure that arrays are sorted for checksum calculation
2019-11-02 14:00:23 +01:00
Michael Friedrich
26a2095426
Implement config object check sums, shot one
2019-11-02 14:00:23 +01:00
Michael Friedrich
8c38c7eddc
Ensure that type names are lower cases for Redis lookups
2019-11-02 14:00:23 +01:00
Michael Friedrich
33a00e4b5a
Move UpdateObjectAttrs into the objects scope
2019-11-02 14:00:23 +01:00
Michael Friedrich
f715d479e7
Rename source file
2019-11-02 14:00:23 +01:00
Michael Friedrich
ddf2aea065
Compile redis into the icinga2 binary; apply more C++11 code changes
2019-11-02 14:00:23 +01:00
Michael Friedrich
61edfcb68d
Apply code style
2019-11-02 14:00:23 +01:00
Jean Flach
5eab856673
Publish events to one enpoint
2019-11-02 14:00:23 +01:00
Jean Flach
c8561676ec
Add limit for subscriptions
2019-11-02 14:00:23 +01:00
Gunnar Beutner
f631bf8cb5
Use sets for subscriptions
...
refs #5656
2019-11-02 14:00:23 +01:00
Gunnar Beutner
06211c3ac7
Implement support for the new config/state schema
...
fixes #5671
2019-11-02 14:00:23 +01:00
Gunnar Beutner
1725038ca8
Implement pipelining support for Redis queries
...
fixes #5670
2019-11-02 14:00:23 +01:00
Jean Flach
7c8412928e
Subscriptions
...
fixes #5656
2019-11-02 14:00:23 +01:00
Jean Flach
1ada53dd57
Trim event queue
...
TODO: make configurable
refs #5119
2019-11-02 14:00:23 +01:00
Gunnar Beutner
b6c86f98ec
Clean up the code a bit
2019-11-02 14:00:23 +01:00
Gunnar Beutner
fff1049ba0
Ensure that the WorkQueue name is set
2019-11-02 14:00:23 +01:00
Gunnar Beutner
b75e21a998
Redis support (WIP)
2019-11-02 14:00:23 +01:00
Michael Friedrich
7e369c0443
Merge pull request #7546 from Icinga/feature/zone-in-zone-7530
...
DaemonUtility#ValidateConfigFiles(): re-try unknown zones once they may have become known
2019-10-31 16:34:08 +01:00
Alexander Aleksandrovič Klimov
3804f4edcc
I like to move it, move it
2019-10-28 13:46:33 +01:00
Ant1x
166e79fee1
Added OpenTSDB Metric prefix naming support
...
Added OpenTSDB Generic Metric functionality
2019-10-24 00:04:12 +11:00
Ant1x
0b8fdfd7f2
Removed dictionary cloning behaviour.
...
Added configuration caching on instantiation.
2019-10-24 00:04:12 +11:00
Ant1x
c2c4b97ea5
Adjusted explicit String cast
2019-10-24 00:04:12 +11:00
Ant1x
619a487733
Added validation function comments
2019-10-24 00:04:12 +11:00
Ant1x
90c42e1bbc
Re-worded debug log message
2019-10-24 00:04:12 +11:00
Ant1x
3cd6b66cd4
Initial commit, add custom tag functionality
2019-10-24 00:04:12 +11:00
Michael Friedrich
e0ef5fe9de
Merge pull request #7458 from Icinga/feature/config-parser-cleanup
...
Config parser: introduce optional_newlines
2019-10-22 17:29:59 +02:00
Michael Friedrich
3b49c10d0a
Merge pull request #7584 from Icinga/bugfix/cluster-sync-checksums-timestamps
...
Cluster Config Sync: Check the timestamp prior to config file checksums for changes
2019-10-22 17:22:27 +02:00
Michael Friedrich
6103f53c5b
Merge pull request #7541 from Icinga/bugfix/heredoc-eof
...
Config lexer: complain on EOF in heredocs, i.e. {{{abc<EOF>
2019-10-22 17:19:27 +02:00
Michael Friedrich
cb20b4829a
Cluster Config Sync: Check the timestamp prior to config file checksums
...
Otherwise old configuration received from a secondary master/satellite
could always trigger a config change & reload.
2019-10-22 14:07:10 +02:00
Alexander A. Klimov
768044a754
Replace std::shared_ptr<NamespaceValue> with NamespaceValue::Ptr
...
refs #7361
2019-10-21 17:10:51 +02:00
Alexander A. Klimov
aa4cad7482
Replace std::shared_ptr<Expression> with Expression::Ptr
...
refs #7361
2019-10-21 17:10:51 +02:00
Alexander A. Klimov
4438ccbf9e
Introduce SharedObject
...
refs #7361
2019-10-21 17:10:51 +02:00
Alexander A. Klimov
ba1ce9c853
Replace std::shared_ptr<boost::asio::ssl::context> with Shared<boost::asio::ssl::context>::Ptr
2019-10-21 16:12:46 +02:00
Alexander A. Klimov
a1fef92835
Replace std::shared_ptr<boost::asio::ip::tcp::acceptor> with Shared<boost::asio::ip::tcp::acceptor>::Ptr
2019-10-21 16:12:46 +02:00
Alexander A. Klimov
26ce2cfb73
Replace std::shared_ptr<AsioTcpStream> with Shared<AsioTcpStream>::Ptr
2019-10-21 16:12:46 +02:00
Alexander A. Klimov
a1683568a1
Replace std::shared_ptr<AsioTlsStream> with Shared<AsioTlsStream>::Ptr
2019-10-21 16:12:35 +02:00
Alexander A. Klimov
b046ffe152
Introduce Shared<T>
2019-10-21 11:07:42 +02:00
Michael Friedrich
3e6fc9bfa1
Merge pull request #7457 from Icinga/feature/config-parser-malloc
...
Config parser: save some memory allocations
2019-10-17 17:19:30 +02:00
Alexander A. Klimov
e4bdcedbca
MacroProcessor::ResolveArguments(): skip null argument values
...
refs #7558
2019-10-08 17:06:06 +02:00
Michael Friedrich
e7c07062f8
Avoid syncing .authorititative marker received from < 2.11 parent nodes
2019-10-02 10:49:02 +02:00