---
title: Apache Traffic Server integration
source: https://docs.newrelic.com/docs/infrastructure/host-integrations/host-integrations-list/apache-traffic-server-monitoring-integration
---

Our Apache Traffic Server integration monitors the performance of your Apache Traffic Server HTTP/HTTPS traffic can be forwarded or reverse proxyed in either or both directions, providing both performance and scalability.

![Apache Traffic Server dashboard](https://docs.newrelic.com/images/infrastructure_screenshot-full_apache-traffic-server-dashboard.webp "Apache Traffic Server dashboard")

After setting up our Apache Traffic Server, you can install a dashboard for your Apache Traffic Server metrics.

## Install the infrastructure agent [#infra]

To get data into New Relic, install our infrastructure agent. Our infrastructure agent collects and ingests data so you can keep track of your app's performance. The version should be 1.10.7 or higher to support NRI-Flex integration.

You can install the infrastructure agent two different ways:

-   Our [guided install](https://one.newrelic.com/nr1-core?state=4f81feab-35f7-e97e-9903-52510f8542bd) is a CLI tool that inspects your system and installs the infrastructure agent alongside the application monitoring agent that best works for your system. To learn more about how our guided install works, check out our [Guided install overview](https://docs.newrelic.com/docs/infrastructure/host-integrations/installation/new-relic-guided-install-overview).
-   If you'd rather install our infrastructure agent manually, you can follow a tutorial for manual installation for [Linux](https://docs.newrelic.com/docs/infrastructure/install-infrastructure-agent/linux-installation/install-infrastructure-monitoring-agent-linux), [Windows](https://docs.newrelic.com/docs/infrastructure/install-infrastructure-agent/windows-installation/install-infrastructure-monitoring-agent-windows/), or [macOS](https://docs.newrelic.com/docs/infrastructure/install-infrastructure-agent/macos-installation/install-infrastructure-monitoring-agent-macos/).

## Install Apache New Relic Agent

Our Apache integrations collects network metrics like TCP connections, DNS lookup, HTTPS, SSL, and server and worker statuses.
To install the integration, follow the steps in our [guided install](https://one.newrelic.com/launcher/nr1-core.explorer?pane=eyJuZXJkbGV0SWQiOiJucjEtY29yZS5saXN0aW5nIn0=&cards%5B0%5D=eyJuZXJkbGV0SWQiOiJucjEtaW5zdGFsbC1uZXdyZWxpYy5ucjEtaW5zdGFsbC1uZXdyZWxpYyIsInBhdGgiOiJvaGkiLCJyZWNpcGVOYW1lIjoiYXBhY2hlLW9wZW4tc291cmNlLWludGVncmF0aW9uIiwiYWN0aXZlQ29tcG9uZW50IjoiVlRTT0NvbW1hbmQiLCJhY3RpdmVFbnZpcm9ubWVudCI6ImFwYWNoZS1vcGVuLXNvdXJjZS1pbnRlZ3JhdGlvbiJ9).
If you need to install the integration in a different way, see [Apache monitoring integration](https://docs.newrelic.com/docs/infrastructure/host-integrations/host-integrations-list/apache-monitoring-integration/).

## Expose your metrics

After successful installation, Apache Traffic Server has to be started successfully, then it should start running on a `your_ip` with port `8080`. You need to configure the metrics exposed stats.

1.  Go to the `plugin.config` file:
    ```shell
    sudo nano /etc/trafficserver/plugin.config
    ```
2.  Add the below line in your `plugin.config` file.
    ```
    stats_over_http.so
    ```
3.  Make sure your metrics are exposed on the below URL.

    Metrics of your Apache Traffic Server: `http://YOUR_IP:8080/_stats`

## Configure NRI-Flex for Apache Traffic Server [#integrate]

Flex comes bundled with the New Relic infrastructure agent. To create a flex configuration file follow these steps:

1.  Go to the `integrations.d` directory:

    ```shell
    cd /etc/newrelic-infra/integrations.d
    ```

2.  Create three files named `nri-flex-apache-traffic-server-config.yml`, `nri-flex-ats-cache-config.yml`, and `nri-flex-ats-http-config.yml`.

The value on the `event_type` is used to store metrics on the NRDB. Your files should look like this:

`nri-flex-apache-traffic-server-config.yml`:

```yml
integrations:
  - name: nri-flex
    interval: 30s
    config:
      name: ApcheTrafficServerMetrics
      apis:
        - event_type: ATSSampleMetrics
          url: http://YOUR_IP:8080/_stats 
          remove_keys:
            - http
            - cache
```

`nri-flex-ats-cache-config.yml`:

```yml
integrations:
  - name: nri-flex
    interval: 30s
    config:
      name: ATSCacheMetrics
      apis:
        - event_type: ATSCacheSampleMetrics
          url: http://YOUR_IP:8080/_stats 
          keep_keys:
          	- cache
```

`nri-flex-ats-http-config.yml`:

```yml
integrations:
  - name: nri-flex
    interval: 30s
    config:
      name: ApcheTrafficServerMetrics
      apis:
        - event_type: ATSHttpSampleMetrics
          url: http://YOUR_IP:8080/_stats 
          keep_keys:
          	- http
```

## Forward Apache Traffic Server logs to New Relic

You can use our [log forwarding](https://docs.newrelic.com/docs/logs/forward-logs/forward-your-logs-using-infrastructure-agent/) to forward Apache Traffic Server logs to New Relic.

On Linux machines, your log file named `logging.yml` should be present in this path:

```shell
cd /etc/newrelic-infra/logging.d/
```

After creating the log file, add the following script to the `logging.yml` file:

```yml
logs:
  - name: manager
    file: /var/log/trafficserver/manager.log
    attributes:
      logtype: ats_manager_logs
  - name: diags
    file: /var/log/trafficserver/diags.log
    attributes:
      logtype: ats_diags_logs 
```

## Restart the New Relic infrastructure agent

Before you can start reading your data, use the instructions in our [infrastructure agent docs](https://docs.newrelic.com/docs/infrastructure/install-infrastructure-agent/manage-your-agent/start-stop-restart-infrastructure-agent/) to restart your infrastructure agent.

```shell
sudo systemctl restart newrelic-infra.service
```

In a couple of minutes, your Apache Traffic Server will send metrics to [one.newrelic.com](https://one.newrelic.com).

## Find your data

You can choose our pre-built dashboard template named `Apache Traffic Server` to monitor your Apache Traffic Server server metrics. Follow these steps to use our pre-built dashboard template:

1.  From [one.newrelic.com](https://one.newrelic.com), go to the **+ Integrations & Agents** page.
2.  Click on **Dashboards**.
3.  In the search bar, type `Apache Traffic Server`.
4.  The Apache Traffic Server dashboard should appear. Click on it to install it.

Your Apache Traffic Server dashboard is considered a custom dashboard and can be found in the **Dashboards** UI. For docs on using and editing dashboards, see [our dashboard docs](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/introduction-dashboards).

Here is a NRQL query to check the cache total misses from the Apache Traffic Server:

```sql
SELECT latest(global.proxy.process.cache_total_misses) AS 'cache misses' FROM ATSCacheSampleMetrics
```

## What's next?

To learn more about building NRQL queries and generating dashboards, check out these docs:

-   [Introduction to the query builder](https://docs.newrelic.com/docs/query-your-data/explore-query-data/query-builder/introduction-query-builder) to create basic and advanced queries.
-   [Introduction to dashboards](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/introduction-dashboards) to customize your dashboard and carry out different actions.
-   [Manage your dashboard](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/manage-your-dashboard) to adjust your dashboards display mode, or to add more content to your dashboard.
