Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/valiton/grafana-mongodb-atlas-datasource

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/valiton/grafana-mongodb-atlas-datasource

  • v2.1.0+incompatible
  • Source
  • Go
  • Socket score

Version published
Created
Source

Grafana MongoDB Atlas Logs Datasource

MongoDB Atlas allows to fetch logs from their service. More information can be found here: https://docs.atlas.mongodb.com/reference/api/logs/

This plugin allows to fetch process, database and disk logs from MongoDB Atlas in your Grafana dashboard. This allows you to monitor your whole MongoDB Atlas infrastructure within your grafana dashboards.

Installation

Important Note: grafana-mongodb-atlas-datasource is renamed to mongodb-atlas-datasource. Please update the import command correspondingly or stay with v1

Grafana Setup

You can load the latest plugin version with the following command:

grafana-cli --pluginUrl https://github.com/valiton/grafana-mongodb-atlas-datasource/releases/v2.0.0/download/mongodb-atlas-datasource.zip plugins install mongodb-atlas-datasource

Please note that we currently only build for linux. If you have a windows machine, then you have to update the Makefile accordingly

For docker setup add the following environment variable to automatically install the plugin:

docker run -p 3000:3000 \
  -e GF_INSTALL_PLUGINS="https://github.com/valiton/grafana-mongodb-atlas-datasource/releases/download/v2.0.0/mongodb-atlas-datasource.zip;mongodb-atlas-datasource" \
  -e "GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=mongodb-atlas-datasource" \
  grafana/grafana

For more information about the plugin installation have a look at the plugin official documentation.

Dev setup

This plugin requires node > 8.10 and dep

npm install # install JavaScript dependencies
dep ensure  # install go dependencies
make        # build JavaScript frontend and Go backend

Usage

Create datasource

After installing the datasource in Grafana (see Grafana Setup section), you can create a Grafana datasource.

Select MongoDB Atlas Logs datasource from list

Please enter here your Atlas email address and the Atlas API token in the two input fields and click on enter. If the credentials are valid, you will see a green info box. For more information, have a look at the MongoDB Atlas documentation to create these credentials.

Enter your MongoDB Atlas credentials to the form

Create Panel

After setting up the datasource, you are able to create a query for a Grafana panel. You have to first select here the project you want to monitor and the cluster. After that, you can select one of three different metrics:

  1. Process logs,
  2. Database logs and
  3. Disk logs

Next, you are asked different other parameters, such as the database name and then you can select the dimension you want to display in the query. To name the query, please use the alias input. You can use {{name}} to use metrics or dimensions for the name (see hint field of alias for more information).

Enter parameters for your MongoDB Atlas Query

Limitations

  • Annotations are not supported yet

Contributing

Pull requests for new features, bug fixes, and suggestions are welcome!

Release

1. Add Release Notes to Changelog in README.md

2. Update version in src/plugin.json

3. Update package.json version

4. Create Tag with format vx.y.z

We use semversion format for tagging the releases.´

5. Create Relase Zip

make
zip -r mongodb-atlas-datasource.zip ./dist

6. Create Release with zip files as attachment

see https://help.github.com/en/articles/creating-releases for more information

Changelog

License

MIT

FAQs

Package last updated on 05 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc