m3 icon indicating copy to clipboard operation
m3 copied to clipboard

Prometheus integration uses hard coded value for M3DB namespace

Open nerd0 opened this issue 8 years ago • 4 comments

Currently the Prometheus integration defaults to a metrics namespace for the coordinator to emit data to. This is not configurable thus requiring the user to strictly stick a generic namespace. To allow a bit more flexibility using configuration.

coordinator:
  listenAddress: 0.0.0.0:7201

  metrics:
    prometheus:
      handlerPath: /metrics
    sanitization: prometheus
    samplingRate: 1.0
    extended: detailed

  dbNamespace: foo

nerd0 avatar May 29 '18 14:05 nerd0

@nikunjgit would mind commenting on this feature addition to the coordinator?

nerd0 avatar May 29 '18 16:05 nerd0

We should definitely have this. However, maybe figure out where to put this field in the config ? Eg: do you want it within coordinator: section or db: section ?

nikunjgit avatar May 29 '18 18:05 nikunjgit

@nikunjgit fyi - a database has a 1-many relationship with namespaces, the config for this lives in KV.

The ingest path needs to pick which cluster/namespace to write to based on retention policies. This makes sense to be configurable within the coordinator.

For the query path, the following needs to happen: (a) something that resolves query -> [](id, []retention policy) (b) per id, going from []retention policy -> retention policy

Once the index supports stored fields, (a) will be part of the index. Till that time, the coordinator has to allow users to specify which namespace to hit per query. (b) will always need to be done by the coordinator.

prateek avatar May 29 '18 19:05 prateek

Commit addresses the issue.

nerd0 avatar Jun 05 '18 15:06 nerd0