forked from grafana/grafana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'grafana/master' into heatmap-df
* grafana/master: (39 commits) LDAP: Show non-matched groups returned from LDAP (grafana#19208) plugins: expose whole rxjs to plugins (grafana#19226) SQL: Rewrite statistics query (grafana#19178) CI: Update frontend ci metrics for strict null checks grafana/ui: Add disabled prop on LinkButton (grafana#19192) Cloudwatch: Fix autocomplete for Gamelift dimensions (grafana#19145) (grafana#19146) Backend: Remove redundant condition of `ROLE_VIEWER` (grafana#19211) FieldDisplay: Update title variable syntax (grafana#19217) Docs: Note when using For and No Data in alert rule (grafana#19185) Docker: Upgrade packages to resolve reported vulnerabilities (grafana#19188) MSSQL: Revert usage of new connectionstring format (grafana#19203) Prometheus: datasource config with custom parameters string (grafana#19121) Contributing: Add guidelines for contributing docs (grafana#19108) LDAP debug page: deduplicate errors (grafana#19168) Menu: fix menu button in the mobile view (grafana#19191) Dashboard: Fixes back button styles in kiosk mode (grafana#19165) API: adds redirect helper to simplify http redirects (grafana#19180) docs: image rendering (grafana#19183) Chore: Update latest.json (grafana#19177) Chore: Update version to next (grafana#19169) ...
- Loading branch information
Showing
167 changed files
with
3,069 additions
and
1,452 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
FROM golang:latest | ||
ADD main.go / | ||
WORKDIR / | ||
RUN go build -o main . | ||
EXPOSE 3011 | ||
ENTRYPOINT ["/main"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
slow_proxy_mac: | ||
build: docker/blocks/slow_proxy_mac | ||
ports: | ||
- '3011:3011' | ||
environment: | ||
ORIGIN_SERVER: 'http://host.docker.internal:9090/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"log" | ||
"net/http" | ||
"net/http/httputil" | ||
"net/url" | ||
"os" | ||
"time" | ||
) | ||
|
||
func main() { | ||
origin := os.Getenv("ORIGIN_SERVER") | ||
if origin == "" { | ||
origin = "http://host.docker.internal:9090/" | ||
} | ||
|
||
sleep := time.Minute | ||
|
||
originURL, _ := url.Parse(origin) | ||
proxy := httputil.NewSingleHostReverseProxy(originURL) | ||
|
||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { | ||
fmt.Printf("sleeping for %s then proxying request: %s", sleep.String(), r.RequestURI) | ||
<-time.After(sleep) | ||
proxy.ServeHTTP(w, r) | ||
}) | ||
|
||
log.Fatal(http.ListenAndServe(":3011", nil)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
+++ | ||
title = "Image Rendering" | ||
description = "" | ||
keywords = ["grafana", "image", "rendering", "phantomjs"] | ||
type = "docs" | ||
aliases = ["/installation/image-rendering"] | ||
[menu.docs] | ||
parent = "admin" | ||
weight = 8 | ||
+++ | ||
|
||
# Image Rendering | ||
|
||
Grafana supports rendering of panels and dasnhboards as PNG-images. | ||
|
||
When an image is being rendered the PNG-image is temporary written to the filesystem, i.e. a sub-directory of Grafana's [data](/installation/configuration/#data) directory named `png`. | ||
|
||
A background job runs each 10 minutes and will remove temporary images. You can configure how long time an image should be stored before being removed by configuring the [temp-data-lifetime](/installation/configuration/#temp-data-lifetime) setting. | ||
|
||
## Rendering methods | ||
|
||
### PhantomJS | ||
|
||
> PhantomJS is deprecated since Grafana v6.4 and will be removed in a future release. Please migrate to Grafana image renderer plugin or remote rendering service. | ||
[PhantomJS](https://phantomjs.org/) have been the only supported and default image renderer since Grafana v2.x and is shipped with Grafana. | ||
|
||
Please note that for OSX and Windows, you will need to ensure that a phantomjs binary is available under tools/phantomjs/phantomjs. For Linux, a phantomjs binary is included - however, you should ensure that any required libraries, e.g. libfontconfig1, are available. | ||
|
||
### Grafana image renderer plugin | ||
|
||
The [Grafana image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) is a plugin that runs on the backend and handles rendering panels and dashboards as PNG-images using headless chrome. | ||
|
||
You can install it using grafana-cli: | ||
|
||
```bash | ||
grafana-cli plugins install grafana-image-renderer | ||
``` | ||
|
||
For further information and instructions refer to the [plugin details](https://grafana.com/grafana/plugins/grafana-image-renderer). | ||
|
||
### Remote rendering service | ||
|
||
The [Grafana image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) can also be run as a remote HTTP rendering service. In this setup Grafana will render an image by making a HTTP request to the remote rendering service, which in turn render the image and returns it back in the HTTP response to Grafana. | ||
|
||
To configure Grafana to use a remote HTTP rendering service, please refer to [rendering](/installation/configuration/#rendering) configuration section. | ||
|
||
## Alerting and render limits | ||
|
||
Alert notifications can include images, but rendering many images at the same time can overload the server where the renderer is running. For instructions of how to configure this, see [concurrent_render_limit](/installation/configuration/#concurrent-render-limit). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.