Commit graph

79 commits

Author SHA1 Message Date
Micha Cassola
5484cc2044
Fix cp -n (#3483)
* Fix cp -n

* Don't rely on cp for file existence check

* Busybox cp can be used now

* test -s -> test -f

* test -f -> test -e

---------

Co-authored-by: marco <marco@crowdsec.net>
2025-05-07 14:15:54 +02:00
blotus
f5400482a6
opensuse sets OSTYPE to linux (#3514) 2025-03-15 13:46:35 +01:00
mmetc
037bac86ad
wizard.sh: remove obsolete --yes option (#3450) 2025-02-07 12:14:13 +01:00
mmetc
1b5514c9e4
wizard: install systemd service file (#3418)
fix previous PR
2025-01-21 13:15:42 +01:00
mmetc
b582730d06
remove commands "cscli config backup/restore" (#3158)
* remove "cscli config backup/restore"
* remove backup/restore calls from deb,rpm pre/postinst and wizard
* remove from prerm too
2025-01-16 14:02:39 +01:00
mmetc
90f7c56aab
wizard: unattended install w/ new hubops (#3392) 2025-01-02 16:41:11 +01:00
mmetc
41ec90ae8c
make: remove unused targets (#2998) 2024-05-15 10:37:25 +02: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
fa8d5b6992
post-install: reduce verbosity (#2751)
* post install: avoid message "no such file or directory" when looking for logs
* post install: avoid info and warning messages when registering to capi
* lint (backtick)
2024-01-18 09:20:52 +01:00
mmetc
aa4f02c798
wizard: while installing, don't hide hub download/timeout errors (#2710)
* wizard: while installing, don't hide hub download/timeout errors
* lint, whitespace
2024-01-11 16:30:42 +01:00
Thibault "bui" Koechlin
51f70e47e3
Minor improvements to hubtest and appsec component (#2656) 2023-12-13 17:45:56 +01:00
mmetc
12d9fba4b3
cscli machines: lint + write output to stdout instead of log (#2657)
* feedback on stdout, not log.Info
* rename parameters to silence warnings from "unusedparams"
* debian postinst: skip duplicate warnings with 'cscli machines add'
* rpm postinst: skip duplicate warnings in 'cscli machines add'
* update func tests
* debian prerm: if dashboard remove fails, explain it's ok
* debian prerm: suppress warnings about wal, capi when attempting to remove the dashboard
* wizard.sh: log format like crowdsec
2023-12-13 15:43:46 +01: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
0d1adfc7db
wizard: auto-detect ssh.service correctly on deb distros when auth.log is missing (fix #2175) (#2176) 2023-04-19 11:09:39 +02:00
AlteredCoder
185f9ad541
Alert context (#1895)
Co-authored-by: bui <thibault@crowdsec.net>
2023-01-04 16:50:02 +01:00
Laurence Jones
24b540ecde
Cronjob via packages (#1820)
* Final version
2022-10-18 16:11:48 +01:00
Laurence Jones
0ecb6dcd4d
Hub auto update cronjob (#1817)
Add hub cron installation to install scripts

Plus remove on uninstall
2022-10-17 16:04:01 +01:00
mmetc
1aac5d78d9
replace wizard patch for .deb & .rpm packages with an envvar check (#1630) 2022-08-16 14:59:59 +02:00
mmetc
fae1f96856
install config.yaml with chmod 600 (#1518) 2022-05-17 12:50:18 +02:00
Greg Myers
0f4ab71f01
Fix typos in docs, comments, code (#1483) 2022-04-27 11:04:12 +02:00
mmetc
d7a269a6e4
wizard: removed jq dependency (#1460) 2022-04-20 09:45:23 +02:00
mmetc
81793fe8bf
dummy plugin (#1342) 2022-03-16 09:30:04 +01:00
Shivam Sandbhor
76e97303a5
Deprecate pid_file config (#1346)
* Deprecate pid_file config

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>

* Fix unit test

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>

* Impl review suggestions.

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2022-03-16 09:23:49 +01:00
he2ss
5f2d7f6a65
wizard: install matched collections only (#1212) 2022-01-28 09:08:25 +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
Shivam Sandbhor
a6e405422c
Add email notification plugin. (#1013)
* Add email notification plugin.
* Add plugin binary to gitignore

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2022-01-06 11:20:59 +01:00
Manuel Sabban
f46f0ae553
add the ability for the wizard to work on raspbian (#1136)
Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
2021-12-30 14:47:51 +01:00
he2ss
002268b32f
wizard: add openresty logs location (#1108) 2021-12-17 10:29:00 +01:00
Thibault "bui" Koechlin
6e272d3f88
fix links in wizard (#1098) 2021-12-15 11:31:32 +01:00
AlteredCoder
01130a5e17
add headers when using raw output (#1087)
* add headers when output raw with cscli
2021-12-14 11:09:26 +01:00
Thibault "bui" Koechlin
3c2462fbc5
Fix #1070 (#1092)
* fix #1070
2021-12-13 19:31:43 +01:00
mmetc
a4998913d8
install coreutils under alpine; do not copy notification configuration (#1044)
under Docker; assume systemctl is not running if it does not exist
2021-11-03 16:56:44 +01: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
Thibault "bui" Koechlin
1d21679b3f
fix #840 : check for whiptail in detect mode (#844) 2021-07-01 13:50:40 +02:00
Manuel Sabban
bb37e2e70d
fix functional tests (#838)
* fix functional tests
* add journal detection feature in wizard.sh

Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
2021-07-01 10:36:27 +02:00
Andrew Armstrong
b29730520f
Trivial typo fix adresses -> addresses in msgbox (#832)
A minor change to correct the spelling of the word addresses in a wizard message box during installation
2021-06-21 15:10:59 +02:00
Thibault "bui" Koechlin
f1b0414c89
Unified functional tests (#696)
* remove dead / not needed code & scripts

* don't rely on /dev/urandom in wizard

* unified functional tests
2021-03-18 13:59:41 +01:00
AlteredCoder
f2d14c8ca2
update the config.yaml file (#674) 2021-03-11 11:18:09 +01:00
AlteredCoder
8b504e9f67
improve logging in cscli and wizard (#643) 2021-02-25 11:20:36 +01:00
AlteredCoder
dae4458a6f
create crowdsec group for metabase and crowdsec.db (#606) 2021-02-10 09:23:33 +01:00
AlteredCoder
9f515cb7ef
remove help message backup/restore in wizard (#612)
Co-authored-by: AlteredCoder <AlteredCoder>
2021-02-09 18:07:00 +01:00
registergoofy
862105669f
add two options: configure and noop (#591) 2021-01-28 12:05:42 +01:00
Thibault "bui" Koechlin
6724c2aca4
winzard uninstall : check if user has registered bouncers (#579)
* check if user has registered bouncers
2021-01-19 12:31:03 +01:00
AlteredCoder
8bd53a89c0
add useful links in the wizard (#576)
Co-authored-by: AlteredCoder <AlteredCoder>
2021-01-15 18:14:33 +01:00
Thibault "bui" Koechlin
986a0be812
fix wizard behaviour when detecting appropriate action (#573)
* fix wizard behaviour when detecting appropriate action

* fix filter handling with cscli

* add ipv6 tests

Co-authored-by: AlteredCoder <AlteredCoder>
2021-01-15 09:48:39 +01:00
Shivam Sandbhor
a63b6729bf
Enable detection of httpd (#512)
* Enable detection of `httpd` on centos

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2020-12-23 09:47:49 +01:00