Commit 67ea8758 by Joan López de la Franca Beltran Committed by GitHub

Chore: Add Enterprise dependencies (#29994)

* Docs: update auditing docs

* Chore: Add Enterprise dependencies

* Apply suggestions from code review

Co-authored-by: Agnès Toulet <agnes.toulet@gmail.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
parent 375e8e4f
......@@ -14,6 +14,7 @@ Auditing allows you to track important changes to your Grafana instance. By defa
## Audit logs
Audit logs are JSON objects representing user actions like:
- Modifications ro resources such as dashboards and data sources.
- A user failing to log in.
......@@ -22,7 +23,7 @@ Audit logs are JSON objects representing user actions like:
Audit logs contain the following fields. The fields followed by **\*** are always available, the others depends on the type of action logged.
| Field name | Type | Description |
| ---------- | ---- | ----------- |
| ----------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `timestamp`\* | string | The date and time the request was made, in coordinated universal time (UTC) using the [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.6) format. |
| `user`\* | object | Information about the user that made the request. At least one of the `UserID` / `ApiKeyID` fields will not be empty if `isAnonymous=false`. |
| `user.userId` | number | ID of the Grafana user that made the request. |
......@@ -148,11 +149,15 @@ max_file_size_mb = 256
### Loki exporter
Audit logs are sent to a [Loki](/oss/loki/) service.
Audit logs are sent to a [Loki](/oss/loki/) service, through HTTP or gRPC.
> The HTTP option for the Loki exporter is only available in Grafana Enterprise v7.4+.
```ini
[auditing.logs.loki]
# Set the URL for writing logs to 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)
url = localhost:9095
# Defaults to true. If true, it establishes a secure connection to Loki
tls = true
......
......@@ -20,6 +20,7 @@ require (
github.com/benbjohnson/clock v0.0.0-20161215174838-7dc76406b6d3
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b
github.com/centrifugal/centrifuge v0.13.0
github.com/cortexproject/cortex v1.4.1-0.20201022071705-85942c5703cf
github.com/crewjam/saml v0.4.6-0.20201227203850-bca570abb2ce
github.com/davecgh/go-spew v1.1.1
github.com/denisenkom/go-mssqldb v0.0.0-20200620013148-b91950f658ec
......@@ -43,7 +44,7 @@ require (
github.com/gosimple/slug v1.4.2
github.com/grafana/grafana-plugin-model v0.0.0-20190930120109-1fc953a61fb4
github.com/grafana/grafana-plugin-sdk-go v0.79.0
github.com/grafana/loki v1.6.0
github.com/grafana/loki v1.6.2-0.20201026154740-6978ee5d7387
github.com/grpc-ecosystem/go-grpc-middleware v1.2.1
github.com/hashicorp/go-hclog v0.12.2
github.com/hashicorp/go-plugin v1.2.2
......@@ -93,7 +94,7 @@ require (
google.golang.org/grpc v1.33.1
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
gopkg.in/ini.v1 v1.51.0
gopkg.in/ini.v1 v1.57.0
gopkg.in/ldap.v3 v3.0.2
gopkg.in/macaron.v1 v1.3.9
gopkg.in/mail.v2 v2.3.1
......
......@@ -5,6 +5,7 @@ import (
// remove the cron (v1) dependency
_ "github.com/beevik/etree"
_ "github.com/cortexproject/cortex/pkg/util"
_ "github.com/crewjam/saml"
_ "github.com/gobwas/glob"
"github.com/grafana/grafana/pkg/registry"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment