I made it run, it works like a charm

 

I had to change localhost for real ip address

 

$ python guacamole-cli.py -a

$

$ python guacamole-cli.py -l

      username      startDate        endDate      remoteHost          connectionName  active

0    guacadmin  1518202298000  1518202391000     10.77.16.49   RADVIEW DELIMITADORES   False

1    guacadmin  1518202395000  1518202467000     10.77.16.49   RADVIEW DELIMITADORES   False

2    guacadmin  1518202406000  1518202467000     10.77.16.49             SAM CARRIER   False

3    guacadmin  1518202605000  1518204253000    13.72.69.169   RADVIEW DELIMITADORES   False

4    guacadmin  1518204268000  1518211550000    13.72.69.169   RADVIEW DELIMITADORES   False

5    guacadmin  1518202624000  1518220718000    13.72.69.169             SAM CARRIER   False

6    guacadmin  1518211566000  1518220727000    13.72.69.169   RADVIEW DELIMITADORES   False

7    guacadmin  1518484731000  1518484745000     10.77.16.49  RAD DELIMITADORES CNS4   False

8    guacadmin  1518484844000  1518484861000     10.77.16.49  RAD DELIMITADORES CNS4   False

9    guacadmin  1518484943000  1518484948000     10.77.16.49  RAD DELIMITADORES CNS4   False

10   guacadmin  1518485181000  1518485186000     10.77.16.49  RAD DELIMITADORES CNS4   False

11   guacadmin  1518485214000  1518485284000     10.77.16.49  RAD DELIMITADORES CNS4   False

12   guacadmin  1518485347000  1518485353000     10.77.16.49  RAD DELIMITADORES CNS4   False

13   guacadmin  1518485373000  1518485378000     10.77.16.49  RAD DELIMITADORES CNS4   False

14   guacadmin  1518485431000  1518485485000     10.77.16.49  RAD DELIMITADORES CNS4   False

15   guacadmin  1518486142000  1518486395000     10.77.16.49  RAD DELIMITADORES CNS4   False

16   guacadmin  1518486533000  1518487093000    13.72.69.169   RADVIEW DELIMITADORES   False

17   guacadmin  1518487352000  1518487426000    13.72.69.169  RAD DELIMITADORES CNS4   False

18   guacadmin  1518487432000  1518487720000    13.72.69.169  RAD DELIMITADORES CNS4   False

19   guacadmin  1518487743000  1518487878000    13.72.69.169  RAD DELIMITADORES CNS4   False

20   guacadmin  1518487884000  1518487987000    13.72.69.169  RAD DELIMITADORES CNS4   False

21   guacadmin  1518487997000  1518488230000    13.72.69.169  RAD DELIMITADORES CNS4   False

22   guacadmin  1518487266000  1518488285000    13.72.69.169   RADVIEW DELIMITADORES   False

23   guacadmin  1518536189000  1518536897000    13.72.69.169  RAD DELIMITADORES CNS4   False

24   guacadmin  1518537562000  1518537571000    13.72.69.169  RAD DELIMITADORES CNS4   False

25   guacadmin  1518542839000  1518542875000    13.72.69.169  RAD DELIMITADORES CNS4   False

26   guacadmin  1518543122000  1518543129000    13.72.69.169  RAD DELIMITADORES CNS4   False

27   guacadmin  1518543157000  1518545793000    13.72.69.169  RAD DELIMITADORES CNS4   False

28   guacadmin  1518545806000  1518545836000    13.72.69.169  RAD DELIMITADORES CNS4   False

29   guacadmin  1518545872000  1518546018000    13.72.69.169  RAD DELIMITADORES CNS4   False

..         ...            ...            ...             ...                     ...     ...

970    jloyola  1521137008000  1521137040000    13.72.69.118             SAM CARRIER   False

971     121002  1521136198000  1521137049000   10.105.131.88    NEC MERIDA qclient42   False

972    jloyola  1521137059000  1521137091000    13.72.69.118             SAM CARRIER   False

973    jloyola  1521137124000  1521137156000    13.72.69.118             SAM CARRIER   False

974    jloyola  1521137188000  1521137220000    13.72.69.118             SAM CARRIER   False

975    jloyola  1521137237000  1521137269000    13.72.69.118             SAM CARRIER   False

976    jloyola  1521137285000  1521137317000    13.72.69.118             SAM CARRIER   False

977    jloyola  1521137344000  1521137376000    13.72.69.118             SAM CARRIER   False

978    jloyola  1521137397000  1521137429000    13.72.69.118             SAM CARRIER   False

979    jloyola  1521137464000  1521137496000    13.72.69.118             SAM CARRIER   False

980    jloyola  1521137518000  1521137550000    13.72.69.118             SAM CARRIER   False

981    jloyola  1521137566000  1521137598000    13.72.69.118             SAM CARRIER   False

982    jloyola  1521137614000  1521137646000    13.72.69.118             SAM CARRIER   False

983    jloyola  1521137662000  1521137694000    13.72.69.118             SAM CARRIER   False

984    jloyola  1521137746000  1521137778000    13.72.69.118             SAM CARRIER   False

985    jloyola  1521137794000  1521137826000    13.72.69.118             SAM CARRIER   False

986    1000494  1521137069000  1521137865000  10.105.131.167    NEC MERIDA qclient42   False

987    jloyola  1521137852000  1521137884000    13.72.69.118             SAM CARRIER   False

988    jloyola  1521137902000  1521137934000    13.72.69.118             SAM CARRIER   False

989    jloyola  1521137950000  1521137982000    13.72.69.118             SAM CARRIER   False

990    jloyola  1521137998000  1521138030000    13.72.69.118             SAM CARRIER   False

991    jloyola  1521138046000  1521138078000    13.72.69.118             SAM CARRIER   False

992    jloyola  1521138094000  1521138126000    13.72.69.118             SAM CARRIER   False

993    jloyola  1521138142000  1521138174000    13.72.69.118             SAM CARRIER   False

994    jloyola  1521138190000  1521138222000    13.72.69.118             SAM CARRIER   False

995    jloyola  1521138238000  1521138270000    13.72.69.118             SAM CARRIER   False

996    jloyola  1521138286000  1521138318000    13.72.69.118             SAM CARRIER   False

997    jloyola  1521138334000  1521138366000    13.72.69.118             SAM CARRIER   False

998    jloyola  1521138382000  1521138414000    13.72.69.118             SAM CARRIER   False

999    1000740  1521133871000  1521138415000   10.105.131.51             RAD CNS4 32   False

 

[1000 rows x 6 columns]

 

 

Thanks a lot for your valuable help.

 

Regards

 

De: Gabriel Huerta Araujo [mailto:huertaga@globalhitss.com]
Enviado el: martes, 06 de noviembre de 2018 04:42 p.m.
Para: 'user@guacamole.apache.org'
Asunto: RE: Help to solve a requirement about active connections vs configured connection

 

Thanks for your valuable help

 

I made it run, but this error arises

 

$ python guacamole-cli.py -a

Traceback (most recent call last):

  File "guacamole-cli.py", line 83, in <module>

    myLoginData = login('gabriel','gabriel')

  File "guacamole-cli.py", line 27, in login

    loginResponse = urllib2.urlopen(loginRequest)

  File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen

    return opener.open(url, data, timeout)

  File "/usr/lib/python2.7/urllib2.py", line 429, in open

    response = self._open(req, data)

  File "/usr/lib/python2.7/urllib2.py", line 447, in _open

    '_open', req)

  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain

    result = func(*args)

  File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open

    return self.do_open(httplib.HTTPConnection, req)

  File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open

    raise URLError(err)

urllib2.URLError: <urlopen error [Errno 111] Connection refused>

 

 

And I am using user who I access to web application with

 

 

I made these changes

 

#guacbase = "https://localhost/guacamole"

guacbase = http://localhost/ga

 

 

# Login

#myLoginData = login('guacuser','guacpass')

myLoginData = login('gabriel','gabriel')

 

What seems to be the problem?

 

Regards.

 

 

 

De: Gabriel Huerta Araujo [mailto:huertaga@globalhitss.com]
Enviado el: jueves, 01 de noviembre de 2018 07:28 p.m.
Para: user@guacamole.apache.org
Asunto: RE: Help to solve a requirement about active connections vs configured connection

 

Thank you so much Nick

 

I’ll check it. If I had a doubt I hope I can continue asking about this matter.

 

Meanwhile have a great night.

 

Regards

 

De: Nick Couchman [mailto:vnick@apache.org]
Enviado el: jueves, 01 de noviembre de 2018 06:02 p.m.
Para:
user@guacamole.apache.org
Asunto: Re: Help to solve a requirement about active connections vs configured connection

 

I appreciate your soon answer. If I wanted this information in real time? And in an automatic way without accessing to Guacamole web application?

 

The web application is based on a REST API, so retrieving the data displayed on this page should be relatively easy.  I don't recall which API endpoint that page calls off the top of my head, but it should be pretty easy to track it down by watching the calls in one of the browser developer consoles, or by digging through the AngularJS code that defines these pages. The data is all returned in JSON format so it should be pretty easy to write some coffee to retrieve it.

 

Actually, once upon a time I wrote the beginnings of a Python script that handled some of these adminstrative tasks.  Code is in repo below - it is probably a little out of date against the current Guacamole code, but should at least get you started.

 

https://github.com/necouchman/guacamole-python

 

 

-Nick

 

Libre de virus. www.avg.com