Hi All,
we have created a GRAFNA dashboard with Mongodb as data source. We are using below metrics query to get desired result and we able to fetch the right expected output.
db.perf_results.aggregate([
{ "$match" : { **"Bounded Context Name" : "$context"**, "timeStamp" : { "$gte" : "$from", "$lte" : "$to" } } },
{"$project" : { "name" : "$Bounded Context Name", "value" : "$# Samples", "ts" : "$timeStamp", "_id" : 0} }
])
However when we tried to add another filter by creating additional variable it is not fetching us anything, am i missing something in the process or is there any other way to add filter . I am using below query to add multiple filter
db.perf_results.aggregate([
{ "$match" : { **"Bounded Context Name" : "$context", "Label" : "$transaction",** "timeStamp" : { "$gte" : "$from", "$lte" : "$to" } } },
{"$project" : { "name" : "$Bounded Context Name", "value" : "$# Samples", "ts" : "$timeStamp", "_id" : 0} }
])
Regards,
Anuj