This is another program we can use to export metrics from text log file into prometheus. All necessary descriptions are in github repo –

Grok_exporter works OK although its usage is limited:

  • one grok instance can monitor only one log file – so if you want to monitor more files you must start more grok instances with different config files exporting metrics on different port
  • this of course also mean you have to configure all these targets also in prometheus
  • grok works best with log files which rows have still the same structure – logs with multiple lines per log entry are rather hard to process into some useful metrics