wmsegar / activegateplugin-mongodb-atlas

Dynatrace ActiveGate Plugin for MongoDB Atlas

Home Page:https://www.dynatrace.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error(could not convert string to float: 'None')

christopherdalton opened this issue · comments

Trying to set this up and get Error(results) or Error(could not convert string to float: 'None') when adding endpoint.

I am using Programmatic API Keys, with the following permission; Project Data Access Read Only.

Username is Public Key and Token is Private key.

I am assuming this is down to me attempting to use Programmatic API keys rather than user defined, is possible to update the code to use Programmatic API keys instead, since Atlas no longer allow creation of Personal API keys and they won't work after March 2021. https://docs.atlas.mongodb.com/configure-api-access

UPDATE:

Authentication clearly works, I am able to see MongoDB and the cluster I would expect in Dynatrace, however there is very little information metrics wise.

commented

UPDATE:

Authentication clearly works, I am able to see MongoDB and the cluster I would expect in Dynatrace, however there is very little information metrics wise.

Hi, I am facing the same issue. How did you manage to get the plugin to work?

I also used Public Key as username and private key as Token and got "Error(could not convert string to float: 'None')"

UPDATE:
Authentication clearly works, I am able to see MongoDB and the cluster I would expect in Dynatrace, however there is very little information metrics wise.

Hi, I am facing the same issue. How did you manage to get the plugin to work?

I also used Public Key as username and private key as Token and got "Error(could not convert string to float: 'None')"

I moved from Dynatrace to New Relic and used their integration instead, Dynatrace offer a plugin you can pay for this 3rd party one is clearly not maintained.

commented

I moved from Dynatrace to New Relic and used their integration instead, Dynatrace offer a plugin you can pay for this 3rd party one is clearly not maintained.

Ah ok thanks for letting me know. I managed to add a fix into the code (local copy).

The fix is to change this line in AtlasPlugin.py (in the root folder and the zip file) to dataPoints[-2]["value"]:

image

Dynatrace requires that the data be passed in as a number. This code is meant to change any "None" to 0 to avoid errors. It checks if the last or second last entry in the list has data. If not, it will return 0 instead of the value of the data itself (which may be None). However, due to this error, the elif case where the last and second last entries are both None returns False, and dataPoints[-2]["value"] (None) is returned instead.

I will try to add in a merge request.