Skip to content

Commit c367b79

Browse files
committed
Update database_observability README examples
Updated Alloy config examples to remove the mysql `perf_schema.eventswaits` collector.
1 parent 06860dd commit c367b79

File tree

1 file changed

+6
-6
lines changed
  • internal/component/database_observability

1 file changed

+6
-6
lines changed

internal/component/database_observability/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ GRANT UPDATE ON performance_schema.setup_consumers TO 'db-o11y'@'%';
111111

112112
and additionally enable these options:
113113

114-
```
114+
```alloy
115115
database_observability.mysql "mysql_<your_DB_name>" {
116116
enable_collectors = ["query_samples"]
117117
@@ -150,7 +150,7 @@ As noted in the step above, these consumers will be disabled again when the data
150150

151151
3. Copy this block for each DB you'd like to monitor.
152152

153-
```
153+
```alloy
154154
local.file "mysql_secret_<your_DB_name>" {
155155
filename = "/var/lib/alloy/mysql_secret_<your_DB_name>"
156156
is_secret = true
@@ -227,7 +227,7 @@ prometheus.scrape "database_observability_mysql_<your_DB_name>" {
227227

228228
4. Add Prometheus remote_write and Loki write config, if not present already. From the Grafana Cloud home, click on your stack and view URLs under Prometheus and Loki details where API tokens may also be generated.
229229

230-
```
230+
```alloy
231231
prometheus.remote_write "metrics_service" {
232232
endpoint {
233233
url = sys.env("GCLOUD_HOSTED_METRICS_URL")
@@ -279,7 +279,7 @@ extraConfig: |
279279
280280
This is a complete example of Alloy Database Observability configuration using two different databases:
281281
282-
```
282+
```alloy
283283
prometheus.remote_write "metrics_service" {
284284
endpoint {
285285
url = sys.env("GCLOUD_HOSTED_METRICS_URL")
@@ -453,7 +453,7 @@ GRANT pg_read_all_data TO "db-o11y";
453453

454454
3. Copy this block for each DB you'd like to monitor.
455455

456-
```
456+
```alloy
457457
local.file "postgres_secret_<your_DB_name>" {
458458
filename = "/var/lib/alloy/postgres_secret_<your_DB_name>"
459459
is_secret = true
@@ -537,7 +537,7 @@ prometheus.scrape "database_observability_postgres_<your_DB_name>" {
537537

538538
4. Add Prometheus remote_write and Loki write config, if not present already. From the Grafana Cloud home, click on your stack and view URLs under Prometheus and Loki details where API tokens may also be generated.
539539

540-
```
540+
```alloy
541541
prometheus.remote_write "metrics_service" {
542542
endpoint {
543543
url = sys.env("GCLOUD_HOSTED_METRICS_URL")

0 commit comments

Comments
 (0)