chg: [misp] correct timings

nifi
Jean-Louis Huynen 2020-06-22 15:45:45 +02:00
parent ab4f9b967c
commit 29f2ef718b
No known key found for this signature in database
GPG Key ID: 64799157F4BD6B93
2 changed files with 4 additions and 6 deletions

View File

@ -537,10 +537,8 @@ func csvStats(s *SSHDCompiler, v string) error {
func (s *SSHDCompiler) MISPexport() error {
//today := time.Now()
//dstr := fmt.Sprintf("%v%v%v", today.Year(), fmt.Sprintf("%02d", int(today.Month())), fmt.Sprintf("%02d", int(today.Day())))
dstr := "20200505"
today := time.Now()
dstr := fmt.Sprintf("%v%v%v", today.Year(), fmt.Sprintf("%02d", int(today.Month())), fmt.Sprintf("%02d", int(today.Day())))
r0 := *s.r0
r1 := *s.r1

View File

@ -51,7 +51,7 @@ var (
redisInput *redis.Pool
// Compilers
compilers = [1]string{"sshd"}
compilationTrigger = 20
compilationTrigger = 2000
torun = []logcompiler.Compiler{}
// Routine handling
pullgr sync.WaitGroup
@ -231,7 +231,7 @@ func main() {
// they can immediately die when exiting.
for _, v := range torun {
go func() {
ticker := time.NewTicker(20 * time.Second)
ticker := time.NewTicker(24 * time.Hour)
for _ = range ticker.C {
v.MISPexport()
}