Real-Time Monitoring with InfluxDB & Grafana#250
Open
martinkuechler wants to merge 13 commits intodos-group:mainfrom
Open
Real-Time Monitoring with InfluxDB & Grafana#250martinkuechler wants to merge 13 commits intodos-group:mainfrom
martinkuechler wants to merge 13 commits intodos-group:mainfrom
Conversation
* Added docker compose file * Add InfluxDB support to controller Added optional parameters for InfluxDB configuration and implemented data export functionality to InfluxDB in finalize method. * Migrate InfluxDB to version 3 and adjust Grafana settings Updated InfluxDB service to version 3 and modified Grafana configuration. * Add files via upload * Update docker-compose.yml * preload dashboard * influxdb2 on dashbords. accessing doesnt work for some reason * Update InfluxDB and Grafana configurations to use environment variables and fixed grafana-influx connection * updated grafana dashboards, added winddata --------- Co-authored-by: Philip Kaleße <philipkalesse@Mac-mini-von-Philip.fritz.box> Co-authored-by: Martin Küchler <152016274+martinkuechler@users.noreply.github.com> Co-authored-by: martin <martinnice1379@gmail.com>
* fixed issue in sim.py * Sim funktioniert ohne problem in der INFLUX_URL muss das / am Ende weg * 2 microgrids writing into csv file * json changes for different microgrids drop down but need to fill in the name of microgrid in dropdown * dropdown working * added third microgrid for testing works fine * Add coordinates and tags to microgrid actors; update CSV logging for coordinates and tag sums * Added Map to the dashboard * feat(influx): skip CSV, stream directly to InfluxDB Replace batch export with real-time streaming: - Write data directly to InfluxDB during simulation (in step()) - Skip CSV file generation when InfluxDB is configured - Actor tags become InfluxDB tags (category=solar/wind/load) - Each actor written as individual time series point - Enables live visualization in Grafana during simulation run * cleaned up dashboard and fixed map * Readme edited * edit Monitor in README Simple scenario * README wrong microgrids deleted * Add second wind trace with stronger wind characteristics and variability - Implemented `make_berlin_wind_trace_2` function to generate a new wind trace with increased wind strength and variability. - Introduced a daily cycle with a phase shift and a stronger trend. - Added noise to the wind data for more realism. - Integrated the new wind trace into the main simulation, adding a second wind turbine actor. --------- Co-authored-by: Marc Hentschel <marc.hentschel@campus.tu-berlin.de> Co-authored-by: martin <martinnice1379@gmail.com>
…isualization tutorial
* Update ConstantSignal to StaticSignal in docs API changed in bf3f75e * bugfix for simulations without storage * updated docs structure * fixed missing prometheus_client dependency * migrated examples to executable Python scripts * simplified docs setup * renamed controller variable time -> now * update website and overview figure * cleanup * improved docs and docstrings * renamed MicrogridPolicy to Policy * added missing types and improved docstrings * removed deprecated SilActor * fully refactored controller architecture to rely on a single Mosaik entity * implemented direct access to storage/policy/actor from controller * improved controller docstrings * formatting * bugfix for empty storage simulations * split the Monitor into a MemoryLogger and CsvLogger * renamed Actor.p to Actor.power to be less cryptic * rewrote plot_microgrid_trace as plot_result_df * rewrote the docs using Material for MkDocs * updated docs dependencies + cleanup * configure readthedocs to use MkDocs * updated logo and favicon * updated docs * updated examples and unit tests * updated README.md * linting and bugfix in docs * fixed github workflows * minor update to docs * improve docstrings and convert rst links to Markdown * improved logging * fix simulation time synchronization in grid simulator * Add Monitor to imports and __all__ in __init__.py * Fix write condition in InfluxWriter to check for _write_api presence * Refactor datetime imports and clean up whitespace in InfluxWriter and Monitor classes * Add 'tag' field to actor state in TestActor --------- Co-authored-by: Otto Richter <otto@codeberg.org> Co-authored-by: Philipp Wiesner <wiesner@tu-berlin.de>
* Update ConstantSignal to StaticSignal in docs API changed in bf3f75e * bugfix for simulations without storage * updated docs structure * fixed missing prometheus_client dependency * migrated examples to executable Python scripts * simplified docs setup * renamed controller variable time -> now * update website and overview figure * cleanup * improved docs and docstrings * renamed MicrogridPolicy to Policy * added missing types and improved docstrings * removed deprecated SilActor * fully refactored controller architecture to rely on a single Mosaik entity * implemented direct access to storage/policy/actor from controller * improved controller docstrings * formatting * bugfix for empty storage simulations * split the Monitor into a MemoryLogger and CsvLogger * renamed Actor.p to Actor.power to be less cryptic * rewrote plot_microgrid_trace as plot_result_df * rewrote the docs using Material for MkDocs * updated docs dependencies + cleanup * configure readthedocs to use MkDocs * updated logo and favicon * updated docs * updated examples and unit tests * updated README.md * linting and bugfix in docs * fixed github workflows * minor update to docs * improve docstrings and convert rst links to Markdown * improved logging * fix simulation time synchronization in grid simulator * Add Monitor to imports and __all__ in __init__.py * Fix write condition in InfluxWriter to check for _write_api presence * Refactor datetime imports and clean up whitespace in InfluxWriter and Monitor classes * Add 'tag' field to actor state in TestActor --------- Co-authored-by: Otto Richter <otto@codeberg.org> Co-authored-by: Philipp Wiesner <wiesner@tu-berlin.de>
Dos group main
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Real-Time Monitoring with InfluxDB & Grafana
This PR adds real-time simulation monitoring using InfluxDB and Grafana, introduces tagging and geolocation for actors and microgrids, and refactors related components.
Monitoring Integration
Monitorcontroller streams simulation data to InfluxDB.InfluxConfigandInfluxWriter.Observability Stack
Data Model Updates
Actor: optionaltagandcoords(lat, lon), exposed in actor state.MicrogridandEnvironment: optionalcoordssupport propagated through the simulation.Code & Tests
tagin actor state.Enables real-time dashboards with structured filtering and geospatial visualization.