---
title: Install, update, or uninstall your Prometheus OpenMetrics integration
source: https://docs.newrelic.com/docs/infrastructure/prometheus-integrations/install-configure-openmetrics/install-update-or-uninstall-your-prometheus-openmetrics-integration
---

## Docker [#docker]

### Install [#docker-install]

To install the New Relic Prometheus OpenMetrics integration in a Docker environment:

1.  Create a configuration file `config.yaml`. Use the [example configuration file](https://docs.newrelic.com/docs/integrations/prometheus-integrations/install-configure/configure-prometheus-openmetrics-integration#example-configuration-file), or look at the [`nri-prometheus-latest.yaml`](https://download.newrelic.com/infrastructure_agent/integrations/kubernetes/nri-prometheus-latest.yaml) manifest file, which includes the `nri-prometheus-cfg` config map and an example configuration.

    -   **Required:** Add your license key and a cluster name to identify your Docker container.
    -   Add the endpoints to scrape; for example, add the `http://localhost:8080/metrics` endpoint to collect metrics about the integration itself.
    -   Specify which metrics you want to ignore or include according to the prefixes for the metrics and labels. For more information, see the [metrics filtering](https://docs.newrelic.com/docs/infrastructure/prometheus-integrations/install-configure-prometheus-agent/setup-prometheus-agent/#drop-keep-metrics) documentation.

2.  Start the integration in the background:

    ```sh
    docker run -d --restart unless-stopped \
        --name nri-prometheus \
        -e LICENSE_KEY="YOUR_LICENSE_KEY" \
        -v "$(pwd)/config.yaml:/config.yaml" \
        newrelic/nri-prometheus:2.18.0
    ```

3.  Confirm the container is running properly:

    ```sh
    docker ps -f "name=nri-prometheus"
    ```

4.  Confirm that the integration has been configured correctly: Wait a few minutes, then go to the New Relic UI, and run this NRQL query to see if data has been reported:

    ```sql
    FROM Metric SELECT count(*) WHERE clusterName = 'YOUR_CLUSTER_NAME' SINCE 1 hour ago
    ```

### Update the integration [#docker-update]

To update the Prometheus OpenMetrics integration, follow the procedures for Docker as applicable:

1.  Remove the Docker container.
2.  Follow [standard installation procedures](#docker-install) to start a new Docker container.

The integration logs its current version when it starts up. To determine the running version:

```sh
docker logs nri-prometheus 2>&1 | grep "Integration version"
```

Example output:

```sh
[output] time="2019-02-26T09:21:21Z" level=info msg="Starting New Relic's Prometheus OpenMetrics Integration version 1.0.0"
```

### Uninstall [#docker-uninstall]

To uninstall the Prometheus OpenMetrics integration for Docker or Kubernetes, execute the following command:

```sh
docker rm -f nri-prometheus
```

## Kubernetes [#kubernetes]

To instrument Prometheus workloads in a Kubernetes cluster, see [Install and configure the Prometheus agent on Kubernetes clusters](https://docs.newrelic.com/docs/infrastructure/prometheus-integrations/install-configure-prometheus-agent/install-prometheus-agent).

In case you need to migrate from the Prometheus Open Metrics integration to Open Metrics check the following [migration guide](https://docs.newrelic.com/docs/infrastructure/prometheus-integrations/install-configure-prometheus-agent/migration-guide).
