Skip to content

Commit

Permalink
Align with changes made in discovery topics
Browse files Browse the repository at this point in the history
  • Loading branch information
clayton-cornell committed Jan 21, 2025
1 parent 51ed068 commit af2631c
Showing 1 changed file with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
canonical: https://grafana.com/docs/alloy/latest/reference/components/database_observability.mysql/
description: Learn about database_observability.mysql
title: database_observability.mysql
labels:
stage: experimental
---

<span class="badge docs-labels__stage docs-labels__item">Experimental</span>

# database_observability.mysql

{{< docs/shared lookup="stability/experimental.md" source="alloy" version="<ALLOY_VERSION>" >}}
Expand All @@ -21,7 +21,7 @@ database_observability.mysql "<LABEL>" {

## Arguments

The following arguments are supported:
You can use the following arguments with `database_observability.mysql`:

Name | Type | Description | Default | Required
------------------------|----------------------|----------------------------------------------------------|---------|---------
Expand All @@ -32,7 +32,7 @@ Name | Type | Description

## Blocks

The `database_observability.mysql` component doesn't support any blocks, and is configured fully through arguments.
The `database_observability.mysql` component doesn't support any blocks. You can configure this component with arguments.

## Example

Expand All @@ -50,25 +50,33 @@ prometheus.scrape "orders_db" {
prometheus.remote_write "metrics_service" {
endpoint {
url = sys.env("GCLOUD_HOSTED_METRICS_URL")
url = sys.env("<GCLOUD_HOSTED_METRICS_URL>")
basic_auth {
username = sys.env("GCLOUD_HOSTED_METRICS_ID")
password = sys.env("GCLOUD_RW_API_KEY")
username = sys.env("<GCLOUD_HOSTED_METRICS_ID>")
password = sys.env("<GCLOUD_RW_API_KEY>")
}
}
}
loki.write "logs_service" {
endpoint {
url = sys.env("GCLOUD_HOSTED_LOGS_URL")
url = sys.env("<GCLOUD_HOSTED_LOGS_URL>")
basic_auth {
username = sys.env("GCLOUD_HOSTED_LOGS_ID")
password = sys.env("GCLOUD_RW_API_KEY")
username = sys.env("<GCLOUD_HOSTED_LOGS_ID>")
password = sys.env("<GCLOUD_RW_API_KEY>")
}
}
}
```

Replace the following:

* _`<GCLOUD_HOSTED_METRICS_URL>`_: The URL for your Google Cloud hosted metrics.
* _`<GCLOUD_HOSTED_METRICS_ID>`_: The user ID for your Google Cloud hosted metrics.
* _`<GCLOUD_RW_API_KEY>`_: Your Google Cloud API key.
* _`<GCLOUD_HOSTED_LOGS_URL>`_: The URL for your Google Cloud hosted logs.
* _`<GCLOUD_HOSTED_LOGS_ID>`_: The user ID for your Google Cloud hosted logs.

[Data Source Name]: https://github.com/go-sql-driver/mysql#dsn-data-source-name

<!-- START GENERATED COMPATIBLE COMPONENTS -->
Expand Down

0 comments on commit af2631c

Please sign in to comment.