sdvdxl / falcon-logdog Goto Github PK
View Code? Open in Web Editor NEWopen-falcon日志关键词监控
License: MIT License
open-falcon日志关键词监控
License: MIT License
app.log出现类似[06/30/18 19:55:17] [DEBG] event: "xxxxx.log": WRITE的日志信息,出现的时候无法统计到文件中出现的ERROR信息
你好,有个问题想问下,当日志文件滚动后,好像无法监控新的文件,push的数值都是0。
请问下这个问题,什么时候能够修复下呢?
《如果所监控的文件夹有多个 .log 结尾日志文件,那么只会选择其中一个,可能会选择最后创建的文件(具体还未测试观察)》
helle,运行启动的时候,出现如下报错:nohup: failed to run command `./falcon-logdog': No such file or directory
请问下,这个是针对日志名还是日志?针对日志的话应该轮询吧?没看到定义日志关键字的参数啊。
同一个采集周期,被监控日志中只出现一条记录。程序只采集了一条记录,却会向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了,但是日志一直有数据。
root@localhost:~/go/src/github.com/falcon-logdog# go build
../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/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
../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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.