Malcolm
Malcolm copied to clipboard
add script for exporting dashboard
The contributor's guide gives instructions for exporting a newly created dashboard for inclusion in ./dashboards/dashboards
in the Malcolm source repository, but this would be better to be at least a script. I think ideally the script would live inside the dashboards-helper
container and could be executed using docker compose
and avoid having to have dependencies outside the container.
The script would need to:
- call the
/dashboards/api/opensearch-dashboards/dashboards/export
API to get the dashboard by ID (perhaps it could be looked up by name, but ID is surer) - remove the
arkime_sessions3-*
index pattern definition section completely - replace the string
arkime_sessions3-*
withMALCOLM_NETWORK_INDEX_PATTERN_REPLACER
andmalcolm_beats_*
withMALCOLM_OTHER_INDEX_PATTERN_REPLACER
- in my opinion, set any instances of
highlightAll
in the JSON tofalse
- return the exported/scrubbed dashboard JSON file