-
What Grafana version and what operating system are you using?
Grafana Cloud -
What are you trying to achieve?
Stacked bar chart. Showing count of categories by date. -
How are you trying to achieve it?
Aggregation query to MongoDB. Following MongoDB data source for Grafana | Grafana Enterprise plugins documentation -
What happened?
500 Error. -
What did you expect to happen?
-
Can you copy/paste the configuration(s) that you are having problems with?
db.XXX.aggregate([
{ "$match": { month: { "$gte": ISODate("2022-05-01")} } },
{ "$group": { _id: { month: "$month", status:"$status"}, count: { $sum: 1 } } },
{ "$project": { "_id": 0, "time": "$_id.month", "__metric": "$_id.status", "count": 1}}
])
-
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
Query error: 500 -
Did you follow any online instructions? If so, what is the URL?
Grafana-mongo data source dotcs.
MongoDB data source for Grafana | Grafana Enterprise plugins documentation