Commit Graph

13 Commits

Author SHA1 Message Date
Martin Angers
9755eb2e27
Support async saving of scheduled query statistics (#7012) 2022-08-10 10:01:05 -04:00
Lucas Manuel Rodriguez
de1717291d
Set authz checked when rate limiting device endpoints (#6702)
* Set authz checked when rate limiting device endpoints

* Unexport var and attempt to fix flaky test
2022-07-18 14:22:49 -03:00
Roberto Dip
4a867d53dc
use a single context for background jobs and HTTP handlers (#6313) 2022-06-21 15:09:00 -03:00
Martin Angers
e6b90ca8b9
Support per-task configuration for async host processing configuration (#5700) 2022-05-16 09:44:50 -04:00
Martin Angers
1fa7bb7a19
Support async saving of hosts' last seen time (#5640) 2022-05-10 11:29:17 -04:00
Tomas Touceda
9d572309ae
Add sentry (#3669)
* Add sentry

* Fix gosum

* More gosum fixes

* Add missing def for config

* Enrich sentry scope a bit

* Add changes file

* Add goroutine safe scope to errors

* Encapsulate sentry logic

* Add documentation for new flag

* Add sentry capturing to crons and other background tasks

* Only send to sentry when enabled
2022-01-20 16:41:02 -03:00
Martin Angers
afb3310937
Migrate team-related endpoints to new pattern (#3740) 2022-01-19 10:52:14 -05:00
Martin Angers
f19e676e62
Refactor async host processing to avoid redis SCAN keys (for policies) (#3657) 2022-01-18 09:56:43 -05:00
Martin Angers
1f185a7a8b
Refactor async host processing to avoid redis SCAN keys (for labels only) (#3639) 2022-01-17 14:53:59 -05:00
Martin Angers
69a4985cac
Use new error handling approach in other packages (#2954) 2021-11-22 09:13:26 -05:00
Martin Angers
b57b64ccb2
Add total and per platform counts to host summary endpoint (#2845) 2021-11-09 09:35:36 -05:00
Tomas Touceda
7db6de7278
Serialize hosts writes per instance (#2753)
* Serialize hosts writes per instance

* Write hosts asynchronously

* Dont make the save in a goroutine

* Revert "Dont make the save in a goroutine"

This reverts commit 4a890c5271142755dec69a741582e7eca5c4c62c.

* Make all savehosts async

* Address review comments and make this approach configurable

* Address review comments

* Disable bulk seen time marking for a test

* Move host seen times to a new table

* Remove unused

* Add seen_time to list hosts

* Add some jitter to seen time flushing

* Remove unused

* Add timeout to deferred save host

* Add tests for serialSaveHost

* Update hosts in labels and policy executions in a serial way

* Address review comments and remove fk constraints in host software

* Make errCh buffered

* Add changes file

* Readd key
2021-11-08 11:42:37 -03:00
Martin Angers
a8735d55bb
Implement async processing of hosts for label queries (#2288) 2021-11-01 14:13:16 -04:00