type inference converts "05" to "5" which then isn't usable in strptime()
@sevaTechoPark ci sta già lavorando.
Dal 20/5/2019.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
/^/ +
/(?P<year>\d{4})\/(?P<month>\d{2})\/(?P<day>\d{2}) (?P<time>\d{2}:\d{2}:\d{2}) / +
/.*/ +
/$/ {
getfilename() !~ /(error\.log)$/ {
stop
}
hidden gauge time_rfc3339
time_rfc3339 = $year + "-" + $month + "-" + $day + "T" + $time + "Z03:00"
strptime(time_rfc3339, "2006-01-02T15:04:05Z07:00")
error_log_count++
}
error.log:
2019/05/14 11:10:05 [warn] ...
2019/05/14 11:11:06 [warn] ...
logfile:
I0514 11:13:15.029268 49162 vm.go:90] nginx.mtail: Runtime error: strptime (2006-01-02T15:04:05Z07:00, 2019-5-14T11:11:06Z03:00, UTC) failed: parsing time "2019-5-14T11:13:15Z03:00": month out of range
I think mtail transform 05 to 5 because think that it is number.
How can I tell to mtail that I wanna regexp numbers but wanna work with string type?
time_rfc3339 = $year + "-" + string($month) + "-" + $day + "T" + $time + "Z03:00"
does not help me
$ mtail -version
mtail version v3.0.0-rc29-12-gc95b546 git revision c95b546631bf7b6077d3377f25aff2d5306d305f go version go1.12.4 go arch amd64 go os freebsd
- Lingua principale
- Go
- Stelle
- 4k
- Fork
- 394
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Issue simili
-
Object Manager 1.13 resets a vCLU after sending a projectForse già presa @tciunelis l’ha presa oggi. Apertabug ready ticket
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Domktorymysli/vclu#152 ·
I maintainer di solito rispondono entro 1 giorno
-
bug converter
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
grafana/sigma-rule-deployment#435 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
🤖 verification skills: harden check.sh and verify.sh argument and file handling (#391 follow-ups)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
google/go-containerregistry#2491 ·
I maintainer di solito rispondono entro 1 giorno