Skip to content

openobserve/o2_report_server

Repository files navigation

O2 Report Server

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
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 = "[email protected]"
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 = "[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 -

  1. Check the CHROME env
  2. Check usual chrome file names in user path
  3. (Windows) Registry
  4. (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.