Skip to content

Support for External Database Storage (PostgreSQL & MongoDB) #42

@iyashjayesh

Description

@iyashjayesh

Description:
Currently, MoniGo is limited to local disk (tstorage) and in-memory backends. I propose adding support for external databases, specifically PostgreSQL and MongoDB, to allow for more robust data persistence.

Proposed Solution:

  • Implement the Storage interface for Postgres and MongoDB.
  • Extend the Builder API with methods like .WithPostgresStorage(url) and .WithMongoStorage(url, dbName).
  • Keep local disk storage as the default fallback.

Benefits:

  • Scalability: Supports multi-instance deployments pushing to a single database.
  • Persistence: Allows for long-term metric retention beyond local storage limits.
  • Flexibility: Users can choose between relational (Postgres) or document-based (Mongo) storage depending on their existing infrastructure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions