-
Notifications
You must be signed in to change notification settings - Fork 0
Restore InfluxDB support by recovering implementation from git history #2
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
base: develop
Are you sure you want to change the base?
Conversation
|
@copilot Keep loooking abck to see how influx db support was implemented and see if we can patch it back in |
- Restored graphInfluxDB.py from commit 9c06dbc^ (618 lines) - Added influxdb-client to requirements.txt - Updated scheduler.py to: - Conditionally import graphInfluxDB functions when influx_db_enabled() - Added graphHandler() function to update bandwidth and latency graphs - Schedule graphHandler to run every 10 seconds when InfluxDB is enabled - Integration matches original implementation from Sept 2024 Co-authored-by: Zacgoose <[email protected]>
I've successfully restored InfluxDB support! 🎉 Investigation findings:
Changes made in commit
How to use:
The implementation is identical to what existed before removal, so it should work as it did previously. |
|
@copilot You said it hooks into TC, can you confirm what uts grabbing and whats exposed by TC hasnt chned between now and then |
Yes, confirmed! The TC (Traffic Control) integration is still compatible. What graphInfluxDB.py grabs from TC: tc -j -s qdisc show dev <interface>Required fields (always present):
Optional CAKE-specific fields (when using 'cake diffserv4'):
Verification on current system (iproute2-6.1.0): Code handles gracefully:
The restored code should work without modifications. |
Investigation confirmed InfluxDB support was removed from the implementation layer while configuration scaffolding remained. After analyzing git history, the complete working implementation was found and has been restored.
Investigation Findings
Configuration layer (already existed):
[influxdb]in example configsInfluxDbConfigstruct with full field definitionsinflux_db_enabled(),influx_db_bucket(), etc.Implementation layer (was missing, now restored):
9c06dbc8(Sept 2024)graphInfluxDB.pymodule (618 lines) has been recovered from git historyinfluxdb-clientdependency has been re-added to requirements.txtChanges Made
Restored
src/graphInfluxDB.py- Complete 618-line implementation that:Updated
requirements.txt- Added backinfluxdb-clientdependencyModified
src/scheduler.py- Re-integrated InfluxDB:influx_db_enabled()is true)graphHandler()function with proper error handling and loggingHow to Use
Enable InfluxDB in
lqos.toml:After restarting the scheduler, metrics will automatically be collected and sent to InfluxDB every 10 seconds.
Metrics Collected
The implementation is identical to what existed before removal, ensuring compatibility with existing InfluxDB dashboards and queries.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.