25 Commits

Author SHA1 Message Date
mmetc
aae611be7a update deps: crowdsec 1.6.1, go-cs-lib 0.0.10 (#367)
* update deps: crowdsec 1.6.1, go-cs-lib 0.0.10

* lint
2024-04-26 13:03:35 +02:00
Nathan A. Ferch
32122046da emit banned IPs metrics when in ipset mode (#350)
* emit banned IPs metrics when in ipset mode

* fix nil checks  metrics.go

* oops

---------

Co-authored-by: mmetc <92726601+mmetc@users.noreply.github.com>
2024-03-11 15:20:39 +01:00
mmetc
f50c248f68 Allow overriding version.System in docker builds (#363) 2024-03-11 14:42:05 +01:00
mmetc
0d19a68be9 config: apply variable expansion to all keys (#364)
* fix ennvar expansion in configuration file
* CI: test variable expansion
* lint
2024-03-11 14:11:39 +01:00
mmetc
eb7094b1f9 basic PF prometheus metrics (packets, bytes, banned ip count) (#349) 2024-01-19 15:56:22 +01:00
mmetc
1ac4635e82 Log level: don't demote trace to debug if using the -v flag (#352)
* Log level: don't demote trace to debug if using the -v flag
* CI: apt update before install
2024-01-08 14:53:37 +01:00
mmetc
243382aad4 golangci-lint update (#348) 2024-01-05 17:12:21 +01:00
mmetc
39db9d6312 Lint (#339) 2023-11-07 10:09:29 +01:00
mmetc
4ad0fd23ba Add option -version in favor of -V (#330) 2023-09-22 14:31:05 +02:00
mmetc
dfff2732b9 Support option "retry_initial_connect" (#310) 2023-07-28 22:38:07 +02:00
mmetc
1175f348a5 cross-platform interrupt handler (#304) 2023-07-05 16:00:04 +02:00
mmetc
1fcde2def0 add "dry-run" backend mode, added connection tests with api key and tls (#297) 2023-06-12 15:57:09 +02:00
mmetc
c43e65aefc deprecate "daemonize" and "pid_dir" options (#296) 2023-06-08 15:31:46 +02:00
mmetc
4afaea28e8 handle SIGINT (#290) 2023-06-07 14:17:42 +02:00
mmetc
0363d18384 update dependencies to crowdsec 1.5.2; allow build with devel version of go (#295) 2023-06-07 14:16:39 +02:00
mmetc
050cb36ac5 update user and test messages (#289) 2023-05-24 09:34:27 +02:00
mmetc
4392341109 use go-cs-lib (#287) 2023-05-23 10:58:13 +02:00
mmetc
3c7c5ffe92 deb, rpm: handle api key creation (skip/ignore error) with .yaml.local or remote LAPI (#275) 2023-05-10 21:00:32 +02:00
mmetc
416d865240 Refactor nft code with ip4/ip6 context (#273) 2023-05-09 15:14:34 +02:00
mmetc
8b3009d717 Correct backend cleanup and return code (#268)
The backend cleanup was only called from the signal handler, defer was ignored. Now there's proper messages and return codes

time="03-05-2023 12:43:02" level=info msg="6987 decisions added"
time="03-05-2023 12:43:10" level=info msg="Shutting down backend"
time="03-05-2023 12:43:10" level=info msg="removing 'crowdsec' table"
time="03-05-2023 12:43:10" level=info msg="removing 'crowdsec6' table"
time="03-05-2023 12:43:10" level=fatal msg="process terminating with error: received SIGTERM"
2023-05-04 10:20:51 +02:00
mmetc
2fa4003255 use official library for slices (#267) 2023-05-03 13:02:00 +02:00
mmetc
8e53b402a5 Log config cleanup, extract/inline Logging structure (#266) 2023-05-03 12:55:28 +02:00
mmetc
bc299f396e fix minor logging issues (#264)
* Silence terminal detection

* CI: debug helper for systemd units

* Fix minor logging issues

 - pre-create a file with chmod 0600, or change them if the file already exists
 - don't log fatal, panic .. twice to stderr
 - default log_mode = stdout
 - calling code from crowdsec/pkg/types would create an empty $LogDir/crowdsec.log (??),
   this dependency is removed

* fix metric parsing error
2023-04-27 16:05:34 +02:00
mmetc
64feafebd8 Cleanup packaging, fix permissions (#257) 2023-04-12 11:47:49 +02:00
mmetc
1800093b18 Split code in packages for pkg/ and cmd/ (#251) 2023-04-06 11:28:18 +02:00