Skip to content
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

1.0: Add metrics plugin descriptions #347

Merged
merged 2 commits into from
Aug 30, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@
* [static](service_discovery/static.md)
* [file](service_discovery/file.md)
* [srv](service_discovery/srv.md)
* [Metrics Plugins](metrics/README.md)
* [local](metrics/local.md)
* [How-to Guides](how-to-guides/README.md)
* [Stream Analytics with Materialize](how-to-guides/stream-analytics-with-materialize.md)
* [Send Apache Logs to S3](how-to-guides/apache-to-s3.md)
Expand Down
3 changes: 2 additions & 1 deletion buffer/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Buffer Plugins

Fluentd has eight \(8\) types of plugins:
Fluentd has nine \(9\) types of plugins:

* [Input](../input/)
* [Parser](../parser/)
Expand All @@ -10,6 +10,7 @@ Fluentd has eight \(8\) types of plugins:
* [Storage](../storage/)
* [Service Discovery](../service_discovery/)
* [Buffer](./)
* [Metrics](../metrics/)

This article gives an overview of Buffer Plugin.

Expand Down
3 changes: 2 additions & 1 deletion filter/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Filter Plugins

Fluentd has eight \(8\) types of plugins:
Fluentd has nine \(9\) types of plugins:

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

This article gives an overview of the Filter Plugin.

Expand Down
3 changes: 2 additions & 1 deletion formatter/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Formatter Plugins

Fluentd has eight \(8\) types of plugins:
Fluentd has nine \(9\) types of plugins:

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

This article gives an overview of the Formatter Plugin.

Expand Down
3 changes: 2 additions & 1 deletion input/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Input Plugins

Fluentd has eight \(8\) types of plugins:
Fluentd has nine \(9\) types of plugins:

* [Input](./)
* [Parser](../parser/)
Expand All @@ -10,6 +10,7 @@ Fluentd has eight \(8\) types of plugins:
* [Storage](../storage/)
* [Service Discovery](../service_discovery/)
* [Buffer](../buffer/)
* [Metrics](../metrics/)

This article gives an overview of the Input Plugin.

Expand Down
53 changes: 53 additions & 0 deletions metrics/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Metrics Plugins

Fluentd has nine \(9\) types of plugins:

* [Input](../input/)
* [Parser](../parser/)
* [Filter](../filter/)
* [Output](../output/)
* [Formatter](../formatter/)
* [Storage](../storage)
* [Service Discovery](../service_discovery/)
* [Buffer](../buffer/)
* [Metrics](./)

This article gives an overview of Metrics Plugin.
cosmo0920 marked this conversation as resolved.
Show resolved Hide resolved

## Overview

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.

## How To Use

On Fluentd core, metrics plugin will handled on `<metrics>` on `<system>` to set up easily.

Here is an example with `metrics_local`:

```text
<system>
<metrics>
@type local
</metrics>
</system>
```

## List of Built-in Metrics Plugins

* [`local`](local.md)

## List of Base Plugin classes with Metrics support

* `Fluent::Plugin::Input` for Input plugin base class
* `Fluent::Plugin::Output` for most of output plugin base class
* `Fluent::Plugin::Filter` for Filter plugin base class
* `Fluent::Plugin::MultiOutput` for [out_copy](../output/copy.md) plugin base class
* `Fluent::Plugin::BareOutput` for fluent-plugin-forest output plugin base class

## List of 3rd party metrics plugins

NOTE: This 3rd party metrics plugin list does not fully covers all of them.

* [fluent-plugin-metrics-cmetrics](https://github.com/calyptia/fluent-plugin-metrics-cmetrics)

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.
29 changes: 29 additions & 0 deletions metrics/local.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# local

The `local` metrics plugin stores the values on memory.

## Parameters

### `default_labels`

Specifies the default labels for the metrics. \(default: `{agent: "Fluentd", hostname: "#{Socket.gethostname}"}`\)

### `labels`

Specifies other custom labels for the metrics. \(default: `{}`\)

## Example

With this configuration:

```text
<system>
<metrics>
@type local
</metrics>
</system>
```

kenhys marked this conversation as resolved.
Show resolved Hide resolved
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.

kenhys marked this conversation as resolved.
Show resolved Hide resolved
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.
3 changes: 2 additions & 1 deletion output/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Output Plugins

Fluentd has eight \(8\) types of plugins:
Fluentd has nine \(9\) types of plugins:

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

This article gives an overview of the Output Plugin.

Expand Down
3 changes: 2 additions & 1 deletion parser/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Parser Plugins

Fluentd has eight \(8\) types of plugins:
Fluentd has nine \(9\) types of plugins:

* [Input](../input/)
* [Parser](./)
Expand All @@ -10,6 +10,7 @@ Fluentd has eight \(8\) types of plugins:
* [Storage](../storage/)
* [Service Discovery](../service_discovery/)
* [Buffer](../buffer/)
* [Metrics](../metrics/)

This article gives an overview of the Parser Plugin.

Expand Down
3 changes: 2 additions & 1 deletion service_discovery/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Service Discovery Plugins

Fluentd has eight \(8\) types of plugins:
Fluentd has nine \(9\) types of plugins:

* [Input](../input/)
* [Parser](../parser/)
Expand All @@ -10,6 +10,7 @@ Fluentd has eight \(8\) types of plugins:
* [Storage](../storage/)
* [Service Discovery](./)
* [Buffer](../buffer/)
* [Metrics](../metrics/)

This article gives an overview of the Service Discovery Plugin.

Expand Down
3 changes: 2 additions & 1 deletion storage/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Storage Plugins

Fluentd has eight \(8\) types of plugins:
Fluentd has nine \(9\) types of plugins:

* [Input](../input/)
* [Parser](../parser/)
Expand All @@ -10,6 +10,7 @@ Fluentd has eight \(8\) types of plugins:
* [Storage](./)
* [Service Discovery](../service_discovery/)
* [Buffer](../buffer/)
* [Metrics](../metrics/)

This article gives an overview of Storage Plugin.

Expand Down