You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Isaac Marco Blancas <is...@udima.es> on 2017/02/01 18:42:19 UTC
getting active sessions in terminal
Some way to get the the active sessions in a terminal? I need to write some
bash scripts and looking for it in the logs not always is possible. For
instance... I can't see in the logs which connection has been used when a
user connects to a balancing group.
Thank you in advance.
--
Isaac Marco Blancas
Universidad a Distancia de Madrid (UDIMA)
902 02 00 03
Re: getting active sessions in terminal
Posted by "isaac.marco" <is...@udima.es>.
It's a bit of everything. I have an affinity balancing group with just one
connection. This connection allow just one user. I want to be able to
populate a new connection to this balancing group (with sql inserts I
think) when a user connects to this available connection. What I want to
do is to create dynamically new cloned virtual machines in my Google Cloud
Engine waiting to be used for the next user. At the same time I want to
destroy and delete those virtual machines in the cloud and remove the
connection in the guacamole balancing group after five minutes a user has
disconnected.
In this way I always have just one virtual machine waiting for the next
user. Something like the apache processes pool that always are waiting for
new requests.
I need to detect which are the balancing groups with no available
connections for new users and the connections which a user abandon. I need
to monitor the connections and its state.
At the moment, monitoring users is not important for me... but would be
cool to detect logoff users and their affinity connections used to destroy
their virtual machines instances.
On Thu, 2 Feb 2017 at 11:40 Paul Cantle [via Apache Guacamole (incubating)
- Users] <ml...@n4.nabble.com> wrote:
> Hi,
>
>
>
> Are you just trying to show active sessions (i.e who’s connected) or do
> you want something like
>
>
>
> Active Sessions Connected to
>
> ---------------------- --------------------
>
>
>
> user1 Server1
>
> user4 Server1
>
> user9 Server5
>
>
>
>
>
> Or something else?
>
>
>
> Rgds
>
>
> Paul
>
>
>
> *From: *Isaac Marco Blancas <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=349&i=0>>
> *Reply-To: *"[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=349&i=1>" <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=349&i=2>>
> *Date: *Wednesday, 1 February 2017 at 18:42
> *To: *"[hidden email] <http:///user/SendEmail.jtp?type=node&node=349&i=3>"
> <[hidden email] <http:///user/SendEmail.jtp?type=node&node=349&i=4>>
> *Subject: *getting active sessions in terminal
>
>
>
> Some way to get the the active sessions in a terminal? I need to write
> some bash scripts and looking for it in the logs not always is possible.
> For instance... I can't see in the logs which connection has been used when
> a user connects to a balancing group.
>
>
>
> Thank you in advance.
>
> --
>
> Isaac Marco Blancas
> Universidad a Distancia de Madrid (UDIMA)
> 902 02 00 03
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-guacamole-incubating-users.2363388.n4.nabble.com/getting-active-sessions-in-terminal-tp348p349.html
> To start a new topic under Apache Guacamole (incubating) - Users, email
> ml-node+s2363388n1h49@n4.nabble.com
> To unsubscribe from Apache Guacamole (incubating) - Users, click here
> <http://apache-guacamole-incubating-users.2363388.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=aXNhYWMubWFyY29AdWRpbWEuZXN8MXwxMDEyMDAzMTA3>
> .
> NAML
> <http://apache-guacamole-incubating-users.2363388.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
Isaac Marco Blancas
Universidad a Distancia de Madrid (UDIMA)
902 02 00 03
--
View this message in context: http://apache-guacamole-incubating-users.2363388.n4.nabble.com/getting-active-sessions-in-terminal-tp348p352.html
Sent from the Apache Guacamole (incubating) - Users mailing list archive at Nabble.com.
Re: getting active sessions in terminal
Posted by Mike Jumper <mi...@guac-dev.org>.
On Mon, Feb 6, 2017 at 5:19 AM, isaac.marco <is...@udima.es> wrote:
> As you say if the connection ID was informed in the log when the
> connection arrives from a balancing group It will be enough for me.
>
> I think this is coded here https://github.com/apache/incubator-guacamole-
> client/blob/057a0922637c3f92c761cf26b1a6cb3d9eec8624/guacamole/src/main/
> java/org/apache/guacamole/tunnel/TunnelRequestService.java but I'm not
> very good with Java and the Guacamole API.
>
> Somebody to help me with this hack?
>
>
The underlying connection isn't exposed at that level, as the actual
balancing is left up to the auth backend. If you want to add that kind of
logging, it would need to be within the database auth itself:
https://github.com/apache/incubator-guacamole-client/blob/d7b33913797fe007c4b014e44445468eabe9b85e/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java#L677-L680
The underlying connection *is* exposed via the tracking of active
connections, but accessing that from the command line would mean
interacting with the REST services used by the web application, which would
mean embedding admin-level credentials ... which is probably not what you
want.
- Mike
Re: getting active sessions in terminal
Posted by "isaac.marco" <is...@udima.es>.
As you say if the connection ID was informed in the log when the connection
arrives from a balancing group It will be enough for me.
I think this is coded here
https://github.com/apache/incubator-guacamole-client/blob/057a0922637c3f92c761cf26b1a6cb3d9eec8624/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestService.java
but
I'm not very good with Java and the Guacamole API.
Somebody to help me with this hack?
Do any of the devs know if it’s possible to update the logging to show the
> Balancing Group ID **and** the Connection ID when a machine is connected
> to via a balancing Group?
>
>
>
> This is what is shown now:
>
>
>
> 11:12:03.957 [http-bio-8080-exec-1] INFO
> o.a.g.tunnel.TunnelRequestService - User "dave" connected to group "10".
>
>
>
> Could it be possible to have something like this:
>
>
>
> 11:12:03.957 [http-bio-8080-exec-1] INFO
> o.a.g.tunnel.TunnelRequestService - User "dave" connected to group "10",
> connection ID “17”
>
>
>
> The data is definitely available, just not sure how much work would be
> required to make it show in the logs.
>
>
>
> Cheers
>
>
> Paul
>
--
Isaac Marco Blancas
Universidad a Distancia de Madrid (UDIMA)
902 02 00 03
--
View this message in context: http://apache-guacamole-incubating-users.2363388.n4.nabble.com/getting-active-sessions-in-terminal-tp348p365.html
Sent from the Apache Guacamole (incubating) - Users mailing list archive at Nabble.com.
Re: getting active sessions in terminal
Posted by Paul Cantle <pa...@cantle.me>.
Also, I believe you’re saying that if someone just clicks the Balancing Group, only the ID for that group is specified in the logs, rather than the connection ID from that group. I agree this would make it difficult to determine which active users are connected where.
After the event is possible because the entry is logged in the Database in the guacamole_connection_history table, but of course it’s not written to until the session has ended.
Do any of the devs know if it’s possible to update the logging to show the Balancing Group ID *and* the Connection ID when a machine is connected to via a balancing Group?
This is what is shown now:
11:12:03.957 [http-bio-8080-exec-1] INFO o.a.g.tunnel.TunnelRequestService - User "dave" connected to group "10".
Could it be possible to have something like this:
11:12:03.957 [http-bio-8080-exec-1] INFO o.a.g.tunnel.TunnelRequestService - User "dave" connected to group "10", connection ID “17”
The data is definitely available, just not sure how much work would be required to make it show in the logs.
Cheers
Paul
From: "paul@cantle.me" <pa...@cantle.me>
Reply-To: "user@guacamole.incubator.apache.org" <us...@guacamole.incubator.apache.org>
Date: Thursday, 2 February 2017 at 10:39
To: "user@guacamole.incubator.apache.org" <us...@guacamole.incubator.apache.org>
Subject: Re: getting active sessions in terminal
Hi,
Are you just trying to show active sessions (i.e who’s connected) or do you want something like
Active Sessions Connected to
---------------------- --------------------
user1 Server1
user4 Server1
user9 Server5
Or something else?
Rgds
Paul
From: Isaac Marco Blancas <is...@udima.es>
Reply-To: "user@guacamole.incubator.apache.org" <us...@guacamole.incubator.apache.org>
Date: Wednesday, 1 February 2017 at 18:42
To: "user@guacamole.incubator.apache.org" <us...@guacamole.incubator.apache.org>
Subject: getting active sessions in terminal
Some way to get the the active sessions in a terminal? I need to write some bash scripts and looking for it in the logs not always is possible. For instance... I can't see in the logs which connection has been used when a user connects to a balancing group.
Thank you in advance.
--
Isaac Marco Blancas
Universidad a Distancia de Madrid (UDIMA)
902 02 00 03
Re: getting active sessions in terminal
Posted by Paul Cantle <pa...@cantle.me>.
Hi,
Are you just trying to show active sessions (i.e who’s connected) or do you want something like
Active Sessions Connected to
---------------------- --------------------
user1 Server1
user4 Server1
user9 Server5
Or something else?
Rgds
Paul
From: Isaac Marco Blancas <is...@udima.es>
Reply-To: "user@guacamole.incubator.apache.org" <us...@guacamole.incubator.apache.org>
Date: Wednesday, 1 February 2017 at 18:42
To: "user@guacamole.incubator.apache.org" <us...@guacamole.incubator.apache.org>
Subject: getting active sessions in terminal
Some way to get the the active sessions in a terminal? I need to write some bash scripts and looking for it in the logs not always is possible. For instance... I can't see in the logs which connection has been used when a user connects to a balancing group.
Thank you in advance.
--
Isaac Marco Blancas
Universidad a Distancia de Madrid (UDIMA)
902 02 00 03