---
title: Charmhub | Deploy Canonical Observability Stack Lite using Charmhub - The Open
  Operator Collection
description: Deploy the latest version of Canonical Observability Stack Lite on any
  cloud.
url: https://charmhub.io/cos-lite/docs/how-to/configure-scrape-jobs
---

##### We've discontinued the registration of new Bundles

New Bundle registrations are no longer accepted. Existing bundles remain functional. We recommend using the Juju Terraform Provider for new deployments.

[Learn more](https://discourse.charmhub.io/t/discontinuing-new-charmhub-bundle-registrations/15344)

# Canonical Observability Stack Lite

[Canonical Observability](https://charmhub.io/publisher/observability "View all packages from Canonical Observability")
| bundle

* [Canonical Observability](https://charmhub.io/publisher/observability "View all packages from Canonical Observability")
  | bundle

Platform:

stable 26

```
juju deploy cos-lite
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

---

#### Relevant links

* [Homepage](https://github.com/canonical/cos-lite-bundle)

---

#### Contacts

* [Submit a bug](https://github.com/canonical/cos-lite-bundle/issues)

---

Share your thoughts on this charm with the community on discourse.

[Join the discussion](https://discourse.charmhub.io/)

---

[Add docs to a charm](https://juju.is/docs/sdk/add-docs-to-your-charmhub-page)

By default, the Prometheus charm allows for minimal configuration of the scrape jobs created when you relate it to a remote charm. Instead, we chose to put it in an adapter/config charm, allowing for it to be used when there is a need without adding complexity to the general use case.

### Deploying the Scrape Config charm

Deploying the [prometheus-scrape-config-k8s](https://charmhub.io/prometheus-scrape-config-k8s) charm is accomplished through a single command. Here, we’ll deploy it from the edge channel:

```
$ juju deploy prometheus-scrape-config-k8s --channel latest/edge
```

Then relate it to the application you want to scrape, in this case [zinc-k8s](https://charmhub.io/zinc-k8s), as well as to Prometheus itself:

```
$ juju relate \
    prometheus-scrape-config-k8s
    zinc-k8s
$ juju relate \
    prometheus-scrape-config-k8s
    prometheus-k8s
```

With that done, you’ll now be able to tweak the configuration of the scrape job

For a list of configuration options and explanations about what they do as well as what their defaults are, we can run the `juju config` command without any configuration option:

```
$ juju config prometheus-scrape-config-k8s
```

### Changing the configuration of the scrape job

Let’s go ahead and have a look at how our scrape job currently looks:

```
$ juju show-unit prometheus-k8s/0

...
        "scrape_jobs": "[{\"metrics_path\": \"/metrics\", \"static_configs\": [{\"labels\": {\"juju_model\": \"cos\", \"juju_model_uuid\": \"c3d3aa50-aefc-4511-8a0a-af825c838b64\", \"juju_application\": \"zinc-k8s\", \"juju_charm\": \"zinc-k8s\", \"juju_unit\": \"zinc-k8s/0\"}, \"targets\": [\"10.1.14.39:3100\"]}], \"job_name\": \"juju_cos_c3d3aa50_zinc_k8s_prometheus_scrape\", \"relabel_configs\": [{\"source_labels\": [\"juju_model\", \"juju_model_uuid\", \"juju_application\", \"juju_unit\"], \"separator\": \"_\", \"target_label\": \"instance\", \"regex\": \"(.*)\"}]}]"
...
```

Then, we will set the `scrape_interval` in the prometheus-scrape-config-k8s charm:

```
$ juju config prometheus-scrape-config-k8s scrape_interval=2m
```

Let’s have a look again:

```
$ juju show-unit prometheus-k8s/0

...
        "scrape_jobs": "[{\"metrics_path\": \"/metrics\", \"static_configs\": [{\"labels\": {\"juju_model\": \"cos\", \"juju_model_uuid\": \"c3d3aa50-aefc-4511-8a0a-af825c838b64\", \"juju_application\": \"zinc-k8s\", \"juju_charm\": \"zinc-k8s\", \"juju_unit\": \"zinc-k8s/0\"}, \"targets\": [\"10.1.14.39:3100\"]}], \"job_name\": \"juju_cos_c3d3aa50_zinc_k8s_prometheus_scrape\", \"relabel_configs\": [{\"source_labels\": [\"juju_model\", \"juju_model_uuid\", \"juju_application\", \"juju_unit\"], \"separator\": \"_\", \"target_label\": \"instance\", \"regex\": \"(.*)\"}],\"scrape_interval\": \"2m\"}]"
...
```

Notice how the last part of our scrape job changed? We are now sending a non-default `scrape_interval` to Prometheus!  If we visualize our deployment as a diagram, it will now instead look like this:

---
