Commit graph

1972 commits

Author SHA1 Message Date
Noah Hilverling
b05a00a8d5 icingaredis.Client: Add StreamLastId() 2021-05-04 11:46:33 +02:00
Noah Hilverling
26c889ad66 types.NotificationTypes: Implement UnmarshalText() 2021-05-04 11:46:33 +02:00
Noah Hilverling
9e3a8b4d1d types.NotificationStates: Implement UnmarshalText() 2021-05-04 11:46:33 +02:00
Noah Hilverling
564d3d594e types.Int: Implement UnmarshalText() 2021-05-04 11:46:33 +02:00
Noah Hilverling
96835ace04 Structify: Allow for string ptr (e.g. NameCi) 2021-05-04 11:46:33 +02:00
Noah Hilverling
094e374070 NameCiMeta: Add missing json tag to NameMeta 2021-05-04 11:46:33 +02:00
Alexander A. Klimov
429ea1ca48 Introduce PackAny() 2021-05-04 11:09:24 +02:00
Eric Lippmann
2f76c95d51 Merge pull request #39 from lippserd/feature/host-service-state
Add Host/ServiceState
2021-05-04 09:59:13 +02:00
Noah Hilverling
3b3c02bc36 Schema (Host-/ServiceState): Add columns id and properties_checksum 2021-05-04 09:55:43 +02:00
Noah Hilverling
7bc8bddc5a Add service state 2021-05-04 09:55:43 +02:00
Noah Hilverling
4dc38c42e7 Add host state 2021-05-04 09:55:43 +02:00
Noah Hilverling
ebf6698540 Add v1.State 2021-05-04 09:55:43 +02:00
Noah Hilverling
0dac6aec10 Add types.AcknowledgementState 2021-05-04 09:25:06 +02:00
Noah Hilverling
39589dcb7d types.StateType: Implement UnmarshalJson() 2021-05-04 09:25:06 +02:00
Eric Lippmann
3af683679b Merge pull request #38 from lippserd/feature/redis-key-prefix
Change redis key prefix to 'icinga:*' instead of 'icinga:config:*'
2021-05-04 09:24:08 +02:00
Noah Hilverling
a0a1eec35f Change redis key prefix to 'icinga:*' instead of 'icinga:config:*' 2021-05-04 09:22:38 +02:00
Eric Lippmann
51b6c49fe5 Merge pull request #32 from lippserd/feature/dump-signals
Read icinga:dump stream and respect dump signals
2021-05-04 09:18:22 +02:00
Julian Brost
a7e5395f66 Read icinga:dump stream and respect dump signals 2021-05-03 11:19:26 +02:00
Eric Lippmann
98527562e9 Merge pull request #41 from lippserd/feature/os-signals
Handle SIGINT/SIGTERM/SIGHUP
2021-04-28 16:55:17 +02:00
Julian Brost
ab24bdd1f7 Main loop: return if ctx has an error
If ctx.Done(), there's no point in looping again.
2021-04-28 16:05:56 +02:00
Julian Brost
d138b8e0ac Handle SIGINT/SIGTERM/SIGHUP
On any of these signals, HA removes the row of the local instance from
icingadb_instance. This allows another instance to take over immediately.
2021-04-28 12:01:02 +02:00
Eric Lippmann
a51ec8a4ac Merge pull request #44 from lippserd/move-factories-away-from-main
Move factories away from main
2021-04-27 23:39:20 +02:00
Eric Lippmann
4fbcd4c90f Move factories away from main and use v1.Factories 2021-04-27 23:36:43 +02:00
Eric Lippmann
3a4c96fa2e Introduce v1.Factories 2021-04-27 23:34:35 +02:00
Eric Lippmann
adcf9a6cfd Add EntityFactoryFunc.WithInit() 2021-04-27 23:33:49 +02:00
Eric Lippmann
8db0ce73b4 Merge pull request #22 from lippserd/bugfix/context-cancel
main(): don't panic on (intentional) context cancel
2021-04-26 14:30:33 +02:00
Alexander A. Klimov
0ec2b6ca60 Return ctx.Err() on ctx.Done() 2021-04-26 14:15:10 +02:00
Alexander A. Klimov
5e473e8b37 main(): don't panic on (intentional) context cancel 2021-04-26 14:15:10 +02:00
Eric Lippmann
40cef17db1 Merge pull request #43 from lippserd/remove-dead-code
Remove dead code
2021-04-23 11:51:12 +02:00
Eric Lippmann
a9c6cdabc9 Remove comment 2021-04-23 11:50:27 +02:00
Eric Lippmann
dfb7ea5dc9 Remove customvar_flat sync draft 2021-04-23 11:34:07 +02:00
Eric Lippmann
cab03bd8f6 Merge pull request #19 from lippserd/bugfix/hmyield
HMYield(): handle missing values
2021-04-22 10:20:21 +02:00
Alexander A. Klimov
3304f0486c HMYield(): handle missing values 2021-04-21 15:26:31 +02:00
Eric Lippmann
fd5589cb02 Merge pull request #35 from lippserd/bugfix/deleted0
Sync#Sync(): don't run no-ops
2021-04-19 22:46:39 +02:00
Alexander A. Klimov
b8d2372899 Sync#Sync(): don't run no-ops 2021-04-19 18:23:18 +02:00
Eric Lippmann
d55d084c12 Merge pull request #33 from lippserd/bugfix/import
Fix missing import
2021-04-19 17:33:36 +02:00
Alexander A. Klimov
4dc935534c Fix missing import 2021-04-19 16:48:02 +02:00
Eric Lippmann
0c8a9139b5 Merge pull request #28 from lippserd/bugfix/delta-race
Delta#start(): avoid a race across maps by using a mutex
2021-04-19 16:20:42 +02:00
Eric Lippmann
3ea98313c3 Merge pull request #17 from lippserd/feature/history-sync
Sync history
2021-04-15 22:23:49 +02:00
Alexander A. Klimov
bf1a77a67c Drop utils.SyncMap*() 2021-04-12 17:41:18 +02:00
Alexander A. Klimov
fac47fb330 Delta: don't over-lock 2021-04-12 17:41:18 +02:00
Alexander A. Klimov
3974a7bd4f Introduce EntitiesById 2021-04-12 17:29:32 +02:00
Alexander A. Klimov
7ccf627df6 Sync history 2021-04-12 13:28:03 +02:00
Alexander A. Klimov
9aa1070db0 Introduce contracts.TableNamer 2021-04-12 13:28:03 +02:00
Alexander A. Klimov
3fbc9fa25f DB#Upsert(): workaround jmoiron/sqlx#694 2021-04-12 13:28:03 +02:00
Alexander A. Klimov
4e87ca6de3 DB#Upsert(): allow to update not all columns 2021-04-12 13:28:03 +02:00
Alexander A. Klimov
ebfabaffc2 Introduce DB#Upsert() 2021-04-12 13:28:03 +02:00
Alexander A. Klimov
500dbac66a Deduplicate DB#Create() and DB#Update() 2021-04-12 13:28:03 +02:00
Alexander A. Klimov
a9a4450068 DB#NamedBulkExec*(): reduce channel requirements 2021-04-12 13:28:03 +02:00
Alexander A. Klimov
df0124de09 DB#NamedBulkExec(): optionally inform about successfully inserted rows 2021-04-12 13:28:03 +02:00