---
title: Default metric labels and metric attributes
source: https://docs.newrelic.com/docs/infrastructure/prometheus-integrations/install-configure-prometheus-agent/default-metric-labels-and-metric-attributes
---

# Metric labels [#metric-labels]

Labels are metadata or attributes, and there are a few sources of metric labels. In the following tables, see the sources of labels and when they are added:

**All targets**

| Label                      | Description                                                                                                           | Example                                               |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| `prometheus_server`        | Name of the Prometheus instance that scraped the metric. When you install it in Kubernetes, it's the name of the pod. | `prometheus_server: newrelic-prometheus-agent-0`      |
| `instance`                 | Host and Port of the scraped target.                                                                                  | `instance: 172.17.0.5:8083`                           |
| `job`                      | Name of the scrape job that discovered the target.                                                                    | `job: kubernetes-job-pod`                             |
| `instrumentation.name`     | Name of the New Relic instrumentation.                                                                                | `instrumentation.name: remote-write`                  |
| `instrumentation.provider` | Name of the New Relic instrumentation provider.                                                                       | `instrumentation.provider: prometheus`                |
| `instrumentation.source`   | It matches the name in `prometheus_server`.                                                                           | `instrumentation.source: newrelic-prometheus-agent-0` |
| `instrumentation.version`  | Version of the New Relic remote-write endpoint API.                                                                   | `instrumentation.version: 0.0.2`                      |
| `newrelic.source`          | Name of the New Relic instrumentation source.                                                                         | `newrelic.source: prometheusAPI`                      |

**Kubernetes targets**

| Kind          | Label                 | Description                                                  | Example                     |
| ------------- | --------------------- | ------------------------------------------------------------ | --------------------------- |
| Pod/Endpoints | `cluster_name`        | Name of the cluster defined on installation.                 | `cluster_name: my-cluster`  |
| Pod/Endpoints | `namespace`           | Namespace of the target.                                     | `namespace: default`        |
| Pod/Endpoints | `pod`                 | Name of the pod.                                             | `pod: my-pod`               |
| Pod/Endpoints | `node`                | Name of the node where the pod or the endpoints are running. | `node: minikube`            |
| Endpoints     | `service`             | Name of the endpoints service.                               | `service: my-service`       |
| Endpoints     | `YOUR_SERVICE_LABELS` | The Kubernetes labels of the endpoints service.              | `k8s_io_service: MyService` |
| Pod           | `YOUR_POD_LABELS`     | The Kubernetes labels of the pod.                            | `k8s_io_app: MyApp`         |

> #### ⚠️ IMPORTANT
>
> To comply with the [Prometheus DataModel](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels), Kubernetes label names are sanitized after scraped to replace any unsupported character to `_`. For example, the Kubernetes label `k8s.io/app` is added as `k8s_io_app`. Label values aren't modified.

# Generated metrics [#generated-metrics]

> #### 💡 TIP
>
> These metrics contain all the [metric labels](#metric-labels).

The following metrics are generated for each scraped target:

| Metric                                  | Description                                                           |
| --------------------------------------- | --------------------------------------------------------------------- |
| `up`                                    | The value will be `0` if the scrape has failed otherwise will be `1`. |
| `scrape_duration_seconds`               | Duration of the scrape.                                               |
| `scrape_samples_scraped`                | The number of samples the target exposed.                             |
| `scrape_samples_post_metric_relabeling` | The number of samples remaining after metric relabeling was applied.  |
| `scrape_series_added`                   | The approximate number of new series in this scrape.                  |
