Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[monitoring] Adding backend for influxdb2.x #274 #354

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AbhigyaShridhar
Copy link

I realized that this is a big issue and will take some time to be resolved completely so this is the initial code for it

Changes made:

  • added another backend in /home/abhigya/Documents/OpenSource/openwisp/monitoring/openwisp-monitoring/openwisp_monitoring/db/backends
  • made changes to the init file of backends to now deal with two possible backends and their different requirements
  • added initial code for the influxb2.x backend client
  • wrote initial code for a method to 'standardize' query results. This will have to be implemented for all the backends in future

I realized that this is a big issue and will take some time to be resolved completely so this is the initial code for it

Changes made:

 - added another backend in /home/abhigya/Documents/OpenSource/openwisp/monitoring/openwisp-monitoring/openwisp_monitoring/db/backends
 - made changes to the __init__ file of backends to now deal with two possible backends and their different requirements
 - added initial code for the influxb2.x backend client
 - wrote initial code for a method to 'standardize' query results. This will have to be implemented for all the backends in future
@AbhigyaShridhar
Copy link
Author

AbhigyaShridhar commented Apr 12, 2022

@nemesisdesign @pandafy

Also, as of now I am testing everything I write in a python command line shell. In order to run actual tests and set up a default user, we have to run a docker container setting up the database on a localhost. I am having trouble running the container for influxdb2 (inside the docker-compose file for this project, I ran a container outside the project directory to test my code)

The docker file should look something like this

There are two options to run a docker container for influxdb2, in 'setup' mode and in 'upgrade' mode. As per my understanding, when a user chooses influxdb2 as a backend, they have already migrated to the db, we don't need the functionality to allow users to migrate. So, we should run the container in 'setup' mode. Please let me know your thoughts on this as well. (however as of now, when I start influxdb2 container in the project directory, it doesn't work as intended and we need to figure out why)

@AbhigyaShridhar AbhigyaShridhar changed the title [monitoring] Initial commit for resolving #274 [monitoring] Adding bacend for influxdb2.x #274 Apr 16, 2022
@AbhigyaShridhar AbhigyaShridhar changed the title [monitoring] Adding bacend for influxdb2.x #274 [monitoring] Adding backend for influxdb2.x #274 Apr 17, 2022
@AbhigyaShridhar AbhigyaShridhar marked this pull request as draft April 21, 2022 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant