What’s the best way to manage the same dashboards across multiple OpenSearch instances?

0
1
Asked By MellowCedar42 On

We currently send application logs to nine OpenSearch instances. The saved objects and dashboards are almost identical across them, but each instance uses different namespaces or index names. What's the most maintainable way to manage these dashboards and keep them synchronized? Ideally, I'd like the definitions stored in Git and deployed automatically, possibly through a GitLab CI job, but I'm unsure whether there's a better approach than templating the objects and importing or updating them through the OpenSearch API.

3 Answers

Answered By BrightLynx7 On

Terraform is a good fit here. The OpenSearch provider includes resources for managing dashboard objects, so you can keep the configuration in version control and apply it consistently to each instance. It also gives you a clearer change history than manually importing saved objects.

Answered By QuietHarbor19 On

A CI pipeline can work well if you treat the exported dashboard as a generated artifact rather than the source of truth. Keep a small configuration file containing the namespace, index-pattern, and tenant-specific values, generate the final OpenSearch objects during the pipeline, and import them into a staging instance first. Once that succeeds, deploy to the remaining instances. Be careful with saved-object IDs, since changing them can break links between dashboards and panels.

Answered By SilverMeadow5 On

If possible, make the index patterns consistent across all instances by using aliases. Then the same saved-object export can often be reused everywhere without much templating. You can export the objects as NDJSON through the saved-objects API, commit that file to Git, and have the runner import the identical version into each instance.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.