> For the complete documentation index, see [llms.txt](https://docs.elastiflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elastiflow.com/flowcoll/configuration/outputs.md).

# Outputs

Outputs can be figured using a global scope or within a namespaced scope. Global scope allows for one instance of an output. Namespaced scope allows for multiple instances of an output.

### Global Configuration

Global configuration only allows you to create a single instance of an output.

For example:

```shell
EF_OUTPUT_ELASTICSEARCH_ENABLE=true
```

The collector sends data to a single instance of an output.

```shell
2022-07-07T08:22:29.875-0500    info    httpoutput/httpoutput.go:98     Elasticsearch [default] Output: running
```

### Namespace Configuration

Namespaces allow multiple instances of an output for flows to be sent.

To define a namespace, include the name of your namespace after `EF_`.

For example:

To namespace a configuration defined as `EF_OUTPUT_ELASTICSEARCH_ENABLE`. Add your namespace between `EF_` and `_OUTPUT_ELASTICSEARCH_ENABLE`. As shown below:

```shell
EF_NAMESPACE1_OUTPUT_ELASTICSEARCH_ENABLE=true
EF_NAMESPACE2_OUTPUT_ELASTICSEARCH_ENABLE=true
EF_NAMESPACE3_OUTPUT_ELASTICSEARCH_ENABLE=true
```

The collector will send data to three(3) separate instances of an output.

```shell
2022-07-07T08:22:29.875-0500    info    httpoutput/httpoutput.go:98     Elasticsearch [NAMESPACE1] Output: running
2022-07-07T08:22:29.875-0500    info    httpoutput/httpoutput.go:98     Elasticsearch [NAMESPACE2] Output: running
2022-07-07T08:22:29.875-0500    info    httpoutput/httpoutput.go:98     Elasticsearch [NAMESPACE3] Output: running
```

{% hint style="info" %}
The collector must be configured with a global **OR** a namespaced configuration. Both cannot be used simultaneously.
{% endhint %}

**For example:**

When an Elasticsearch output is configured with both a global and a namespace configuration.

```shell
EF_OUTPUT_ELASTICSEARCH_ENABLE=true # global configuration
EF_NAMESPACE1_OUTPUT_ELASTICSEARCH_ENABLE=true # namespace configuration
```

NetObserv Flow will fail to start.

```shell
2022-07-07T08:27:39.536-0500    fatal   flowcoll/main.go:108    exiting flowcoll because of invalid configuration       {"code": "config/invalid", "reason": "both global and namespace environment variables cannot be used simultaneously"}
main.main
        /go/src/elastiflow.com/flowcoll/cmd/flowcoll/main.go:108
runtime.main
        /usr/local/go/src/runtime/proc.go:255
exit status 1
```

### Record types

Each output can be configured to emit only specific record types.  The available record types are:

#### flow

Data records containing flow details.  Netflow, IPFIX, and SFLOW will all produce flow records.  In order to decode the flow records, options records must also be enabled.

#### flow\_option

Records containing template information to allow decoding of flow data records.  The options records for a given device must be received before processing of the flow records from that device can occur.

#### as\_path\_hop

Extracted from flow records containing BGP AS path hops or BGP peer AS information.

#### ifa\_hop

Extracted from flow records which contain In-band Flow Analyzer (IFA) hop path information.  Currently only supported for Juniper devices.

#### telemetry

Records which contain telemetry information about network devices.  All records generated by SNMP  will be telemetry records.  Additionally some telemetry information is sent via Netflow, IPFIX, or SFLOW and is extracted into telemetry records.

#### metric

Records which contain metrics about the NetObserv collector, for example resource usage and packet processing counts.

#### log

Data records from the SNMP trap collector.

#### trace

OTEL trace records, used exclusively by the OTEL output.
