How does the WEB-Console work?

Pseudo

New Member
Apr 6, 2023
1
0
1
Germany
I am having problems with the integrated console of the WEB Gui resetting roughly every minute or so, which is giving me a bit of trouble.

When opening the GUI via calling up a nodes IP directly and opening the console, it works without issue.
The trouble only arises when we are calling the GUI over our loadbalancer.

To configure the loadbalancer accordingly, I want to understand how the process of opening the console in the GUI works.
I would be happy to read an explanation from someone who knows this in-depth.

Thanks to anyone who can provide me with the requested information. :)
 
basically the browser opens a seperate webpage that does some basic api calls (check if the guest is on the correct node, if it's turned on etc.) and then opens a websocket to the node where you did open the web ui, which is then possibly proxied (via ssh) to the correct node
the browser application talks a very simple protocol with the backend to send the keystrokes/receive the output of the terminal

for novnc it's similar but the vnc protocol is tunneled over the websocket

for the xtermjs code, it's here: https://git.proxmox.com/?p=pve-xtermjs.git;a=summary
 
What endpoint should be used as health-check for the proxmox servers? I'm looking for something like /live and /ready in the API but I got nothing...
 
Last edited:
What endpoint should be used as health-check for the proxmox servers? I'm looking for something like /live and /ready in the API but I got nothing...
what do you mean with health check, what would you like to check?
 
Having multiple proxmox instances (in various state) behind a load balancer and wanting to pass API request to live and ready instances only, I need a simple endpoint (return 200 OK) to show that the required services on each instance is in a good state.

A proxmox instance that has no (or lost) cluster membership or is in maintenance for example should not return 200 OK on the /ready endpoint.

All load balancers I've tried only have very simple http health-check (return code or string match) so I don't see parsing multiple endpoints for cluster membership and maintenance status.

Maybe there's a way to extend the pve-proxy with a script at location /health/ready that will call the various endpoints or shell cmds needed, parse the outputs and take care of returning a success or failure.
 
ok for cluster health there is e.g. /cluster/status but it doesn't return an error if it's not quorate but rather a status info (which you could probably string match?)
see https://pve.proxmox.com/pve-docs/api-viewer/#/cluster/status
there in the api-viewer are possibly other api calls that could be interesting for you
 
Unfortunetly the /cluster/status page is not string match friendly, not for my use case anyways.
Wondering if everyone is simply using / and don't care if they reach an isolated node.
Could you point me in the general direction to extend pveproxy to add a /health/ready endpoint?
I'll try to do it and submit a pr when done.
Started looking into /usr/share/perl5/PVE/ and my head hurts... it's not for me.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!