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 |
---|---|
`ZO_CHROME_PATH` | If chrome is enabled, custom `chrome` executable path can be specified. If not specified, it looks for chrome executable in default locations. If still not found, it automatically downloads a good known version of `chromium`. |
`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` | If `true`, it launches chromium in `no-sandbox` environment. Default is `false` |
`ZO_CHROME_SLEEP_SECS` | Specify the number of timeout in seconds the headless chrome will wait until all the dashboard data is loaded. Default is `20` seconds. |
`ZO_CHROME_WINDOW_WIDTH` | Specifies the width of the headless chromium browser. Default is `1370` |
`ZO_CHROME_WINDOW_HEIGHT` | Specifies the height of the headless chromium browser. Default is `730` |
`ZO_SMTP_HOST`* | The SMTP Host. Default - `localhost` |
`ZO_SMTP_PORT`* | SMTP port. Default - `25` |
`ZO_SMTP_USER_NAME`* | SMTP user name. |
`ZO_SMTP_PASSWORD`* | SMTP user 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` |
Example ENV setup
ZO_REPORT_USER_EMAIL = "[email protected]"
ZO_REPORT_USER_PASSWORD = "Complexpass#123"
# SMTP
ZO_SMTP_HOST = "smtp.gmail.com"
ZO_SMTP_PORT = 465 # Or 587
ZO_SMTP_USER_NAME = "[email protected]"
ZO_SMTP_PASSWORD = "somepassword"
ZO_SMTP_FROM_EMAIL = "[email protected]"
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
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.