Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I plot non-timeseries data from Mongo? #108

Open
rana13deb opened this issue Dec 9, 2020 · 3 comments
Open

Can I plot non-timeseries data from Mongo? #108

rana13deb opened this issue Dec 9, 2020 · 3 comments

Comments

@rana13deb
Copy link

This is my query. I want to plot a bar graph for se_elapsed_wall_time VS se_id

db.SessionStatus.aggregate([
{"$match": {"se_start_time": {"$gte": "$from", "$lte": "$to"}}},
{"$sort": {"se_start_time": 1}},
{"$project": { "metric": "$se_id", "value": "$se_elapsed_wall_time"}}
])

@JamesOsgood
Copy link
Owner

JamesOsgood commented Dec 10, 2020 via email

@rana13deb
Copy link
Author

Hi James,

Thank you for responding to my questions,
I know that grafana is designed to plot timeseries data and it natively does not support any non-timeseries plots.

But I have come across several demos online where people have used grafana and MySQL to plot non-timeseries graphs. I was hoping to use a similar approach to this tutorial : https://medium.com/grafana-tutorials/graphing-non-time-series-sql-data-in-grafana-8a0ea8c55ee3

I understand that MongoDB Charts will natively support what I am trying to do. But due to financial constraints I cannot use MongoDB's cloud or Enterprise version, also cannot subscribe to their MongoDB Charts.

-Ranadeep

@ghost
Copy link

ghost commented Sep 20, 2021

@rana13deb I'm also trying to plot and table non-timeseries data. I've done some digging and found a possible solution. Is this scenario relevant your issue?

The reason was that of course, I needed to use a collection that existed in my database.

db.<MY_COLLECTION_NAME>.aggregate([{"$count": "name"}])

worked.

Originally posted by @Kadrian in #89 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants