Urgent help require on mtail

Skip to first unread message

Krishna Khatana

Jul 1, 2021, 11:28:40 PM7/1/21
to mtail-users
  log_format common '$remote_addr';

  access_log  /data/nginx/logs/access.log common;

Log printed in log file :
[root@ logs]# tail -f access.log

program for mtail :
counter count_host by remote_addr

/^/ +
/(?P<remote_addr>\d+\.\d+\.\d+\.\d+) / +
/$/ {

Here is mtail details on browser :
mtail on

Build: mtail version 3.0.0-rc46 git revision 76fadc0d5ef06dd83ad5129f1f14fa46f95b31a9 go version go1.16.4 go arch amd64 go os linux

Metrics: jsongraphiteprometheusvarz

Debug: debug/pprofdebug/varstracezprogz

Program Loaderprogram nameerrorsload errorsload successesruntime errorslast runtime error
No compile errors


Log TailerPatterns
  • /data/nginx/logs/access.log
Log files watchedpathnameerrorsopenstruncationslines read



when i am starting mtail it start without errors but i am not able to see the metics on the prometheus as well as 9101/metrics path the metrics which i wanted count_host

please help urgently as i am not getting metrics

Jamie Wilkinson

Jul 2, 2021, 12:27:38 AM7/2/21
to Krishna Khatana, mtail-users
Add --logtostderr to the command line and see what log messages appear.  The program looks OK to me here but the formatting may be incorrect, and likewise the log file looks like it should have something happen, but it's not clear what's missing.

You received this message because you are subscribed to the Google Groups "mtail-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mtail-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mtail-users/07d9987c-2fa5-48bf-b62d-b16c5bef14een%40googlegroups.com.
Reply all
Reply to author
0 new messages