Mathieu Lecarme
066d2a1dc5
Forever loop over loki websocket can be stopped.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
ae718e0557
Fix: unreachable return
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
1d7bce7064
Fix: path can be / or empty
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
e57150ae1d
Fix: New request error handling.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
24f67c0fe5
Default config mode is tail.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
0dad75b91b
Better wait. Defer Close.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
195adbadeb
Wait for ready is a parameter.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
4f1aae754f
Explicit loki error.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
d7a1c6a938
Paginate Loki query.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
a81d52a1ff
FeedLoki routine.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
6bf80ee083
OneShot has its test
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
ea860b1087
Play this test.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
d8d63a2bf8
Fix: parse JSON loki response.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
bf138b9231
Loky query is mandatory
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
48431f20ed
Specific time.Time type for YAML parsing.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
5edcdb6b57
Date or Duration diff
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
c11cbccb2d
More interface implementation
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
17224b8ac0
Fix: unsanitized user input
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
856da41b72
Authorization
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
94d0f55738
Bring your own headers.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
d99feefe2a
Tenant ID.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
c2b3d752a2
DSN.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
c46fb2be6c
OK, it's this test logs, not an old run.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
4570046da6
Simpler JSON.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
6c213828a4
Read loop.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
92e3ea565b
Lazy query. More error.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
6632bcaccd
Handling empty JSON. Does it really happen?
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
5937d6cf44
Since.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
bd28c2c1bc
Fix: specific entry unmarshal
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
b17711ed99
Push log to Loki.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
7037463fcc
Stream test draft.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
01646c7731
Test and fix config.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
437c2af8e2
Prometheus counter. Better URL handling. Streamin acquisition.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
bc6f327998
Ready and Read once.
2023-10-15 21:49:17 +02:00
Mathieu Lecarme
343724be15
loki draft.
2023-10-15 21:49:17 +02:00
Laurence Jones
b2a6eb92bf
Dont create 3 maps just pass the same one to expr ( #2421 )
2023-10-13 22:35:30 +01:00
Laurence Jones
f0cda0406b
Load file only once if specified twice, and bail earlier if type is unknown ( #2419 )
2023-10-13 22:34:57 +01:00
Laurence Jones
ff7acd3347
Reset grokky once all patterns are compiled as we do not need to hold them in memoory ( #2420 )
2023-10-13 12:53:42 +01:00
mmetc
a6b55f2b5e
cscli config feeature-flags: point user to the right location of feature.yaml ( #2539 )
2023-10-13 09:52:51 +02:00
mmetc
3b1563a538
Refact cscli hub / pkg/cwhub (part 6) ( #2524 )
...
* hub.ConfigDir -> hub.InstallDir; hub.DataDir -> hub.InstallDataDir
* cleanup GetInstalledItemsAsString()
* lint: ReferenceMissingError -> ErrMissingReference
* lint: parent_dir -> parentDir
* link: export Walker type
* lint: return error last
* lint: shadow
* move around and group variable definitions
2023-10-09 21:33:35 +02:00
mmetc
0ecb6eefee
add missing scenarios in first login when authenticating with TLS ( #2454 )
...
* refact jwt:Authenticator
* include scenarios in first login request for machines with tlsAuth
* log.Printf -> log.Infof
* errors.Wrap -> fmt.Errorf
* don't override validation error
* fix test
2023-10-09 15:26:38 +02:00
Manuel Sabban
6e228f3f3f
pkg/cwhub: cleanup in argument call ( #2527 )
...
* cleanup in argument call
* update test as well
* cwhub_tests: reduce verbosity and use helpers
---------
Co-authored-by: Marco Mariani <marco@crowdsec.net>
2023-10-09 13:26:34 +02:00
Laurence Jones
28238cb01f
reverse nil statement instead of else ( #2530 )
2023-10-09 11:36:05 +01:00
Laurence Jones
0dd22e8b93
convert ifelseif to switch ( #2529 )
2023-10-09 11:23:19 +01:00
mmetc
9ae8bd79c5
Refact pkg/csconfig tests ( #2526 )
...
* remove unused method
* whitespace, redundant comments
* use test helpers
* move DumpConsoleConfig() from pkg/csconfig to cscli
* package doc header
* var -> const
* rename ./tests -> ./testdata
* shorter tests with more error checks
* lint/formatting
* use helpers; fix tests that didn't actually test
* lint; rename expectedResult -> expected
2023-10-09 11:10:51 +02:00
blotus
6b5da29e3d
Use a default duration if no duration is provided in a profile ( #2520 )
2023-10-06 14:43:17 +02:00
Thibault "bui" Koechlin
6c20d38c41
ligten bucket logger ( #2523 )
2023-10-06 14:42:44 +02:00
mmetc
338141f067
Refact cscli hub / pkg/cwhub (part 5) ( #2521 )
...
* remove unused yaml tags
* cscli/cwhub: deduplicate, remove dead code
* log.Fatal -> fmt.Errorf
* deflate utils.go by moving functions to respective files
* indexOf() -> slices.Index()
* ItemStatus() + toEmoji() -> Item.status()
* Item.versionStatus()
* move getSHA256() to loader.go
2023-10-06 13:59:51 +02:00
mmetc
9235f55c47
Refact pkg/cwhub (part 4) ( #2518 )
...
* generalize function: GetInstalledItems, GetInstalledItemsAsString
* extracted function itemKey, happy path
* review comments / remove redundant; rename file to remove build tags
* remove unused fields in Item struct
* unix build tag
2023-10-05 09:35:03 +02:00
mmetc
61d4ccbfdd
use go 1.21.1 ( #2418 )
...
* use go 1.21.1, require 1.21
* import "slices" from stdlib
* allow codeql to set version number from tags
* codeql: custom WASM build - the automated one can silently fail
2023-10-04 13:01:57 +02:00