Observelog
collect log send to OpenObserve
Install / Use
/learn @dangweiwu/ObservelogREADME
说明:
本项目为OpenObserve专用日志采集工具,具有使用简单、稳定、资源使用低等特点。
使用本工具前请先安装OpenObserve服务。
安装:
go install github.com/dangweiwu/observelog
配置文件
config/logconfig.yaml
Host: localhost:8102 //日志监控服务端口,可查看工作状态
user: root //日志监控服务账号
password: root //日志监控服务密码
Logx:
LogName: ./collect.log //日志监控服务的日志
Level: debug //日志级别
OutType: all //日志输出配置 console,file,all
Formatter: txt //日志格式 txt,json
Observe:
Host: http://localhost:5080 //OpenObserve服务地址
UserName: admin@qq.com //OpenObserve 账号
Password: '123456' //OpenObserve 密码
Org: default //OpenObserve 组织
Stream: server //OpenObserve 流名称
Collect:
MaxCount: 20 //采集缓冲数量
Path: ./demo.log //采集日志地址
使用
observelog -f config.yaml
该命令即可启动日志监控
如果有多个日志需要监控请使用不同配置文件名以便区分
采集状态
访问配置文件中的Host即可获取当前日志采集状态包括,发送数量,发送成功数量。
其他说明
- 所采集日志必须为json,非json日志将会被过滤掉
- MaxCount参数指定最大缓冲日志条数,当1s内,达到最大日志采集数量,会马上发送缓存日志,否则,1s时间达到,也会将日志进行发送。
- 本项目经过长期实践检验,每秒上千发送量也能长期稳定运行。
License
© Dangweiwu, 2023~time.Now
Released under the MIT License
Related Skills
node-connect
337.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
337.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.1kCommit, push, and open a PR
