Commit graph

22 commits

Author SHA1 Message Date
mmetc
ff9b350e0e
deb build: get version with dpkg-parsechangelog -S (#3405) 2025-01-20 10:31:55 +01:00
mmetc
97c1f60a68
make: remove obsolete/redundant parameters (#3304)
* makefile: remove -w from build flags (implied by -s)

* remove reference to obsolete build param
2024-10-29 09:56:51 +01:00
Laurence Jones
ecd82ecfbd
feat: File notification plugin (#2932)
* wip: basic impl of file notification no log rotate but might now do it 🤷

* wip: ticker to 2 seconds and lower some log levels

* wip: remove redundant logrus formatter

* wip: the plugin should not handle it own data queue since the plugin process may timeout, so instead have a function that uses said context and loop whilst locking the filewriter this may not be the best way 🤷, however, I dont want multiple notifications to attempt to reopen the file if it has been rotated outside of the plugin context

* wip: impl log rotation which checks on check append, however, this may cause some issues in slow systems as the mutex lock doesnt give up until the file is rotated, however, the plugin looks for context and will give up if the plugin broker decides its timeout and will retry once the plugin has pushed again

* wip: update yaml dep

* wip: me no english great

* wip: even if the file has been rotated outside our control we should still compute the file size

* wip: improve context handling with creating a custom io writer struct which checks the context before attempting to write

* wip: used return byte count instead of calling a conversion again

* wip: actually check the enabled flag on log rotate

* wip: changed my mind, we check when we check file size

* wip: use io copy instead for memory alloc

* fix: add notification file to deb/rpm build
2024-05-15 09:21:45 +01:00
mmetc
e4a8d3b99e
deb,rpm: include empty directory etc/crowdsec/acquis.d (#2997) 2024-05-13 12:01:17 +02:00
mmetc
2aa55e9444
move plugins/notifications/* to cmd/notification-* (#2429)
This ensures keeping all dependencies in sync, and simplifies
packaging under freebsd/gentoo/etc because there is a single
vendor directory.
2023-08-24 09:46:25 +02:00
blotus
77d58652a3
add sentinel notification plugin (#2268) 2023-07-25 15:07:10 +02:00
mmetc
98c6038fde
Build with libre2 by default, options for wasm and static; add mk/gmsl (#2295) 2023-06-23 14:25:29 +02:00
mmetc
534328ca30
decouple bouncer dependencies: use go-cs-lib/pkg/* (#2216)
* decouple bouncer dependencies: use go-cs-lib/pkg/trace
* decouple bouncer dependencies: use go-cs-lib/pkg/version
* decouple bouncer dependencies: use go-cs-lib/pkg/yamlpatch
* decouple bouncer dependencies: use go-cs-lib/pkg/csstring
* unused import
2023-05-23 10:52:47 +02:00
AlteredCoder
185f9ad541
Alert context (#1895)
Co-authored-by: bui <thibault@crowdsec.net>
2023-01-04 16:50:02 +01:00
mmetc
03b5184837
restrict permissions for plugin configurations (#1745) 2022-09-14 14:23:18 +02:00
Manuel Sabban
9fac14488a
fix perms for config.yaml installation (#1661)
Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
2022-07-12 16:05:27 +02:00
mmetc
fae1f96856
install config.yaml with chmod 600 (#1518) 2022-05-17 12:50:18 +02:00
Manuel Sabban
2763366309
switch to make build for packaging (#1279)
* switch to make build for packaging
* build as first target

Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
2022-02-18 18:09:19 +01:00
Kerma Gérald
052ec6e632
email-plugin: fix install in debian package (#1219)
fix some small typo
add the email plugins to debian package

Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2022-02-02 10:08:32 +01:00
Manuel Sabban
01ee09c547
Merge branch 'master' into master 2022-01-25 20:32:46 +01:00
mmetc
8310c10ce3
console_config.yaml -> console.yaml (#1195) 2022-01-21 11:52:23 +01:00
Thibault "bui" Koechlin
6e92da76ad
lapi to capi : allow push of tainted/custom/manual decisions (#1154)
* add console command to control signal sharing
* modify metrics endpoint to add lastpush

Co-authored-by: alteredCoder <kevin@crowdsec.net>
2022-01-13 16:46:16 +01:00
sabban
2e146ea3fc update to use debian/install files 2021-12-13 17:37:37 +01:00
Manuel Sabban
21dd4851f1
make crowdsec own /etc/crowdsec/* (#947)
* make debian packages own /etc/crowdsec/*

* make package owns /etc/crowdsec/*

Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
2021-09-08 11:36:59 +02:00
Manuel Sabban
1d955f4258
fix plugins directories (#942)
* use usr over var for plugins
* add patch for debian directory
* patch rpm conf as well
* update directory structure
* modify config at build time
* use macros

Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
2021-09-07 17:18:55 +02:00
Thibault "bui" Koechlin
950759f6d6
Output plugins (#878)
* Add plugin system for notifications (#857)
2021-08-25 11:43:29 +02:00
blotus
1a605f33da
import debian & rpm sources (#898) 2021-08-18 13:57:06 +02:00