Thank you so much I have considered the grafana data source option but I found a plugin for mongoDb which is available only in enterprise grafana
So do you suggest me to create a data source for mongoDB in grafana ? And regarding 2 and 3 - since we use python - Is prometheus-python client API useful to directly write to prometheus ? (remote write protocol) On Fri, Jan 21, 2022 at 2:02 AM Brian Candler <[email protected]> wrote: > An "exporter" doesn't really make sense here, because an exporter only > returns the value at the current instance in time. > > Your options would be: > 1. Use the remote read > <https://prometheus.io/docs/prometheus/latest/storage/#remote-storage-integrations> > protocol to access data which is stored in MongoDB. However, I don't see > any existing MongoDB integration > <https://prometheus.io/docs/operating/integrations/#remote-endpoints-and-storage>. > In any case it would need to understand your Mongo schema to know how > timeseries are stored. > 2. Scrape the data into prometheus at the same time as you write it into > MongoDB (that is, expose the current value in an exporter, and let > prometheus scrape it) > 3. Use the remote write protocol to write into Prometheus at the same time > as you write into MongoDB, perhaps using something like vector.dev > > The problem with (2) and (3) is that you're not actually querying the data > which is stored in MongoDB at all; you're storing a *copy* of it in > Prometheus. > > It sounds to me like Prometheus is the wrong tool for the job here. > Either you should be using a grafana datasource which queries MongoDB > directly <https://grafana.com/grafana/plugins/grafana-mongodb-datasource/> > (which > I think is perfectly feasible), or you should use a different dashboard > tool (e.g. redash <https://redash.io/>). > > On Thursday, 20 January 2022 at 23:43:31 UTC [email protected] wrote: > >> Hi Team >> >> Nice to connect with you all >> >> I have my data in mongo DB - need to visualize them in grafana through >> prometheus data source >> >> I have found mongodb-exporter but it scrapes only db metrics and not the >> data >> >> Please guide on whether an exporter to scrape data is available >> > -- > You received this message because you are subscribed to the Google Groups > "Prometheus Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/d7c96615-9649-4e01-a2f0-b147ed7ab48cn%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/d7c96615-9649-4e01-a2f0-b147ed7ab48cn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAOBTUyXALPwZW4J-VEMrErTNJXi8ucUBrJ1kBagn6qbWYD%3DWRQ%40mail.gmail.com.

