这期内容当中小编将会给大家带来有关Fluentd中怎么使用REST接口监控Fluentd,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。
- Fluentd提供了一个HTTP代理用于接收内部的统计数据。在配置文件中增加以下配置项启用此代理。
<source> @type monitor_agent bind 0.0.0.0 port 24220</source>
重启td-agent,就可以通过HTTP获取内部统计数据。
$ curl http://host:24220/api/plugins.json{ "plugins":[ { "plugin_id":"object:3fec669d6ac4", "type":"forward", "output_plugin":false, "config":{ "type":"forward" } }, { "plugin_id":"object:3fec669dfa48", "type":"monitor_agent", "output_plugin":false, "config":{ "type":"monitor_agent", "port":"24220" } }, { "plugin_id":"object:3fec66aead48", "type":"forward", "output_plugin":true, "buffer_queue_length":0, "buffer_total_queued_size":0, "retry_count":0, "config":{ "type":"forward", "host":"192.168.0.11" } } ]}
- 对于Fluentd事件的统计,可以使用flowcounter或flowcounter_simple插件。这里不对插件的具体用法做介绍,可在GitHub上查看使用文档。
上述就是小编为大家分享的Fluentd中怎么使用REST接口监控Fluentd了,如果刚好有类似的疑惑,不妨参照上述分析进行理解。如果想知道更多相关知识,欢迎关注天达云行业资讯频道。