Urgent help require on mtail

33 views
Skip to first unread message

Krishna Khatana

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

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

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

program for mtail :
counter count_host by remote_addr

/^/ +
/(?P<remote_addr>\d+\.\d+\.\d+\.\d+) / +
/$/ {
  count_host[$remote_addr]++
}

Here is mtail details on browser :
mtail on 10.3.50.108:9101

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
nginx.mtail
No compile errors

1

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

1

3

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

unread,
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
Forward
0 new messages