m3db / m3

M3 monorepo - Distributed TSDB, Aggregator and Query Engine, Prometheus Sidecar, Graphite Compatible, Metrics Platform

Home Page:https://m3db.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

r2 storagePolicies based mapping & rollup rules not working

anton-Kozlenko opened this issue · comments

I am using r2ctl to create rollup & mapping rules.

I have 3 namespaces:

  1. dafault unaggregated - with aggregationOptions that contains 15s resolution aggregation.
  2. aggregated_1m_30d
  3. aggregated_10m_550d

I used the 'createNamespace' (POST to /r2/v1/namespaces/) endpoint in r2 to add all namespaces to etcd under the '/namespaces' key (used namespace name as namespaceID).

*I created then a mapping rule with a drop policy - which worked perfectly.

Created also few rollup rules that targets my aggregated namespaces, all were successfully registered in etcd under the '/ruleset/*' key, however non of them was applied.

Request body:
{ "name": "test dynamic rollup rule", "filter": "___name__:ClusterCapacity", "targets": [ { "pipeline": [ { "rollup": { "newName": "ClusterCapacity_dynamically_rolled", "Type": 1, "tags": ["hostname"], "AggregationID": [7] }, "Type": "3" } ], "storagePolicies": [ "1m:720h" ], "resendEnabled": true } ], "keepOriginal": true }
send as http POST to /r2/v1/namespaces/aggregated_1m_30d/rollup-rules

In coordinator's logs (debug level) i see no errors, and only the drop policy rule related log.

any suggestion what i am doing wrong?

Worked after recreating rules for any storage policy by using the default namespaceID path /r2/v1/namespaces/default/rollup-rules
looks like the default ns is the only one that can be resolved by namespace.Resolver
is that the expected behaviour ?

i'd expect rules for specific namespace should be created 'under' matching namespace id key in the etcd...