Skip to content

Commit f57d9aa

Browse files
committed
1.0: Add metrics plugin descriptions
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 3727a0d commit f57d9aa

File tree

11 files changed

+100
-8
lines changed

11 files changed

+100
-8
lines changed

SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@
122122
* [static](service_discovery/static.md)
123123
* [file](service_discovery/file.md)
124124
* [srv](service_discovery/srv.md)
125+
* [Metrics Plugins](metrics/README.md)
126+
* [local](metrics/local.md)
125127
* [How-to Guides](how-to-guides/README.md)
126128
* [Stream Analytics with Materialize](how-to-guides/stream-analytics-with-materialize.md)
127129
* [Send Apache Logs to S3](how-to-guides/apache-to-s3.md)

buffer/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Buffer Plugins
22

3-
Fluentd has eight \(8\) types of plugins:
3+
Fluentd has nine \(9\) types of plugins:
44

55
* [Input](../input/)
66
* [Parser](../parser/)
@@ -10,6 +10,7 @@ Fluentd has eight \(8\) types of plugins:
1010
* [Storage](../storage/)
1111
* [Service Discovery](../service_discovery/)
1212
* [Buffer](./)
13+
* [Metrics](../metrics/)
1314

1415
This article gives an overview of Buffer Plugin.
1516

filter/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Filter Plugins
22

3-
Fluentd has eight \(8\) types of plugins:
3+
Fluentd has nine \(9\) types of plugins:
44

55
* [Input](../input/)
66
* [Parser](../parser/)
@@ -10,6 +10,7 @@ Fluentd has eight \(8\) types of plugins:
1010
* [Storage](../storage/)
1111
* [Service Discovery](../service_discovery/)
1212
* [Buffer](../buffer/)
13+
* [Metrics](../metrics/)
1314

1415
This article gives an overview of the Filter Plugin.
1516

formatter/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Formatter Plugins
22

3-
Fluentd has eight \(8\) types of plugins:
3+
Fluentd has nine \(9\) types of plugins:
44

55
* [Input](../input/)
66
* [Parser](../parser/)
@@ -10,6 +10,7 @@ Fluentd has eight \(8\) types of plugins:
1010
* [Storage](../storage/)
1111
* [Service Discovery](../service_discovery/)
1212
* [Buffer](../buffer/)
13+
* [Metrics](../metrics/)
1314

1415
This article gives an overview of the Formatter Plugin.
1516

input/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Input Plugins
22

3-
Fluentd has eight \(8\) types of plugins:
3+
Fluentd has nine \(9\) types of plugins:
44

55
* [Input](./)
66
* [Parser](../parser/)
@@ -10,6 +10,7 @@ Fluentd has eight \(8\) types of plugins:
1010
* [Storage](../storage/)
1111
* [Service Discovery](../service_discovery/)
1212
* [Buffer](../buffer/)
13+
* [Metrics](../metrics/)
1314

1415
This article gives an overview of the Input Plugin.
1516

metrics/README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Metrics Plugins
2+
3+
Fluentd has nine \(9\) types of plugins:
4+
5+
* [Input](../input/)
6+
* [Parser](../parser/)
7+
* [Filter](../filter/)
8+
* [Output](../output/)
9+
* [Formatter](../formatter/)
10+
* [Storage](../storage)
11+
* [Service Discovery](../service_discovery/)
12+
* [Buffer](../buffer/)
13+
* [Metrics](./)
14+
15+
This article gives an overview of Metrics Plugin.
16+
17+
## Overview
18+
19+
Sometimes, the input/filter/output plugin needs to save its internal metrics in memory, influxdb or prometheus format ready in instances. Fluentd has a pluggable system called Metrics that lets a plugin store and reuse its internal state as metrics instances.
20+
21+
## How To Use
22+
23+
On Fluentd core, metrics plugin will handled on `<metrics>` on `<system>` to set up easily.
24+
25+
Here is an example with `metrics_local`:
26+
27+
```text
28+
<system>
29+
<metrics>
30+
@type local
31+
</metrics>
32+
</system>
33+
```
34+
35+
## List of Built-in Metrics Plugins
36+
37+
* [`local`](local.md)
38+
39+
## List of Base Plugin classes with Metrics support
40+
41+
* `Fluent::Plugin::Input` for Input plugin base class
42+
* `Fluent::Plugin::Output` for most of output plugin base class
43+
* `Fluent::Plugin::Filter` for Filter plugin base class
44+
* `Fluent::Plugin::MultiOutput` for [out_copy](../output/copy.md) plugin base class
45+
* `Fluent::Plugin::BareOutput` for fluent-plugin-forest output plugin base class
46+
47+
## List of 3rd party metrics plugins
48+
49+
NOTE: This 3rd party metrics plugin list does not fully covers all of them.
50+
51+
* [fluent-plugin-metrics-cmetrics](https://github.com/calyptia/fluent-plugin-metrics-cmetrics)
52+
53+
If this article is incorrect or outdated, or omits critical information, please [let us know](https://github.com/fluent/fluentd-docs-gitbook/issues?state=open). [Fluentd](http://www.fluentd.org/) is an open-source project under [Cloud Native Computing Foundation \(CNCF\)](https://cncf.io/). All components are available under the Apache 2 License.

metrics/local.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# local
2+
3+
The `local` metrics plugin stores the values on memory.
4+
5+
## Parameters
6+
7+
### `default_labels`
8+
9+
Specifies the default labels for the metrics. \(default: `{agent: "Fluentd", hostname: "#{Socket.gethostname}"}`\)
10+
11+
### `labels`
12+
13+
Specifies other custom labels for the metrics. \(default: `{}`\)
14+
15+
## Example
16+
17+
With this configuration:
18+
19+
```text
20+
<system>
21+
<metrics>
22+
@type local
23+
</metrics>
24+
</system>
25+
```
26+
27+
The above configuration will save the internal metrics for plugins on memory. As a result, you can retrive metrics from memory and also you can replace with your custom metrics plugin.
28+
29+
If this article is incorrect or outdated, or omits critical information, please [let us know](https://github.com/fluent/fluentd-docs-gitbook/issues?state=open). [Fluentd](http://www.fluentd.org/) is an open-source project under [Cloud Native Computing Foundation \(CNCF\)](https://cncf.io/). All components are available under the Apache 2 License.

output/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Output Plugins
22

3-
Fluentd has eight \(8\) types of plugins:
3+
Fluentd has nine \(9\) types of plugins:
44

55
* [Input](../input/)
66
* [Parser](../parser/)
@@ -10,6 +10,7 @@ Fluentd has eight \(8\) types of plugins:
1010
* [Storage](../storage/)
1111
* [Service Discovery](../service_discovery/)
1212
* [Buffer](../buffer/)
13+
* [Metrics](../metrics/)
1314

1415
This article gives an overview of the Output Plugin.
1516

parser/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Parser Plugins
22

3-
Fluentd has eight \(8\) types of plugins:
3+
Fluentd has nine \(9\) types of plugins:
44

55
* [Input](../input/)
66
* [Parser](./)
@@ -10,6 +10,7 @@ Fluentd has eight \(8\) types of plugins:
1010
* [Storage](../storage/)
1111
* [Service Discovery](../service_discovery/)
1212
* [Buffer](../buffer/)
13+
* [Metrics](../metrics/)
1314

1415
This article gives an overview of the Parser Plugin.
1516

service_discovery/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Service Discovery Plugins
22

3-
Fluentd has eight \(8\) types of plugins:
3+
Fluentd has nine \(9\) types of plugins:
44

55
* [Input](../input/)
66
* [Parser](../parser/)
@@ -10,6 +10,7 @@ Fluentd has eight \(8\) types of plugins:
1010
* [Storage](../storage/)
1111
* [Service Discovery](./)
1212
* [Buffer](../buffer/)
13+
* [Metrics](../metrics/)
1314

1415
This article gives an overview of the Service Discovery Plugin.
1516

0 commit comments

Comments
 (0)