Custom Branding of logo Triggers "InvalidConfigurationError"

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Opensearch 2.16/Opensearch Dashboard 2.16
Debian Linux 12 Bookworm

Describe the issue:
We decided to try custom branding with Opensearch Dashboards following the “Custom Branding” guide. As a test, we uncommented the “logo”, defaultURL and darkmodeURL fields in the opensearchdashboard.yml file to attempt to display a custom logo. We’ve added the images into the “assets” folder as indicated in the instructions. However when we restart the Opensearch Dashboards service we receive the following error (we see these running journalctl -f):

"InvalideConfigurationError: Unknown configuration key(s): "logo", "defaultUrl", "darkModeUrl". Check for spelling errors and ensure that expected plugins are installed.\n

When we add the comment back, Opensearch Dashboards starts just fine. We haven’t modified much else and have a pretty standard install. Any help is appreciated, thanks!

Configuration:

Relevant Logs or Screenshots:

That sounds to me like a YAML indentation problem. Can you share the surrounding lines of opensearch_dashboards.yml ?

1 Like

hi, sure thing! please see below. Note that we played a bit with the indentation as if we leave the default tabs the Opensearch Dashboards fails to start at all, so we moved the indentation to the left-most column.

#opensearchDashboards.branding:
logo:
defaultUrl: “https://localhost:5601/ui/assets/asset1.png
darkModeUrl: “https://localhost:5601/ui/assets/asset1.png
# mark:
# defaultUrl: “”
# darkModeUrl: “”
# loadingLogo:
# defaultUrl: “”
# darkModeUrl: “”
# faviconUrl: “”
# applicationTitle: “”

Ok, I did a little digging around YAML indentation and discovered that it uses whitespaces and not tab indentation to make the object. I used very ordered whitespaces from the top to the bottom item and now it works perfectly! Thanks again for your help!

1 Like