grafana/devenv/docker/blocks/webdav
Daniel Lee 33a32df47b
imagestorage: fix templating of public_url option for webdav (#74885)
* spelling in error message

* imguploader: fix template for webdav url

Since a few years ago, when loading the config file, the  template gets replaced in the expanding
env var phase (see ##25075) and introduced a bug in the webdav public_url config option. This commit
changes the template syntax to be {{file}}. This doesn't get expanded and removed when the config file
is loaded.

* devenv: add a block for a WebDAV server

* Adding alerting as codeowners for webdav

---------

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2023-09-28 00:35:10 +03:00
..
docker-compose.yaml imagestorage: fix templating of public_url option for webdav (#74885) 2023-09-28 00:35:10 +03:00
README.md imagestorage: fix templating of public_url option for webdav (#74885) 2023-09-28 00:35:10 +03:00

README for the image storage WebDAV docker block

This block is used for testing the WebDAV option for external image storage which is used in alert notifications. This uses the simplest WebDav server that is still being maintained, a project called Dufs.

Using Dufs

Dufs has a web UI that can be accessed at http://localhost:5000 to easily see which files have been uploaded by Grafana. The config has disabled authentication and allows everyone to read and write files.

Configuring image storage in Grafana to use Dufs

An example config for external image storage with webdav enabled:

[external_image_storage]
provider = webdav

[external_image_storage.webdav]
url = http://127.0.0.1:5000/images
public_url = http://127.0.0.1:5000/images/{{file}}

; as auth is not configured in Dufs, these are just dummy values
username = test
password = test

Note: As everything runs on localhost, the image in an email notification will be broken but the link will work if you click on it and open it in your browser.