-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fluentd 和 td-agent 信息汇总 #65
Comments
Overview of Server-Side Agent (td-agent)
Logs Are Streams, Not Files
旧式日志系统会将 logs 按照 小时 或 每天 的维度、基于 time 或 size 进行 rotate ;而更现代的观念是:应该将 logs 看做持续生成的 流 而不是 文件;
What is Treasure Agent?
Treasure Agent and Fluentd
推荐 Treasure Agent 3 + fluentd v0.14 (v1.0) 组合 How to install Treasure Agent?Ubuntu & Debian
Set up td-agent
(配置文件略) Restart the
Agent OverheadThe td-agent resource consumption is roughly:
If you think Files Installed by the Packages
Supervision, Privileges and Network PortsWhen Both processes run as the The following ports are open depending on your input.
DebuggingIf you are having issues, add the following line to
After that, restart the daemon. You can now find more verbose logs in High-Availability Configurations and MonitoringFor high-traffic websites, we recommend using a high availability configuration for
|
High Availability td-agent ConfigurationMessage Delivery Semantics
关于几种 delivery guarantees 的说明:
如果你的系统无法接受“丢失任何一条消息”,并且只允许发送消息“一次”,那么你应该使用同步日志系统;
需要知道的是,大部分失败场景都是可以避免的;下面的内容就是针对如何构建 td-agent 的 HA ; Network Topology
log forwarders 在每一个 node 上都安装,用于接收本地 event ,再转发给 log aggregators ;
log aggregators 作为 daemon 持续接收来自 log forwarders 的 events ;log aggregators 会对 events 进行缓存,并周期性的上传数据到云端;
Log Forwarder Configuration略 Log Aggregator Configuration略 Failure Case ScenariosForwarder Failure
log forwarder 从应用处收到 events 后,会先将其写入 disk buffer ,之后再以
存在两种可能导致消息丢失的情况; Aggregator Failure
That being said, possible message loss scenarios do exist:
存在两种可能导致消息丢失的情况; |
Monitoring td-agentFluentd Metrics MonitoringMonitoring via HTTP
Next, please restart the agent and get the metrics via HTTP. 通过 HTTP 方式就可以获取相应的 metrics 了
Monitoring with Prometheus or Datadog
Process Monitoring
Port Monitoring
If you don’t send any data, the daemon doesn’t do anything. Debug PortA debug port for local communication is also opened.
|
td-agent v2 vs. td-agent v3
Treasure Data 公司基于开源的 Fluentd 维护了 stable packages ,并开发了一个 plugin 叫做 Treasure Agent ( |
Installing Fluentd Using deb PackageWhat is td-agent?
Fluentd 基于 Ruby 和 C 编写;一些用户在安装和运行 Ruby daemon 类程序时有困难;
Step 0: Before InstallationPlease follow the Preinstallation Guide to configure your OS properly. This will prevent many unnecessary problems. Step 1: Install from Apt Repository
针对 Ubuntu 18.04 的安装命令
Step 2: Launch DaemonsystemdThe
运行状态查看
想要自己定制化 systemd 行为时,才需要将调整后的 Step 3: Post Sample Logs via HTTP
效果
|
公司文档和项目:
文章:
插件(下面的内容主要是 http output 相关的):
The text was updated successfully, but these errors were encountered: