Malcolm icon indicating copy to clipboard operation
Malcolm copied to clipboard

add script for exporting dashboard

Open mmguero opened this issue 5 months ago • 0 comments

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:

  1. 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)
  2. remove the arkime_sessions3-* index pattern definition section completely
  3. replace the string arkime_sessions3-* with MALCOLM_NETWORK_INDEX_PATTERN_REPLACER and malcolm_beats_* with MALCOLM_OTHER_INDEX_PATTERN_REPLACER
  4. in my opinion, set any instances of highlightAll in the JSON to false
  5. return the exported/scrubbed dashboard JSON file

mmguero avatar Mar 13 '24 14:03 mmguero