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