Druid Metric Spec - What is wrong with mine?

Here is a sample spec I am using for indexing Druid Metrics back into Druid using Tranquility API -

{
“dataSources” : {
“DruidMetrics” : {
“spec” : {
“dataSchema” : {
“dataSource” : “DruidMetrics”,
“parser” : {
“type” : “string”,
“parseSpec” : {
“timestampSpec” : {
“column” : “timestamp”,
“format” : “auto”
},
“dimensionsSpec” : {
“dimensions”:[ ],
“dimensionExclusions” : [
“timestamp”,
“value”
]
},
“format” : “json”
}
},
“granularitySpec” : {
“type” : “uniform”,
“segmentGranularity” : “HOUR”,
“queryGranularity” : “MINUTE”
},
“metricsSpec” : [
{
“type” : “count”,
“name” : “count”
},
{
“name” : “sum”,
“type” : “doubleSum”,
“fieldName” : “value”
},
{
“fieldName” : “value”,
“name” : “min”,
“type” : “doubleMin”
},
{
“type” : “doubleMax”,
“name” : “max”,
“fieldName” : “value”
}
]
},
“ioConfig” : {
“type” : “realtime”
},
“tuningConfig” : {
“type” : “realtime”,
“maxRowsInMemory” : “100000”,
“intermediatePersistPeriod” : “PT10M”,
“windowPeriod” : “PT10M”
}
},
“properties” : {
“task.partitions” : “1”,
“task.replicants” : “1”
}
}
},
“properties” : {
“zookeeper.connect” : “ny-stream-016:2181”,
“druid.discovery.curator.path” : “/druid/discovery”,
“druid.selectors.indexing.serviceName” : “druid/overlord”
}
}

``

Can someone please tell me if this spec is valid and correct?

My Issue # Pivot shows correct values for Count but Sum / Min / Max values are wrong.

How do I get average of the numbers ?

Thanks!

Hi Jagadeesh,

The ‘value’ in that datasource only makes sense if you filter on one of the values in the metric dimension. With out that filter you are looking at non-sense across all measures.

sure, thanks! Gian helped me with the same!