-
Notifications
You must be signed in to change notification settings - Fork 135
1.0: Add metrics plugin descriptions #347
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# 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. | ||
|
||
## 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> | ||
``` | ||
|
||
`local` type plugin should provide equivalent behavior before Fluentd v1.13. | ||
This metrics type should provide single numeric value storing functionality. | ||
|
||
And this `local` type plugin should be used by default. | ||
|
||
## 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# 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
|
||
Actually, @type local metrics plugin has equivalent functionality for previous single value based Ruby instance variables. | ||
This behavior will be changed by other 3rd party plugins. | ||
|
||
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.