Hi users!
We have released v1.6.0. ChangeLog is here. This release includes new plugin helper and some improvement.
This plugin helper is for in_monitor_agent
like plugins.
Here is code example:
module Fluent::Plugin
class FooServerInput < Input
Fluent::Plugin.register_input('foo_server', self)
helpers :http_server
# ...
def start
super
create_http_server(addr: @bind, port: @port, logger: log) do |serv|
serv.get('/api/hello') { |req|
# Return value is an Array which consists of status code, headers and body
[200, {'Content-Type' => 'text/plain'}, 'hello get']
}
serv.post('/api/hello') { |req|
[200, {'Content-Type' => 'text/plain'}, 'hello post']
}
# support other HTTP method
end
end
end
end
This helper uses WEBrick by default. But if you install async-http
gem, use async-http
instead for the performance.
in_monitor_agent
replaced HTTP server implemenation with http_server
helper.
Since v1.6.0, monitor_agent
input plugin exposes more buffer/output metrics. Here is the comparison.
# v1.6
{
"plugin_id": "out_forward",
"plugin_category": "output",
"type": "forward",
"output_plugin": true,
"buffer_queue_length": 0,
"buffer_timekeys": [],
"buffer_total_queued_size": 0,
"retry_count": 0,
"emit_records": 0,
"emit_count": 0,
"write_count": 0,
"rollback_count": 0,
"slow_flush_count": 0,
"flush_time_count": 0,
"buffer_stage_length": 0,
"buffer_stage_byte_size": 0,
"buffer_queue_byte_size": 0,
"buffer_available_buffer_space_ratios": 100,
"retry": {}
}
# v1.5 or earlier
{
"plugin_id": "out_forward",
"plugin_category": "output",
"type": "forward",
"output_plugin": true,
"buffer_queue_length": 0,
"buffer_timekeys": [],
"buffer_total_queued_size": 0,
"retry_count": 0,
"retry": {}
}
New fields are below:
emit_records
: The total number of emitted recordsemit_count
: The total number of emit
call in output pluginwrite_count
: The total number of write/try_write
call in output pluginrollback_count
: The total number of rollback. rollback happens when write/try_write
failedslow_flush_count
: The total number of slow flush. This count will be incremented when buffer flush is longer than slow_flush_log_threshold
flush_time_count
: The total time of buffer flush in millisecondsbuffer_stage_length
: Current length of staged buffer chunksbuffer_stage_byte_size
: Current bytesize of staged buffer chunksbuffer_queue_byte_size
: Current bytesize of queued buffer chunksbuffer_available_buffer_space_ratios
: Show available space for bufferconnect_timeout
parameter for TCP/TLSThis socket timeout is used for connection establishment. If your DNS returns wrong IP or machine,
connection establishment waits a long time, e.g. 180 seconds by system default. connect_timeout
parameter avoids this kind of problem.
Enjoy logging!
Subscribed to the RSS feed here.
Masahiro (@repeatedly) is the main maintainer of Fluentd. He works on Fluentd development and support full-time. He is also a committer of the D programming language.
Fluentd is an open source data collector to unify log management.
2024-08-29: Scheduled support lifecycle announcement about Fluent Package v6
2023-08-29: Drop schedule announcement about EOL of Treasure Agent (td-agent) 4
2023-08-29: Scheduled support lifecycle announcement about Fluent Package
2023-07-31: Upgrade to fluent-package v5
2024-08-29: Scheduled support lifecycle announcement about Fluent Package v6
2024-08-20: Fluentd v1.16.6 has been released
2024-08-19: Fluentd v1.17.1 has been released
2024-08-02: fluent-package v5.1.0 has been released
2024-07-02: fluent-package v5.0.4 has been released
2024-04-30: Fluentd v1.17.0 has been released
2024-03-29: fluent-package v5.0.3 has been released
2024-03-27: Fluentd v1.16.5 has been released
2024-03-14: Fluentd v1.16.4 has been released
2023-12-04: Open Source Summit Japan 2023
Want to learn the basics of Fluentd? Check out these pages.
Couldn't find enough information? Let's ask the community!
You need commercial-grade support from Fluentd committers and experts?
©2010-2024 Fluentd Project. ALL Rights Reserved.
Fluentd is a hosted project under the Cloud Native Computing Foundation (CNCF). All components are available under the Apache 2 License.