Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
This commit is contained in:
parent
9b3ff82542
commit
1f06f242cc
1 changed files with 4 additions and 0 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/crowdsecurity/crowdsec/pkg/csconfig"
|
||||
|
||||
|
@ -37,6 +38,9 @@ func Init(c map[string]interface{}) (*UnixParserCtx, error) {
|
|||
}
|
||||
r.DataFolder = c["data"].(string)
|
||||
for _, f := range files {
|
||||
if strings.Contains(f.Name(), ".") {
|
||||
continue
|
||||
}
|
||||
if err := r.Grok.AddFromFile(path.Join(c["patterns"].(string), f.Name())); err != nil {
|
||||
log.Errorf("failed to load pattern %s : %v", f.Name(), err)
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Reference in a new issue