ArpNetworking / metrics-cluster-aggregator

Apache License 2.0
2 stars 6 forks source link

Application Fails to Start without a Database #11

Open matthayter opened 8 years ago

matthayter commented 8 years ago

Specifically, if the block in the configuration is missing:

"metrics_clusteragg": {
      "jdbcUrl": "jdbc:h2:/opt/cluster-aggregator/data/metrics:clusteragg;AUTO_SERVER=TRUE;AUTO_SERVER_PORT=7067;MODE=PostgreSQL;INIT=create schema if not exists clusteragg;DB_CLOSE_DELAY=-1",
      "driverName": "org.h2.Driver",
      "username": "sa",
      "password": "secret",
      "maximumPoolSize": 2,
      "minimumIdle": 2,
      "idleTimeout": 0,
      "modelPackages": [ "com.arpnetworking.clusteraggregator.models.ebean" ]
    },

... then the application will not start, throwing a Guice unable-to-initialize type error. This DB (AFAIK) is only used for Circonus Sinks.

Ideally, the application should be able to run without this configuration if no Circonus sinks are in use.

vjkoskela commented 8 years ago

Edited issue title; the database is not Circonus specific, although that was one of the few active use cases for it at Groupon. The database should be lazy initialized and therefore the configuration block only needed if it is used. However, I suspect that you @matthayter will actually want to use this once you have the reporting subsystem completed in order to better monitor your clients. This will require a database. Were there any reasons related to this project that prompted its removal?

vjkoskela commented 6 years ago

@BrandonArp I believe you made the database optional; can this be closed?

vjkoskela commented 6 years ago

@BrandonArp have you confirmed this was fixed?