Last active
July 26, 2017 22:37
-
-
Save Findarato/65cb8cf035b3ad84991bb9c1712b9a9d to your computer and use it in GitHub Desktop.
Telegraf parser for folding at home progress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Stream and parse log file(s). | |
[[inputs.logparser]] | |
files = ["/var/lib/fahclient/log.txt"] | |
from_beginning = true | |
[inputs.logparser.grok] | |
patterns = ["%{FAH_WORKUNITS}","%{FAH_POINTS}"] | |
measurement = "fah" | |
custom_patterns = ''' | |
FAH_WORKUNITS %{DATA:timestamp:ts-"2006-01-02:15:04:05"}\:WU%{NUMBER:workunit:tag}\:FS%{NUMBER:slot:string}\:%{DATA:core:string}\:Completed %{NUMBER:progress:int} out of %{NUMBER:total:int} steps | |
FAH_POINTS %{DATA:timestamp:ts-"2006-01-02:15:04:05"}\:WU%{NUMBER:workunit:tag}\:FS%{NUMBER:slot:string}\:Final credit estimate, %{NUMBER:points:float} points | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment