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
Export while in server mode #1527
Comments
For the moment, export is only available in standalone or client mode... |
Where does server mode save recorded data? In memory? |
Yes in memory. You can configure the buffer size here: https://github.com/nicolargo/glances/blob/develop/conf/glances.conf#L8-L10 |
Yes, I have seen that you can configure it. I really thought that all integration with CSV and InfluxDB and stuff like that can work on the server, that you can export all this data in real-time into those and then use them. |
By design, Glances server has a very low CPU footprint because it grab data only when a client ask for it (not every 3 seconds). If we allows user to serve and export i have to change this behavior on server side. But i hear your need. I am going to think to a new mode to mix server and export mode... Any ideas are welcomes. |
Is it possible to create 2 systemd services, for example glances.webserver and glances.exporter and use each of them according to the respective examples on https://github.com/nicolargo/glances/wiki/Start-Glances-through-Systemd ? Are there any limitations to potentially running two instances while one is the webserver? Thanks!! EDIT: |
@MetallicAchu Yes it is possible to run two Glances instances. For the CPU consumption, it is strange, on my system i am around 7% not 20%.... Try to disable the sensors plugin. |
I made 2 services, one for web server and one for export to prometheus every 10 seconds Tested for almost 20 minutes: Where 10.2 is CPU % over time run. I'll let it run for a while more and update again :) EDIT: After 3 hours CPU is steady at 10% average. I wouldn’t consider it much of a problem if only Glances could act both as a webserver and an exporter at the same time |
I wanted to update that with glances v3.2.0 I'm experiencing 2.5% CPU on average, so the change is most welcomed! |
Same use case here, I start the server and the client for the export. I think it do the job
However I noticed that with the option So I replace the client command by :
I can't try with client instance on another machine. Glances v3.2.3.1 with PsUtil v5.8.0 |
Description
It looks like it is not possible to export data when running in server mode? That is surprising because when I read it in documentation I though that is the main use case. That you can run a server daemon and configure it so that it exports everything recorded to a file for preservation. And then you can connect with a client to see current state.
It seems you have to connect with a client to export recorded data, but why couldn't just server do that as well? So then there would be no need for me to periodically connect and export.
Versions
The text was updated successfully, but these errors were encountered: