diff --git a/devenv/docker/ha_test/docker-compose.yaml b/devenv/docker/ha_test/docker-compose.yaml index 8087894c56e..a215513c568 100644 --- a/devenv/docker/ha_test/docker-compose.yaml +++ b/devenv/docker/ha_test/docker-compose.yaml @@ -7,6 +7,13 @@ services: - "80:80" volumes: - /var/run/docker.sock:/tmp/docker.sock:ro + depends_on: + db: + condition: service_healthy + logging: + driver: "fluentd" + options: + tag: nginx db: image: mysql:5.6 @@ -66,6 +73,8 @@ services: # - GF_DATABASE_SSL_MODE=disable # - GF_SESSION_PROVIDER=postgres # - GF_SESSION_PROVIDER_CONFIG=user=grafana password=password host=db port=5432 dbname=grafana sslmode=disable + - GF_SERVER_ROUTER_LOGGING=true + - GF_LOG_CONSOLE_FORMAT=json - GF_LOG_FILTERS=alerting.notifier:debug,alerting.notifier.slack:debug,auth:debug - GF_AUTH_TOKEN_ROTATION_INTERVAL_MINUTES=2 ports: @@ -73,6 +82,10 @@ services: depends_on: db: condition: service_healthy + logging: + driver: "fluentd" + options: + tag: grafana prometheus: image: prom/prometheus:v2.4.2 @@ -82,3 +95,21 @@ services: - VIRTUAL_HOST=prometheus.loc ports: - 9090 + + loki: + image: grafana/loki:master + environment: + - VIRTUAL_HOST=loki.loc + ports: + - 3100 + command: -config.file=/etc/loki/local-config.yaml + + fluentd: + image: grafana/fluent-plugin-loki:master + volumes: + - ./fluentd/fluentd.conf:/fluentd/etc/fluentd.conf + links: + - loki + ports: + - "24224:24224" + - "24224:24224/udp" diff --git a/devenv/docker/ha_test/fluentd/fluentd.conf b/devenv/docker/ha_test/fluentd/fluentd.conf new file mode 100644 index 00000000000..58859441d96 --- /dev/null +++ b/devenv/docker/ha_test/fluentd/fluentd.conf @@ -0,0 +1,73 @@ + + @type forward + port 24224 + bind 0.0.0.0 + + + + @type parser + + @type json + json_parser json + + replace_invalid_sequence true + emit_invalid_record_to_error false + key_name log + reserve_data true + remove_key_name_field true + + + + @type parser + format /^.*m(?[^ ]*) (?[^ ]*) \- \- \[(? + + + @type record_transformer + remove_keys "source,t" + + + + @type copy + + @type stdout + output_type json + + + @type loki + url "http://loki:3100" + extra_labels {"app":"grafana"} + label_keys "container_name,container_id,logger" + flush_interval 10s + flush_at_shutdown true + buffer_chunk_limit 1m + + + + + @type record_transformer + + lvl "info" + + + + + @type copy + + @type stdout + output_type json + + + @type loki + url "http://loki:3100" + extra_labels {"app":"nginx"} + label_keys "container_name,container_id" + flush_interval 10s + flush_at_shutdown true + buffer_chunk_limit 1m + + \ No newline at end of file diff --git a/devenv/docker/ha_test/grafana/provisioning/datasources/datasources.yaml b/devenv/docker/ha_test/grafana/provisioning/datasources/datasources.yaml index 8d59793be16..3cf02b6a9b6 100644 --- a/devenv/docker/ha_test/grafana/provisioning/datasources/datasources.yaml +++ b/devenv/docker/ha_test/grafana/provisioning/datasources/datasources.yaml @@ -8,4 +8,9 @@ datasources: jsonData: timeInterval: 10s queryTimeout: 30s - httpMethod: POST \ No newline at end of file + httpMethod: POST + + - name: Loki + type: loki + access: proxy + url: http://loki:3100 diff --git a/devenv/docker/ha_test/prometheus/prometheus.yml b/devenv/docker/ha_test/prometheus/prometheus.yml index 0950bad6f7d..ab1711e9c6e 100644 --- a/devenv/docker/ha_test/prometheus/prometheus.yml +++ b/devenv/docker/ha_test/prometheus/prometheus.yml @@ -36,4 +36,12 @@ scrape_configs: - 'mysqld-exporter' type: 'A' port: 9104 + refresh_interval: 10s + + - job_name: 'loki' + dns_sd_configs: + - names: + - 'loki' + type: 'A' + port: 3100 refresh_interval: 10s \ No newline at end of file diff --git a/docs/sources/auth/generic-oauth.md b/docs/sources/auth/generic-oauth.md index c3c44426ba7..ac5801dbe1d 100644 --- a/docs/sources/auth/generic-oauth.md +++ b/docs/sources/auth/generic-oauth.md @@ -211,6 +211,8 @@ allowed_organizations = ## Set up OAuth2 with non-compliant providers +> Only available in Grafana v6.0 and above. + Some OAuth2 providers might not support `client_id` and `client_secret` passed via Basic Authentication HTTP header, which results in `invalid_client` error. To allow Grafana to authenticate via these type of providers, the client identifiers must be send via POST body, which can be enabled via the following settings: diff --git a/public/app/features/dashboard/dashgrid/PanelChrome.tsx b/public/app/features/dashboard/dashgrid/PanelChrome.tsx index 199a873062b..db5a6c62483 100644 --- a/public/app/features/dashboard/dashgrid/PanelChrome.tsx +++ b/public/app/features/dashboard/dashgrid/PanelChrome.tsx @@ -140,8 +140,8 @@ export class PanelChrome extends PureComponent { panelData={panelData} timeRange={timeRange} options={panel.getOptions(plugin.exports.PanelDefaults)} - width={width - 2 * variables.panelHorizontalPadding} - height={height - PANEL_HEADER_HEIGHT - variables.panelVerticalPadding} + width={width - 2 * variables.panelhorizontalpadding} + height={height - PANEL_HEADER_HEIGHT - variables.panelverticalpadding} renderCounter={renderCounter} onInterpolate={this.onInterpolate} /> diff --git a/public/sass/_variables.scss.d.ts b/public/sass/_variables.scss.d.ts index 5b44580a7aa..992dbb7bddf 100644 --- a/public/sass/_variables.scss.d.ts +++ b/public/sass/_variables.scss.d.ts @@ -1,6 +1,6 @@ export interface GrafanaVariables { - panelHorizontalPadding: number; - panelVerticalPadding: number; + panelhorizontalpadding: number; + panelverticalpadding: number; } declare const variables: GrafanaVariables;