Counter is ZERO

27 views
Skip to first unread message

Michael Ignatovsky

unread,
Apr 28, 2022, 10:27:24 AMApr 28
to mtail-users
Hi all, new to mtail, obviously.
I am running mtail v 3.0.0--rc48 on Linux

matil metrics show ZERO (0) for my very first line counter program (as borrowed from github)


counter lines_total
/$/ {
lines_total++
}

adding --logtostderr shows that 
- mtail loaded my program
- mtail parsed URL (log file)
-mtail is tailing the log file

And yet, even if I rename log file for a fresh start, my counter lines_total is 0.

Any help would be most welcomed.



Michael Ignatovsky

unread,
Apr 28, 2022, 6:17:10 PMApr 28
to mtail-users
Update: log file was  just unstructured text and looks like mtail simply ignored it.
Adding few lines with what looks like timestamp followed by text made mtail react and all my counts work, including for unstructured part of the file.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages