---
title: Vector output sink for log forwarding
source: https://docs.newrelic.com/docs/logs/forward-logs/vector-output-sink-log-forwarding
---

If your log data is already being monitored by [Vector](https://vector.dev/), you can use our [Vector output sink](https://vector.dev/docs/reference/configuration/sinks/new_relic/) to forward and enrich your log data in New Relic.

Forwarding your Vector logs to New Relic will give you enhanced log management capabilities to collect, process, explore, query, and alert on your log data.

## Configure the Vector logs sink for New Relic [#configure-sink]

To forward your logs from Vector to New Relic:

1.  Make sure you have:

    -   A New Relic license key
    -   Vector version 0.7.0 or higher

2.  Follow the procedures to [configure the Vector logs sink for New Relic](https://vector.dev/docs/reference/configuration/sinks/new_relic/).

3.  Add a snippet to your `vector.yaml` file (located in `/etc/vector` by default), replacing `YOUR_LICENSE_KEY` with your New Relic license key:

    ```yaml
    # Ingest data by tailing one or more files

    sources:
      my_source_id:
        type: file
        ignore_older_secs: 86400
        host_key: "ip-111-11-11-11.internal"
        include:
          - /tmp/error*.log

    # Configure sink to forward events to New Relic

    sinks:
      dotnet_logs:
        type: new_relic
        inputs:
          - my_source_id
        account_id: "12345"
        api: logs
        license_key: "YOUR_LICENSE_KEY"

    # OPTIONAL
    #healthcheck = true                   # default
    ```

4.  Restart the Vector service to ensure your changes are applied.

## Test the Vector logs sink [#test-sink]

To test if your Vector logs sink is forwarding events to New Relic:

1.  Run the following command to append a test log message to your log file:

    ```shell
    echo "test message" >> /PATH/TO/YOUR/LOG/FILE
    ```

2.  Search our [logs UI](https://one.newrelic.com/launcher/logger.log-launcher) for your test message.

## View log data [#find-data]

If everything is configured correctly and your data is being collected, you should see log data in both of these places:

-   Our [logs UI](https://one.newrelic.com/launcher/logger.log-launcher)
-   Our tools for running [NRQL queries](https://docs.newrelic.com/docs/chart-builder/use-chart-builder/choose-data/use-advanced-nrql-mode-specify-data). For example, you can execute a query like this:

```sql
SELECT * FROM Log
```

If no data appears after you enable our log management capabilities, follow our [standard log troubleshooting procedures](https://docs.newrelic.com/docs/logs/log-management/troubleshooting/no-log-data-appears-ui/).

## What's next? [#what-next]

Explore logging data across your platform with our [logs UI](https://docs.newrelic.com/docs/logs/log-management/ui-data/use-logs-ui/).

-   Get deeper visibility into both your application and your platform performance data by forwarding your logs with our [logs in context](https://docs.newrelic.com/docs/logs/enable-log-management-new-relic/configure-logs-context/configure-logs-context-apm-agents/) capabilities.
-   Set up [alerts](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-alert-conditions/).
-   [Query your data](https://docs.newrelic.com/docs/query-your-data/explore-query-data/get-started/introduction-querying-new-relic-data/) and [create dashboards](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/introduction-dashboards/).

## Disable log forwarding [#disable]

To disable log forwarding capabilities, follow standard procedures in [Vector logs sink documentation](https://vector.dev/docs/reference/configuration/sinks/new_relic/). You do not need to do anything else in New Relic.
