# Metrics Plugins

Fluentd has nine (9) types of plugins:

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

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`:

```
<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`](/metrics/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/chronosphereio/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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fluentd.org/metrics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
