Commit graph

39 commits

Author SHA1 Message Date
Laurence
f04b51ba10
enhance: Move info outside for loop 2025-05-02 14:12:30 +01:00
Laurence
38810df96b
enhance: After a reconnect we always check the containers to attempt to resurrect or else we wait until a event comes in which it may not 2025-05-02 14:09:33 +01:00
Laurence
1081d615ee
enhance: keep trying until we hit max timer 2025-05-02 13:58:53 +01:00
Laurence
f9a4ae3fe1
enhance: mr linter mad 2025-05-02 11:58:22 +01:00
Laurence
45f46c8ed3
enhance: remove max retries seconds as we have a max count instead 2025-05-02 11:34:26 +01:00
Laurence
68882a72ae
enhance: Add a retry loop to reconnect to docker events when docker is down 2025-05-02 11:10:31 +01:00
Laurence
c519833429
enhance: warnf -> warn 2025-04-30 13:03:24 +01:00
Laurence
4b8f2340a6
enhance: add check_interval test and add deprecation warning 2025-04-30 13:02:39 +01:00
Laurence
e1b5337445
enhance: fixes 2025-04-30 12:21:44 +01:00
Laurence
e981128f61
enhance: split code and add events to mock client 2025-04-30 11:43:33 +01:00
Laurence
b2bced8046
enhance: Remove docker acquis internal timer use docker events 2025-04-30 11:04:07 +01:00
mmetc
fe931af5ca
lint: gocritic/captLocal (don't capitalize local variables) (#3402)
* lint: gocritic/captLocal (don't capitalize local variables)

* lint (whitespace)
2025-01-16 14:03:53 +01:00
mmetc
99552f4a53
update dependency on docker (#3175)
* update dependency on docker

since docker doesn't have a go.mod, the opentelemetry dependencies
in go.sum must be updated by hand according to the vendor.mod file
of the related docker release

ex. https://github.com/docker/cli/blob/v27.1.1/vendor.mod
2024-12-18 16:35:00 +01:00
he2ss
19b70f10be
add HTTP datasource (#3294) 2024-11-05 14:15:04 +01:00
mmetc
53f9bc562d
context propagation: OneShotAcquisition(); enable contextcheck linter (#3285)
* context propagation: OneShotAcquisition(); enable contextcheck linter
2024-10-28 15:38:50 +01:00
mmetc
9d6ccb0f08
context propagation: appsec, docker, kafka, k8s datasources (#3284) 2024-10-25 15:43:03 +02:00
mmetc
9976616773
context propagation: StreamingAcquisition() (#3274)
* context propagation: StreamingAcquisition()
* lint
* ship with codecov.yml
2024-10-11 15:59:10 +02:00
mmetc
b93b240bd4
lint: enable (some) gocritic checks (#3238)
* lint: gocritic configuration
* lint: octal literals
* lint: gocritic (filepath.Join)
* ling: gocritic (badRegexp, regexpSimplify)
* lint: gocritic (preferStringWriter)
* lint: gocritic (emtpyStringTest)
* filepath.Clean(a+b) -> filepath.Join(a, b)
* gofumpt
2024-09-17 17:07:30 +02:00
mmetc
136dba61d9
reduce log verbosity, minor CI fixes, lint (#3157)
* pkg/cwhub: redundant log messages

* CI: fixture output and elapsed time

* CI: preload only essential hub items

* report full version (including -rc2 etc.) with cscli hub update --debug

* lint
2024-08-01 10:55:04 +02:00
mmetc
659774fd3d
refactor: prefer logrus.WithField over WithFields with a single param (#3087) 2024-06-20 10:38:23 +02:00
Laurence Jones
9088f31b7d
enhance: container discovery via labels (#2959)
* wip: attempt to autodiscover via labels

* wip: remove labels dep on docker acquistion

* wip: remove labels dep on docker acquistion

* wip: add debug

* wip: try fix parser maps

* wip: remove redundant pointer

* wip: add debug

* wip: cant type assert

* wip: reinstate debug

* wip: reinstate debug

* wip: reinstate debug

* wip: oops

* wip: add a debug

* wip: fix labels

* wip: remove redundant paramter

* wip: rename config option to be more self declarative

* wip: update log wording

* wip: the if check was not correct

* wip: me lost

* fix: add checks to typecast and log useful information

* add tests for parseLabels

* return nil instead of pointer to empty struct

* simplify EvalContainer return value

---------

Co-authored-by: Sebastien Blot <sebastien@crowdsec.net>
2024-05-24 14:27:25 +01:00
Thibault "bui" Koechlin
b1c09f7512
acquisition : take prometheus level into account (#2885)
* properly take into account the aggregation level of prometheus metrics in acquisition
2024-03-13 14:57:19 +01:00
mmetc
c588be0842
golangci-lint: use v1.54, remove unnecessary byte/string conversions (#2438) 2023-08-25 16:22:10 +02:00
mmetc
bd41f855cf
errors.Wrap -> fmt.Errorf (#2317) 2023-06-29 11:34:59 +02:00
blotus
0279e549bd
check if the acquis tomb is dying while processing logs in replay mode for file/s3/docker (#2152) 2023-04-04 13:57:06 +02:00
blotus
61bea26486
Add transform configuration option for acquisition (#2144) 2023-03-29 16:04:17 +02:00
Thibault "bui" Koechlin
618be9ff68
properly update the time structure within event (#2122)
* properly update the time structure within event to ensure it works in time-machine

* move LIVE and TIMEMACHINE to pkg/types : less code needs to import leakybucket package, and we avoid duplicating constants
2023-03-16 16:25:50 +01:00
mmetc
4a6a9c4355
acquisition: validate datasources before configuration (static checks) (#1841)
* acquisition: validate datasources before configuration (allow static configuration checks)

* remove comment

* import reviser, format

* error wrap
2022-11-30 17:36:56 +01:00
Manuel Sabban
83841d801c
fork dlog to ease debian packaging on official repos (#1790)
Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
2022-10-06 13:40:31 +02:00
Laurence Jones
21e5b0d6d0
Improvement: Docker one shot error message (#1666)
* In one shot, user would only specify one container?
2022-09-27 16:20:30 +02:00
mmetc
628d7be1d8
simplify err.Error() to err when used in printf context (#1603) 2022-06-22 15:53:53 +02:00
blotus
0449ec1868
Windows Support (#1159) 2022-05-17 12:14:59 +02:00
blotus
392708a804
Fix docker flaky test (#1494) 2022-04-29 12:16:49 +02:00
Greg Myers
0f4ab71f01
Fix typos in docs, comments, code (#1483) 2022-04-27 11:04:12 +02:00
blotus
8909fbdb22
cleanup container state if the reader tomb dies by itself (#1470) 2022-04-22 10:52:44 +02:00
blotus
9cf2d5ab5c
handle containers with TTY in docker acquis (#1422) 2022-04-05 10:31:36 +02:00
Thibault "bui" Koechlin
cc1ab8c50d
switch to utc time everywhere (#1167)
* switch to utc time everywhere


Co-authored-by: alteredCoder <kevin@crowdsec.net>
2022-01-19 14:56:05 +01:00
blotus
f86ec1c389
Docker api version negotiation (#1135) 2021-12-30 12:21:49 +01:00
AlteredCoder
4917aa23c9
Docker datasource (#1064)
* add docker datasource
2021-12-02 15:55:50 +01:00