# Service Discovery 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 the Service Discovery Plugin.

## Overview

Some plugins support `<service_discovery>` (e.g. [`out_forward`](/output/forward.md)). Sometimes, the service discovery for an output plugin does not meet one's needs. Fluentd has a pluggable system called Service Discovery that lets the user extend and reuse custom output service discovery.

## How To Use

Here is a simple example to update target by reading file (`/etc/fluentd/sd.yaml`) with `out_forward` and `service_discovery`:

```
<source>
  @type forward

  <service_discovery>
    @type file
    path "/etc/fluentd/sd.yaml"
  </service_discovery>
</source>
```

## List of Built-in Service Discovery

* [`static`](/service_discovery/static.md)
* [`file`](/service_discovery/file.md)
* [`srv`](/service_discovery/srv.md)

## List of Core Output Plugins with Service Discovery support

* [`out_forward`](/output/forward.md)

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/service_discovery.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.
