|
| 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 | +`local` type plugin should provide equivalent behavior before Fluentd v1.13. |
| 36 | +This metrics type should provide single numeric value storing functionality. |
| 37 | + |
| 38 | +And this `local` type plugin should be used by default. |
| 39 | + |
| 40 | +## List of Built-in Metrics Plugins |
| 41 | + |
| 42 | +* [`local`](local.md) |
| 43 | + |
| 44 | +## List of Base Plugin classes with Metrics support |
| 45 | + |
| 46 | +* `Fluent::Plugin::Input` for Input plugin base class |
| 47 | +* `Fluent::Plugin::Output` for most of output plugin base class |
| 48 | +* `Fluent::Plugin::Filter` for Filter plugin base class |
| 49 | +* `Fluent::Plugin::MultiOutput` for [out_copy](../output/copy.md) plugin base class |
| 50 | +* `Fluent::Plugin::BareOutput` for fluent-plugin-forest output plugin base class |
| 51 | + |
| 52 | +## List of 3rd party metrics plugins |
| 53 | + |
| 54 | +NOTE: This 3rd party metrics plugin list does not fully covers all of them. |
| 55 | + |
| 56 | +* [fluent-plugin-metrics-cmetrics](https://github.com/calyptia/fluent-plugin-metrics-cmetrics) |
| 57 | + |
| 58 | +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. |
0 commit comments