Skip to content

kaisawind/mongodb-proxy

Repository files navigation


Kaisawind's character

GitHub release docker hub

Getting startedDocumentationContributorsLicense

Getting started

How to use

You must have your own code to process the mongo data. You can coding here <repo>/server/helper and <repo>/server/simplejson. This repo is just a demon which show how to connect mongo and grafana.

Installation

Install from code

Clone mongo-proxy from the master branch of Github repository

git clone git@github.com:kaisawind/mongodb-proxy.git

Then build the project

make build

And run the application

./bin/cmd-server

The REST Api is now listening on the port 8080, to change it just set it inside the environment variable PORT, or add flag --port.

Install from docker

Clone mongo-proxy from the master branch of Github repository

git clone git@github.com:kaisawind/mongodb-proxy.git

Then build the project and build the image

make docker

And run the image

docker run --rm -p 8080:8080 kaisawind/mongodbproxy

Install from helm

Clone mongo-proxy from the master branch of Github repository

git clone git@github.com:kaisawind/mongodb-proxy.git

Then build the project and build the image

make docker

And deploy it by helm

helm install .

Development

Use many tools to generate go source code

# go-swagger generate swagger to go code
go get -u github.com/go-swagger/go-swagger/cmd/swagger

Then just run the scripts

./scripts/swagger_gen.sh

How it works

It just convert mongodb datasource to simple json datasource, then use the plugin to insert data to grafana.

grafana关联mongodb数据库

grafana-simple-json-datasource

Contributors

License

FOSSA Status