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

Enhancements for "glances --browser" #951

Closed
yuri-ccp opened this issue Oct 28, 2016 · 6 comments
Closed

Enhancements for "glances --browser" #951

yuri-ccp opened this issue Oct 28, 2016 · 6 comments

Comments

@yuri-ccp
Copy link

yuri-ccp commented Oct 28, 2016

Description:

I was testing "glances --browser" and I found it a great feature to help to fast monitor a couple of servers. But theres some things that could be enhanced, I will list my suggestions bellow:

  • A auto-connect support:

Every time I open the "glances --browser" I have to manually enter and exit in each server to connect to they. Only after this the server data in the list starts to update. It would be much more fast and easier to put the Glances to connect to all server on start instead.

  • A auto-reconnect support:

I use the internet to list the most of servers, so sometimes I lose the connection to a server and it shows as off-line in Glances. I would be very nice if a auto-reconnect option in glances.conf to allow enable the reconnection, the number of attempts and the interval.

  • A text color and highlight per item per server:

Currently the "glances --browser" colorizes the entire line of the server based on status. But the ideal is that each item have their own color/highlight independently based on careful/warning/critical configs for each server (and if my #950 suggestion be accept with bells too). => Will be implemented in #977

@nicolargo
Copy link
Owner

nicolargo commented Oct 28, 2016

Happy to learn that users use this feature ! :)

Some questions/remarks regarding your enhancement request:

  • auto-connect support: the default behavior is to connect to the available Glances server, grab the stats and display it, without any human action. If Glances server is protected by a password, this last one should be entered through the user interface or the configuration file (documentation here).

Note: also reproduce: configure two statics server in the glances.conf file. Start Glances with the --browser mode. The stats are not refreshed until i click on 'enter'.

Note: There is a technical reason (see https://github.com/nicolargo/glances/blob/develop/glances/client_browser.py#L103-L105)

  • auto-reconnect support: Glances try to grab the servers stats every seconds. If one of the server is offline, it will be display in red. It it restart, it will become green at the next refresh.

So for those firsts two points, you describe exactly how Glances is supposed to work... What version of Glances do you use ?

For the last point, it's a very good idea. I will implement it in a future release.

@yuri-ccp
Copy link
Author

I'm using Glances 2.7.1, currently my servers keep in this state all the time until I try to access each of them:

5 Glances servers available

Name LOAD CPU% MEM% STATUS IP OS
Servidor-01 ? ? ? UNKNOWN 127.0.0.1 ?
Servidor-02 ? ? ? UNKNOWN x.x.x.x ?
Servidor-03 ? ? ? UNKNOWN x.x.x.x ?
Servidor-07 ? ? ? UNKNOWN x.x.x.x ?
WebRadio ? ? ? UNKNOWN x.x.x.x ?

I masked the IPs for security. All theses servers are configured in glances.conf, because zeroconf is not an option for me.

@nicolargo
Copy link
Owner

nicolargo commented Nov 1, 2016

Note: There is a technical reason.

Do not retreive stats for statics server
Why ? Because for each offline servers, the timeout will be reached
So ? The curse interface freezes

@yuri-ccp
Copy link
Author

yuri-ccp commented Nov 7, 2016

So the problem is that as the Glances browser is mono-threaded, if I have for example 10 off-line servers, it will wait all the 10 servers to timeout (the sum of them) before refresh, is it?

This is not a case to open a new thread for each server instead and them populate a list that will be read by the browser (main process) in each refresh process?

@nicolargo
Copy link
Owner

Hi @yuri-ccp , i just push a commit (468623c) in the DEVELOP branch to use multi-thread instead of mono.
Can you try it on your system ?

@yuri-ccp
Copy link
Author

Sorry for the delay.

I tested the browser from develop branch for a week (while i'm keeping it opened during about 10 hours) and with 10 remote servers without any problems.

The refresh stays fast and working fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants