-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
user-defined custom field formats for index patterns can get overwritten by Malcolm #542
Labels
bug
Something isn't working
dashboards
Relating to Malcolm's OpenSearch Dashboards interface
opensearch
Relating to Malcolm's use of OpenSearch
Milestone
Comments
mmguero
added
bug
Something isn't working
opensearch
Relating to Malcolm's use of OpenSearch
labels
Jan 6, 2025
The field format map can be retrieved like this, externally (same curl command inside the container only without the $ docker compose exec api curl -sSL 'dashboards:5601/dashboards/api/saved_objects/index-pattern/arkime_sessions3-*' | jq '.attributes.fieldFormatMap'
"{\"zeek.dns.query\":{\"id\":\"color\",\"params\":{\"parsedUrl\":{\"origin\":\"https://malcolm.seven.local.lan\",\"pathname\":\"/dashboards/app/dashboards\",\"basePath\":\"/dashboards\"},\"fieldType\":\"string\",\"colors\":[{\"range\":\"-Infinity:Infinity\",\"regex\":\"*chromecast*\",\"text\":\"#ff0000\",\"background\":\"#ffffff\"}]}}}" |
and stripping some of the parsedUrl stuff we wouldn't want to save: $ docker compose exec api curl -sSL 'dashboards:5601/dashboards/api/saved_objects/index-pattern/arkime_sessions3-*' | jq -r '.attributes.fieldFormatMap' | jq -c 'with_entries(.value.params.parsedUrl? = null | del(.value.params.parsedUrl))' | jq '@json' results in: "{\"zeek.dns.query\":{\"id\":\"color\",\"params\":{\"fieldType\":\"string\",\"colors\":[{\"range\":\"-Infinity:Infinity\",\"regex\":\"*chromecast*\",\"text\":\"#ff0000\",\"background\":\"#ffffff\"}]}},\"related.role\":{\"id\":\"color\",\"params\":{\"fieldType\":\"string\",\"colors\":[{\"range\":\"-Infinity:Infinity\",\"regex\":\"*HMI*\",\"text\":\"#54B399\",\"background\":\"#ffffff\"}]}}}" |
mmguero
added a commit
to mmguero-dev/Malcolm
that referenced
this issue
Jan 13, 2025
…ern on update of index pattern
mmguero
added a commit
to mmguero-dev/Malcolm
that referenced
this issue
Jan 13, 2025
…ern on update of index pattern
mmguero
added
the
dashboards
Relating to Malcolm's OpenSearch Dashboards interface
label
Jan 14, 2025
This was referenced Jan 17, 2025
Merged
mmguero
added a commit
to idaholab/Malcolm
that referenced
this issue
Jan 17, 2025
…ern on update of index pattern
mmguero
added a commit
to idaholab/Malcolm
that referenced
this issue
Jan 17, 2025
…ern on update of index pattern
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
dashboards
Relating to Malcolm's OpenSearch Dashboards interface
opensearch
Relating to Malcolm's use of OpenSearch
found by @ee-hex-ee
If a user goes into the index pattern and sets custom formatting:
I think what is happening is that if templates have been imported (based on the existing templates' hashes not matching the "standard" template hashes) then the index pattern gets ovewritten, which loses those settings.
I want to create/update the index pattern, but we should see if we can somehow pull out and save existing field format settings beforehand, then reapply them after the creation if they did.
The text was updated successfully, but these errors were encountered: