Giter Club home page Giter Club logo

grafana-mongodb-atlas-datasource's People

Contributors

capcawork avatar capchriscap avatar cedriccefc2002 avatar dependabot[bot] avatar ezequielgonzalezrial-ct avatar hereandnow avatar svs-valiton avatar thapakazi avatar wywywywy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grafana-mongodb-atlas-datasource's Issues

Error retrieving Disk data

Describe the bug
I'm trying to create a graph into Grafana dash show metrics from DISK_PARTITION_UTILIZATION but the problems happens with every disk metrics.
The error messages says:

failed to unmarshal JSON request into query: json: cannot unmarshal string into Go struct field DiskMeasurementsQuery.disk of type models.QueryOption

It seems the API response from Atlas is changed

To Reproduce
Just try to retrieve the specified disk metric and you get the error

Expected behavior
I'm expecting to have the data of the specified metrics

Screenshots
CleanShot 2022-12-27 at 18 29 49@2x

Desktop (please complete the following information):

  • OS: OSX
  • Browser Brave
  • Version 108

Plugin uses deprecated version of grafana's backend system

Describe the bug
grafana/grafana:latest issues a warning of plugin deprecation on startup

To Reproduce
Steps to reproduce the behavior:

  1. Install plugin in grafana/grafana with env. variables:

         - 
           name: GF_INSTALL_PLUGINS
           value: https://github.com/valiton/grafana-mongodb-atlas-datasource/releases/latest/download/grafana-mongodb-atlas-datasource.zip;grafana-mongodb-atlas-plugin
         -
           name: GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS
           value: "grafana-mongodb-atlas-datasource"
    
  2. Run as usual

Expected behavior
No errors or warnings

Screenshots
t=2020-11-06T10:30:39+0000 lvl=warn msg="Plugin uses a deprecated version of Grafana's backend plugin system which will be removed in a future release. Consider upgrading to a newer plugin version or
reach out to the plugin repository/developer and request an upgrade." logger=plugins.backend pluginId=grafana-mongodb-atlas-datasource

Additional context
Precursor warning to impending breakage of plugin in future upgrades of grafana

Datasource ignoring env proxy settings again (exactly like in issue #52)

Describe the bug
It worked fine for a while with Grafana 9.3 and Version 3.1.0-rc1,
but after update to 10.4 we get exactly the same error "Get "https://cloud.mongodb.com/api/atlas/v1.0/": dial tcp: lookup cloud.mongodb.com on 127.0.0.1:53: no such host" again, like in issue #52.

Looks like the plugin ignores the proxy setting again and tries local DNS instead of proxy DNS.

To Reproduce
see
#52

Expected behavior
see
#52
The Proxy DNS should be used instead of local DNS.

Screenshots
see
#52

Desktop (please complete the following information):

Grafana doesn't let unsigned plugins to be installed on version 7

Describe the bug
I tried to install the plugin on Grafana v 7.0 using the command mentioned in the installation part of the README.md but it doesn't install the Plugin

To Reproduce
Steps to reproduce the behavior:
1 - use the "For docker setup add the following environment variable to automatically install the plugin" part and try to install both latest version of Grafana and Plugin

Expected behavior
Based on read me I expected that I should have plugin installed on Grafana at the end but it just installs the Grafana itself and not the Plugin

Screenshots
image

Desktop:

  • OS: Windows 10
  • Docker Desktop: v 2.3.0.3

Additional context
If I try to install Grafana v 6.5.1 it works normally as expected and it installs the plugin

Question
Do you have any plan in order to sign your Plugin or not ?

Plugin doesn't work on Grafana 8

Describe the bug
On grafana 8, the plugin doesn't load correctly.

To Reproduce

  1. Install the plugin on docker (grafana/grafana:8.0.1) via the GF_INSTALL_PLUGINS env variable
  2. Create a mongo atlas data source
  3. hit save & test
  4. observe the green checkmark displayed next to a "plugin is not working" message
  5. have no data
  6. cry

Expected behavior
Plugin is saved, works, and data flows freely and bountifully

This may be related to the grafanaVersion string in src/plugin.json, which specifies 7.x.x. The grafana docs say this is deprecated and grafanaDependency should be used instead, probably set to ">=7.0.0"

Use grafana variables in query builder

Grafana Variables seems to not working in query builder to set fields like project, cluster, mongo, ...
Also this datasource should populate the variables.

Both could be very usefull to build dynamic dashboards.

Disk UI Utilization to high

Hello,

i was curious why my Disk IO utilization was over 100% while i don't really have much traffic.
If i'm correct the value in the chart is the Disk IO utilization * 100.

Grafana:
image

MongoDB atlas Metrics:
image

I' currently using this setup:
Grafana v7.1.5 (9893b8c53d)
grafana-mongodb-atlas-datasource: 2.0.0

Datasource ignoring proxy settings

Describe the bug
We are currently using the Plugin in it's latest version on our internal Grafana Cluster setup. As it is located in our internal network we use a Proxy to connect to cloud.mongodb.com. The proxy is set with environment variables and picked up by Grafana and used by other Grafana Datasources (like Prometheus, Azure, ...). Just with the Atlas Datasource it seems to ignore those settings

Error message:
Get "https://cloud.mongodb.com/api/atlas/v1.0/": dial tcp: lookup cloud.mongodb.com on 127.0.0.1:53: no such host

We tried a test Grafana installation that does not need a Proxy to access cloud.mongodb.com and there we do not have any issues.

To Reproduce
Steps to reproduce the behavior:

  1. Add a new datasource with all settings
  2. Click on 'Save & test'
  3. See error

Expected behavior
Successful access to the datasource

Screenshots
mongodb-grafana_error

Desktop (please complete the following information):

  • Grafana version: 8.2.4 Enterprise
  • Server: RHEL 7.9
  • Plugin Version: 3.0.1

Plugin fails to load on latest Grafana:

Describe the bug
We updated to the latest Grafana release. Mongo DB dashboards now fail to load. The Datasource Panel for Mongo DB fails to load the plugin.

The error in the logs on startup is

t=2020-11-15T12:27:08+0000 lvl=warn msg="Some plugins failed to load" logger=plugins errors="[plugin \"grafana-mongodb-atlas-datasource\" is unsigned]"

Support for wildcard

I currently need to spell out a separate query for each of the nodes in the cluster.

It would be nice if it would be possible to add a wildcard option for the atlas node name in the Dimension. It does already work for the metrics part (test * in the screenshot)

Something like:
image

I got an error using the plugin

Hello,

I have grafana 8.1.5 installed in my kubernetes cluster and I had installed this plugin following the steps but when I'm going to use it, I got this error:

Fetch error: 404 Instantiating https://gf.hocelot.com/public/plugins/valiton-mongodbatlas-datasource/module.js Loading plugins/valiton-mongodbatlas-datasource/module

I check the logs but I only see this:

t=2022-08-23T07:44:41+0000 lvl=info msg="Request Completed" logger=context userId=2 orgId=1 uname=user method=GET path="/public/img/icons/unicons/icon-gf icon-gf-panel.svg" status=404 remote_addr=79.116.135.61 time_ms=19 size=111469 referer=https://gf.hocelot.com/plugins/valiton-mongodbatlas-datasource/

Addition of more host process metrics

Can the following metrics be added?

COMPUTED_MEMORY
CONNECTIONS_MAX
CONNECTIONS_PERCENT
SWAP_USAGE_USED
SYSTEM_MEMORY_AVAILABLE

Adding them will assist in investigation of application misbehavior and egde cases in MongoDB Atlas, where a cluster upgrade is needed due to tier limitations.

  • References:
  1. Atlas alert host metrics:
    https://docs.atlas.mongodb.com/reference/alert-host-metrics/
  2. Atlas instance/tier limits:
    https://docs.atlas.mongodb.com/reference/atlas-limits/

Template variables issues

Description
It is not possible to use template variables for project or shard selection.

To Reproduce

  1. Create a template variable containing etither project name or project id and name it projectName
  2. Insert the variable in search filter of the project dropdown
  3. Unfocus the field to trigger the query
  4. Get the metric error

Expected behavior
User should be able to select key-values option via template variables by name or value

Additional context
Monitoring a cluster requires a lot of duplicate panels. It could be managed easier with some tamplating variables (Eg: project name and cluster namespace)

User/Personal API tokens are deprecated and can't be created anymore

Describe the bug
The credentials based on user/personal API tokens is a deprecated feature as you can see here: https://docs.atlas.mongodb.com/configure-api-access/#personal-api-keys-deprecated
For new Atlas accounts, the creation of tokens is not enabled anymore.

Meaning that this Grafana plugin can't be used.

To Reproduce
N/A

Expected behavior
Authentication to Atlas is done using programmatic API keys https://docs.atlas.mongodb.com/configure-api-access/#atlas-prog-api-key

Screenshots
N/A

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A
Additional context
N/A

Replica set configurations

First of all, amazing job made here!

I have an questions - is it possible to add an "*" on mongo selection ? because when it's running into replica-set sometimes we don't know wich mongo it's being used - i face a lot of possibilities (all my replicas) - but i want all values.. (median or something like that)

Captura de Tela 2020-05-09 às 11 13 30
This image represents what i talking about.

thank you.

problems with npm install, dep ensure and make commands

Hi,

I'm trying to install your plugin. I run Grafana on a docker container in an AWS instance and so I logged into the instance and ran:
grafana-cli --pluginUrl https://github.com/valiton/grafana-mongodb-atlas-datasource/releases/latest/download/grafana-mongodb-atlas-datasource.zip plugins install grafana-mongodb-atlas-datasource

This worked, giving me the message: ✔ Installed grafana-mongodb-atlas-datasource successfully

After this I restarted the docker container using docker restart <container_id>.

I still don't see this datasource in my grafana.

Also, the rest of the steps like npm install, dep ensure and make - I try to run them on my instance. But they just don't work. I'm new to this. Pls help me.

I've tried installing nvm and then npm. Even if that works, dep is impossible.

If you have them, can you pls send me the commands you've used.

latest version of the grafana plugin is not working

Describe the bug
I tried to install the latest version of the plugin on my local environment for testing, But it's not possible to do any configuration. See attached screenshot that I can't select values. When I access this page I get the error message from the second screenshot.

To Reproduce
Steps to reproduce the behavior:
I started the docker with the following statement:

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

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

image

Desktop (please complete the following information):

  • OS: KDE Neon 5.19
  • Browser chrome and firefox with the latest version
  • Docker version 19.03.12,

Additional context
When I try to install the plugin with version 1.1.0 it works as expected
https://github.com/valiton/grafana-mongodb-atlas-datasource/releases/download/v1.1.0/grafana-mongodb-atlas-datasource.zip

Error with Alerts

Hey, I was testing your plugin and it works pretty good except when I try to create an alert.

When I create an Alert and test the rule an error appears:
error:"tsdb.HandleRequest() error rpc error: code = Internal desc = grpc: error while marshaling: proto: repeated field Results has nil element"

I'm newbie at this so I don't really know if it's a known issue or if I did something wrong and it's my bad.

I'm using: Grafana 6.2.5 / Debian

Thanks in advance ~

Data source not showing

Grafana v6.4.4

I installed the latest version of the plugin and restart my service but this source not showing in data source.

After installing, it keeps giving {"message":"Metric request error"} when trying to query

Describe the bug

After installing and configuration, the plugin keeps giving {"message":"Metric request error"} while trying to query from data source. Although the test when setting up says its successfull.

To Reproduce
Steps to reproduce the behavior:

  1. Install plugin
  2. try query anything
  3. check network tab
  4. See error

Expected behavior

should be able to get the metrics from mongodb atlas

Screenshots
image

Desktop (please complete the following information):

  • Windows
  • Chrome
  • 10

Additional context

I found this weird error and debug log

t=2021-01-09T15:01:39+0000 lvl=dbug msg="2021-01-09T15:01:39.325Z [DEBUG] mongodb-atlas-datasource: Query: datasource=\"MongoDB Atlas Logs\" TimeRange=\"fromRaw:\"1610182898211\" toRaw:\"1610204498211\" fromEpochMs:1610182898211 toEpochMs:1610204498211 \"" logger=plugins.backend pluginId=grafana-mongodb-atlas-datasource
t=2021-01-09T15:01:39+0000 lvl=dbug msg="2021-01-09T15:01:39.325Z [DEBUG] mongodb-atlas-datasource: createRequest: queryType=query" logger=plugins.backend pluginId=grafana-mongodb-atlas-datasource
t=2021-01-09T15:01:39+0000 lvl=dbug msg="2021-01-09T15:01:39.325Z [DEBUG] mongodb-atlas-datasource: MetricQuery: queryJSON=\"{\"alias\":\"advance-mongodb-m5d.flowaccount.com:27017\",\"clusterId\":\"\",\"clusterName\":\"AdvanceDBReplicaSet\",\"database\":\"\",\"datasourceId\":8,\"dimensionId\":\"SYSTEM_CPU_STEAL\",\"dimensionName\":\"System cpu steal\",\"disk\":\"\",\"intervalMs\":20000,\"maxDataPoints\":1186,\"metricId\":\"process_measurements\",\"mongoId\":\"\",\"projectName\":\"Flowaccount.com\",\"queryType\":\"query\",\"refId\":\"A\",\"type\":\"timeserie\"}\" index=0" logger=plugins.backend pluginId=grafana-mongodb-atlas-datasource
t=2021-01-09T15:01:39+0000 lvl=dbug msg="2021-01-09T15:01:39.325Z [DEBUG] mongodb-atlas-datasource: MakeHttpRequest: URL=https://cloud.mongodb.com/api/atlas/v1.0/groups//processes//measurements" logger=plugins.backend pluginId=grafana-mongodb-atlas-datasource
t=2021-01-09T15:01:39+0000 lvl=dbug msg="2021-01-09T15:01:39.325Z [DEBUG] mongodb-atlas-datasource: MakeHttpRequest: Full URL=/api/atlas/v1.0/groups//processes//measurements?end=2021-01-09T15%3A01%3A38Z&granularity=PT1M&m=SYSTEM_CPU_STEAL&start=2021-01-09T09%3A01%3A38Z" logger=plugins.backend pluginId=grafana-mongodb-atlas-datasource
t=2021-01-09T15:01:39+0000 lvl=dbug msg="2021-01-09T15:01:39.814Z [DEBUG] mongodb-atlas-datasource: MakeHttpRequest: status code error=\"invalid status code. status: 404 Not Found\"" logger=plugins.backend pluginId=grafana-mongodb-atlas-datasource
t=2021-01-09T15:01:39+0000 lvl=eror msg="Metric request error" logger=context userId=1 orgId=1 uname=admin error="rpc error: code = Unknown desc = invalid status code. status: 404 Not Found" remote_addr=101.109.238.113
t=2021-01-09T15:01:39+0000 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=POST path=/api/tsdb/query status=500 remote_addr=101.109.238.113 time_ms=502 size=34 referer="https://grafana.flowaccount.com/d/xHREJd6Zz/system-overview?panelId=74&edit&fullscreen&orgId=1&refresh=30s"

it seems its querying twice, and at the second time the base api path is wrong.

any suggestions?

Bug detected error http 500 random

From Grafana 7.1 with the plugins valiton-mongodbatlas-datasource (version 3.0.1), it has already been detected in the plugins when you save and test, it responds fail (error http 500) after several attempts it generates an ok (http 200) towards the atlas mongo api (cluster not free).
Then in the dashboard metrics I get the same error.

``t=2022-04-01T20:42:07+0000 lvl=eror msg="Request Completed" logger=context userId=2 orgId=1 uname=[email protected] method=POST path=/api/ds/query status=500 remote_addr=35.23x.xxx.xxx time_ms=138 size=34 referer="https://grafana.ccccccc.net/d/rHfFNrcMk/atlas-mongodb?inspect=23763571993&inspectTab=error&editPanel=2&orgId=1"

Thank you.

Metric "LOGICAL_SIZE" missing

From the Atlas API path, https://cloud.mongodb.com/api/atlas/v1.0/groups/PROJECT-ID/processes/HOST:PORT/measurements I can see a "LOGICAL_SIZE" metric, and it does contain data.

However, I cannot see it in the Dimensions drop down list.

Can it be added please?

Use case: Keep an eye on the usage of M0/M2/M5 clusters and upgrade before it hits the limit.

Can't set up alarms

Describe the bug
I am trying to set up alarms based on processes measurements, but it won't work - here's the trace I've got

{
  "firing": true,
  "state": "",
  "conditionEvals": " = true",
  "timeMs": "12.534ms",
  "error": "tsdb.HandleRequest() error rpc error: code = Internal desc = grpc: error while marshaling: proto: repeated field Results has nil element",
  "logs": [
    {
      "message": "Condition[0]: Query",
      "data": {
        "from": 1583346124675,
        "queries": [
          {
            "refId": "A",
            "model": {
              "alias": "node2",
              "clusterId": "XXXXXXXXX",
              "clusterName": "XXXXXXXXX",
              "database": "",
              "dimensionId": "PROCESS_CPU_USER",
              "dimensionName": "Process cpu user",
              "disk": "",
              "metricId": "process_measurements",
              "metricName": "Process Measurements",
              "mongo": "XXXXXXXXX",
              "projectId": "5b4d2c3d970199189e096df5",
              "projectName": "XXXXXXX",
              "refId": "A"
            },
            "datasource": {
              "id": 2,
              "name": "MongoDB Atlas Logs"
            },
            "maxDataPoints": 0,
            "intervalMs": 0
          }
        ],
        "to": 1583346424675
      }
    }
  ]
}

Any clue about what's going wrong?
Alerts on the system are working with all the other datasources

thanks!

Can't see any metrics

Opening a blank issue since I don't think it's a bug.

I've just configured the datasource using API keys and am able to see the projects, clusters and shards but when I try to add a query it returns

Object
  response:Object
    message:"Metric request error"

I'm running Grafana 6.7.1 on Kubernetes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.