Grafana 104: Adding MongoDb as a Datasource in Grafana! Type of Datasources ..

Grafana-104

Mohit Shrestha
4 min readApr 28, 2020

Hello Tech Maniacs !

Grafana can visualize, explore, and alert on data from many different databases and cloud services. Each database or service type is accessed from a data source. Before you can create visualizations in Grafana, you must add a data source to it !

Each data source has a specific query editor that is customized for the features and capabilities that the particular data source exposes. The query language and capabilities of each data source are obviously very different. You can combine data from multiple data sources into a single dashboard, but each panel is connected to a specific data source that belongs to a particular organization.Use the query editor to build one or more queries in your time series database. The panel instantly updates, allowing you to effectively explore your data in real time and build a perfect query for that particular panel.

TYPE OF DATASOURCES:

Data Sources allow you to extend Grafana to connect to different databases and online sources.The following data sources are officially supported:

But there are lot of other data sources outside the world which you cannot see in the list above. Dont worry, in order to install those data sources you have to install them explicitly over your grafana instance, here are all the available data sources as of now in Grafana !

https://grafana.com/grafana/plugins?direction=asc&orderBy=weight&type=datasource

MONGODB AS A DATASOURCE:

Well as I said , there are some data sources which are provided by Grafana to pull metrics from and the one which are not available you can download and install it explicitly . But still there are some important data sources whose installation process explicitly is either not proper or there are some bugs in the explicit plugins.

Fact talk: Mongo DB is a important data source and hence no. of requests has been sent to the Grafana development team to have Mongo as a datasource available in the default installation itself only like Mysql or Cloudwatch ! But as of release 6.6.2(The last stable version) no MongoDB datasource is provided by Grafana . On surfing the internet , I came across an important Github source( Link below →)

— — — — — — — — — — — — — — — — — — — — — — — —

— — — — — — — — — — — — — — — — — — — — — — — — —

Thanks to James for his hard-work, till we get an official MongoDb data source in Grafana , this will surely be a great time saviour ! How it exactly does is it Allows MongoDB to be used as a data source for Grafana by providing a proxy to convert the Grafana Data source API into MongoDB aggregation queries.

I hope this blog helped you out !

Follow me on this Grafana series to explore more about the service and if you are unaware about my last three blogs in this series then, here are the links ! FYI , the next blog in the series will be on “AuthProxy” so stay tuned for that and many more awesome blogs !

Link to my blog Grafana-101 : https://medium.com/@mohitshrestha02/grafana-101-what-is-grafana-installing-grafana-on-linux-and-docker-744244084bd7Link to my blog Grafana-102 : https://medium.com/@mohitshrestha02/grafana-102-creating-our-first-dashboard-with-grafana-d0a49425f977Link to my blog Grafana-103 : https://medium.com/@mohitshrestha02/grafana-103-customizing-login-screen-for-grafana-playing-with-white-labels-and-many-more-1d63c23a138c

Cheers !

--

--