To setup reports ZO_REPORT_USER_EMAIL, ZO_REPORT_USER_PASSWORD must be specified.
Following are the ENVs related to chrome and SMTP. * means required -
ENVs
| ENV | Description | Default |
|---|---|---|
| Authentication | ||
ZO_REPORT_USER_EMAIL* |
Admin user email for report server access | |
ZO_REPORT_USER_PASSWORD* |
Admin user password | |
| HTTP Server | ||
ZO_HTTP_PORT |
Port for the HTTP server | 5090 |
ZO_HTTP_ADDR |
Bind address for HTTP server | 127.0.0.1 |
| Chrome Settings | ||
ZO_CHROME_PATH |
Custom Chrome executable path | Auto-detected |
ZO_CHROME_CHECK_DEFAULT_PATH |
If `false`, it does not look for chromium in default locations (e.g. `CHROME` env, usual chrome file path etc.), Default is `true`. | |
ZO_CHROME_DOWNLOAD_PATH |
If chromium can not be found in default locations and also `ZO_CHROME_PATH` is not specified, it downloads the system specific chromium in the given path. Default is `./data/download` (gitignored). `chromium` is downloaded for the first time only, afterwords, `chromium` is fetched from the given path. If there is any error regarding download of `chromium`, delete the download folder as it might be in a bad state. | |
ZO_CHROME_NO_SANDBOX |
Disable Chrome sandbox | false |
ZO_CHROME_SLEEP_SECS |
Timeout for dashboard loading | 20 |
ZO_CHROME_WINDOW_WIDTH |
Browser window width | 1370 |
ZO_CHROME_WINDOW_HEIGHT |
Browser window height | 730 |
ZO_CHROME_ADDITIONAL_ARGS |
Additional Chrome command-line arguments (comma-separated). Use this to pass custom flags to Chrome | |
ZO_CHROME_DISABLE_DEFAULT_ARGS |
Disable Chrome's default arguments. Set to true to launch Chrome without any default command-line arguments | false |
| PDF Generation Settings | ||
ZO_PDF_LANDSCAPE |
Paper orientation. Set to true for landscape, false for portrait | true |
ZO_PDF_DISPLAY_HEADER_FOOTER |
Display header and footer in the PDF | false |
ZO_PDF_PRINT_BACKGROUND |
Print background graphics in the PDF | false |
ZO_PDF_SCALE |
Scale of the webpage rendering | 1.0 |
ZO_PDF_PAPER_WIDTH |
Paper width in inches (US Letter is 8.5) | 8.5 |
ZO_PDF_PAPER_HEIGHT |
Paper height in inches (US Letter is 11) | 11.0 |
ZO_PDF_MARGIN_TOP |
Top margin in inches (~1cm) | 0.4 |
ZO_PDF_MARGIN_BOTTOM |
Bottom margin in inches (~1cm) | 0.4 |
ZO_PDF_MARGIN_LEFT |
Left margin in inches (~1cm) | 0.4 |
ZO_PDF_MARGIN_RIGHT |
Right margin in inches (~1cm) | 0.4 |
ZO_PDF_PREFER_CSS_PAGE_SIZE |
Prefer page size as defined by CSS. If false, content will be scaled to fit paper size | false |
ZO_PDF_GENERATE_TAGGED_PDF |
Generate tagged (accessible) PDF for screen readers and assistive technologies | false |
ZO_PDF_GENERATE_DOCUMENT_OUTLINE |
Embed the document outline into the PDF for navigation | false |
| SMTP Settings | ||
ZO_SMTP_HOST* |
SMTP server host | localhost |
ZO_SMTP_PORT* |
SMTP server port | 25 |
ZO_SMTP_USER_NAME* |
SMTP authentication username | |
ZO_SMTP_PASSWORD* |
SMTP authentication password | |
ZO_SMTP_REPLY_TO |
The user email whom people can reply to. Not being used yet. | |
ZO_SMTP_FROM_EMAIL* |
The user email that is going to send the email. | |
ZO_SMTP_ENCRYPTION |
SMTP encryption method. Possible values - `starttls` and `ssltls` or can be ignored in case of `localhost:25` | |
| General Settings | ||
ZO_LOCAL_MODE |
Enable local storage mode | true |
Example ENV setup
ZO_REPORT_USER_EMAIL = "root@example.com"
ZO_REPORT_USER_PASSWORD = "Complexpass#123"
# HTTP
ZO_HTTP_PORT = 5090
ZO_HTTP_ADDR = "127.0.0.1"
ZO_HTTP_IPV6_ENABLED = false
# SMTP
ZO_SMTP_HOST = "smtp.gmail.com"
ZO_SMTP_PORT = 465 # Or 587
ZO_SMTP_USER_NAME = "mail@mail.com"
ZO_SMTP_PASSWORD = "somepassword"
ZO_SMTP_FROM_EMAIL = "mail@mail.com"
ZO_SMTP_ENCRYPTION = "ssltls" # Or "starttls"
# Chrome
# Set the chromium path
# ZO_CHROME_PATH = ".\download\win64-1045629\chrome-win\chrome.exe"
# It will automatically download system specific chromium in the `./download` folder.
# ZO_CHROME_CHECK_DEFAULT_PATH = false
ZO_CHROME_WINDOW_WIDTH = 1440
ZO_CHROME_WINDOW_HEIGHT = 730
# Additional Chrome arguments (optional)
# ZO_CHROME_ADDITIONAL_ARGS = "--disable-gpu,--disable-dev-shm-usage"
# ZO_CHROME_DISABLE_DEFAULT_ARGS = false
# PDF Generation (Optional - defaults shown)
ZO_PDF_LANDSCAPE = true
ZO_PDF_SCALE = 1.0
ZO_PDF_PAPER_WIDTH = 8.5
ZO_PDF_PAPER_HEIGHT = 11.0
ZO_PDF_MARGIN_TOP = 0.4
ZO_PDF_MARGIN_BOTTOM = 0.4
ZO_PDF_MARGIN_LEFT = 0.4
ZO_PDF_MARGIN_RIGHT = 0.4
# ZO_PDF_PRINT_BACKGROUND = false
# ZO_PDF_DISPLAY_HEADER_FOOTER = false
# ZO_PDF_PREFER_CSS_PAGE_SIZE = false
# ZO_PDF_GENERATE_TAGGED_PDF = false
# ZO_PDF_GENERATE_DOCUMENT_OUTLINE = false
On the OpenObserve part, you need to include the below ENVs -
ZO_WEB_URL = "http://localhost:5080"
ZO_REPORT_SERVER_URL = http://localhost:5090
# And if ZO_BASE_URI is present, then that also must be specified
# ZO_BASE_URI = "/abc"
Note: If you don't specify ZO_CHROME_CHECK_DEFAULT_PATH ENV, then before downloading chromium, it will look for chromium in default locations -
- Check the CHROME env
- Check usual chrome file names in user path
- (Windows) Registry
- (Windows & MacOS) Usual installations paths
So turning this ENV off forces the application to download the chromium at the specified path. Some caveats of the auto download feature -
- Does not work on linux arm platform.
- Only the chromium is downloaded, and it expects all the dependency shared libraries (e.g. libatk-bridge-2.0.so.0, libatk-1.0.so.0 etc.) required for chrome to run to be already present in the system.