Giter Site home page Giter Site logo

falcon-logdog's Issues

同一目录下监控多个log

请问下这个问题,什么时候能够修复下呢?
《如果所监控的文件夹有多个 .log 结尾日志文件,那么只会选择其中一个,可能会选择最后创建的文件(具体还未测试观察)》

采集周期内上报数据丢失的问题

同一个采集周期,被监控日志中只出现一条记录。程序只采集了一条记录,却会向agent提交两条数据。其中一条数据value=1,另一条数据value=0。
以下是app.log:
[09/08/18 15:01:48] [DEBG] event: "/var/log/nginx/access.log": WRITE
[09/08/18 15:01:48] [DEBG] event: "/var/log/nginx/access.log": WRITE
[09/08/18 15:01:55] [DEBG] pushing data: [{"metric":"log","endpoint":"open-falcon","timestamp":1536390115,"value":0,"step":60,"counterType":"GAUGE","tags":"prefix=error,suffix=.log,error.all=."},{"metric":"log","endpoint":"open-falcon","timestamp":1536390115,"value":0,"step":60,"counterType":"GAUGE","tags":"prefix=access,suffix=.log,access.all=."},{"metric":"log","endpoint":"open-falcon","timestamp":1536390105,"value":3,"step":60,"counterType":"GAUGE","tags":"prefix=access,suffix=.log,access.all=."}]
[09/08/18 15:01:55] [DEBG] success
[09/08/18 15:02:55] [DEBG] pushing data: [{"metric":"log","endpoint":"open-falcon","timestamp":1536390175,"value":0,"step":60,"counterType":"GAUGE","tags":"prefix=error,suffix=.log,error.all=."},{"metric":"log","endpoint":"open-falcon","timestamp":1536390175,"value":0,"step":60,"counterType":"GAUGE","tags":"prefix=access,suffix=.log,access.all=."}]
[09/08/18 15:02:55] [DEBG] success

从open-falcon上查询,该周期的数据为0,上报的数据丢失了。
该情况经常是连续出现,之前一段时间还有数据,从一个时间点后就都是0了,但是日志一直有数据。

why?

root@localhost:~/go/src/github.com/falcon-logdog# go build

github.com/go-errors/errors

../go-errors/errors/parse_panic.go:29: undefined: strings.TrimPrefix
../go-errors/errors/parse_panic.go:47: undefined: strings.TrimPrefix

golang.org/x/sys/unix

../../golang.org/x/sys/unix/dev_linux.go:21: Major redeclared in this block
previous declaration at ../../golang.org/x/sys/unix/dev_dragonfly.go:17
../../golang.org/x/sys/unix/dev_linux.go:28: Minor redeclared in this block
previous declaration at ../../golang.org/x/sys/unix/dev_dragonfly.go:22
../../golang.org/x/sys/unix/dev_linux.go:36: Mkdev redeclared in this block
previous declaration at ../../golang.org/x/sys/unix/dev_dragonfly.go:28
../../golang.org/x/sys/unix/syscall_linux.go:60: IoctlSetInt redeclared in this block
previous declaration at ../../golang.org/x/sys/unix/syscall_dragonfly.go:142
../../golang.org/x/sys/unix/syscall_linux.go:64: IoctlSetWinsize redeclared in this block
previous declaration at ../../golang.org/x/sys/unix/syscall_dragonfly.go:146
../../golang.org/x/sys/unix/syscall_linux.go:68: IoctlSetTermios redeclared in this block
previous declaration at ../../golang.org/x/sys/unix/syscall_dragonfly.go:150
../../golang.org/x/sys/unix/syscall_linux.go:74: IoctlGetInt redeclared in this block
previous declaration at ../../golang.org/x/sys/unix/syscall_dragonfly.go:156
../../golang.org/x/sys/unix/syscall_linux.go:80: IoctlGetWinsize redeclared in this block
previous declaration at ../../golang.org/x/sys/unix/syscall_dragonfly.go:162
../../golang.org/x/sys/unix/syscall_linux.go:86: IoctlGetTermios redeclared in this block
previous declaration at ../../golang.org/x/sys/unix/syscall_dragonfly.go:168
../../golang.org/x/sys/unix/syscall_linux.go:232: ImplementsGetwd redeclared in this block
previous declaration at ../../golang.org/x/sys/unix/syscall_dragonfly.go:98
../../golang.org/x/sys/unix/syscall_linux.go:232: too many errors

github.com/sdvdxl/log4go

../sdvdxl/log4go/wrapper.go:208: function ends without a return statement
../sdvdxl/log4go/wrapper.go:232: function ends without a return statement
../sdvdxl/log4go/wrapper.go:256: function ends without a return statement

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.