---
title: Prometheus-Compatible Metrics EndEndpoints
slug: prometheus-compatible-metrics-endendpoints
docTags: 
createdAt: 2024-10-14T10:25:01.429Z
---

OpsVerse Agent can be configured to collect metrics from any HTTP endpoint that exposes exposes metrics in a Prometheus-compatible format.

### Prerequisites

- OpsVerse Agent should be able to access the HTTP Endpoint that is emitting the metrics.

## Configuration

### Kubernetes Agent

Add the following `YAML` snippet to the agent's `values.yaml` and run the agent based on these [instructions](https://docs.opsverse.io/install-the-opsverse-agent#VEqXM).

```yaml
observe-agent:
  victoria-metrics-agent:
    extraScrapeConfigs:
      - job_name: 'my_service_job'
        static_configs:
          - targets: ['http://example.com/metrics']
```

:::hint{type="warning"}
If you already have an `scrape_configs` block defined in `victoria-metrics-agent` in your values.yaml, you can simply append the job to the end of the existing config

Please ensure that the URL/target that is being configured is emitting the metrics by navigating to the URL/target in the browser.
:::

### Standalone Agent

Create a new file in `/etc/opsverse/targets/` named `your-service-name.json` and add the following details into it:

```json
[
  {
    "labels": {
      "job": "my_service_job"
    },
    "targets": [
      "http://example.com/metrics"
    ]
  }
]
```

Save this file and restart the agent and OpsVerse agent will start scraping the new endpoint as well.
