From ffc1c8f0ff5f25bbf1a21233eb70a4e1eba3b844 Mon Sep 17 00:00:00 2001 From: Gabriel MABILLE Date: Thu, 5 Oct 2023 16:40:41 +0200 Subject: [PATCH] Docs: Update auditing docs with a basic authentication example (#75981) * Docs: Update auditing docs with a basic authentication example * Add admonition for Cloud guidance Co-authored-by: Steven Dungan <114922977+stevendungan@users.noreply.github.com> * Update docs/sources/setup-grafana/configure-security/audit-grafana.md Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> --------- Co-authored-by: Steven Dungan <114922977+stevendungan@users.noreply.github.com> Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> --- .../configure-security/audit-grafana.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/sources/setup-grafana/configure-security/audit-grafana.md b/docs/sources/setup-grafana/configure-security/audit-grafana.md index a5470ff334f..f071fe3e795 100644 --- a/docs/sources/setup-grafana/configure-security/audit-grafana.md +++ b/docs/sources/setup-grafana/configure-security/audit-grafana.md @@ -19,6 +19,10 @@ weight: 800 Auditing allows you to track important changes to your Grafana instance. By default, audit logs are logged to file but the auditing feature also supports sending logs directly to Loki. +{{% admonition type="note" %}} +To enable sending Grafana Cloud audit logs to your Grafana Cloud Logs instance, please [file a support ticket](/profile/org/tickets/new). Note that standard ingest and retention rates apply for ingesting these audit logs. +{{% /admonition %}} + Only API requests or UI actions that trigger an API request generate an audit log. {{% admonition type="note" %}} @@ -426,7 +430,7 @@ The HTTP option for the Loki exporter is available only in Grafana Enterprise ve [auditing.logs.loki] # Set the communication protocol to use with Loki (can be grpc or http) type = grpc -# Set the address for writing logs to Loki (format must be host:port) +# Set the address for writing logs to Loki url = localhost:9095 # Defaults to true. If true, it establishes a secure connection to Loki tls = true @@ -441,6 +445,15 @@ If you have multiple Grafana instances sending logs to the same Loki service or - **grafana_instance** - Application URL. - **kind** - `auditing` +When basic authentication is needed to ingest logs in your Loki instance, you can specify credentials in the URL field. For example: + +```ini +# Set the communication protocol to use with Loki (can be grpc or http) +type = http +# Set the address for writing logs to Loki +url = user:password@localhost:3000 +``` + ### Console exporter Audit logs are sent to the Grafana default logger. The audit logs use the `auditing.console` logger and are logged on `debug`-level, learn how to enable debug logging in the [log configuration]({{< relref "../configure-grafana#log" >}}) section of the documentation. Accessing the audit logs in this way is not recommended for production use.