to count the # of guacd processes, in shell/CLI on the machine running
guacd you can run:

pgrep guacd | wc -l

if you don't have pgrep[0], then:

ps auxww | grep guacd | grep -v grep | wc -l

should do the trick.

I'm not familiar with Zabbix, but most monitoring systems allow you to
execute a command and capture it's output.

0: https://gitlab.com/procps-ng/procps

On Wed, Apr 7, 2021 at 6:12 AM Henri Alves de Godoy
<[email protected]> wrote:
>
> Hi all,
>
> I am also interested in monitoring the guacd daemon. I believe that counting 
> the number of guacd processes is simpler. Now with the Client REST API I 
> don't have programming experience for this.
>
> If anyone can make some progress and can share how the solution was made, I 
> will be very grateful.
>
> Thanks
> Henri.
>
> Em qua., 7 de abr. de 2021 às 08:12, Nick Couchman <[email protected]> 
> escreveu:
>>
>> On Wed, Apr 7, 2021 at 5:41 AM Hooge, Thomas <[email protected]> wrote:
>>>
>>> Hello,
>>>
>>> for my monitoring-system (zabbix) i want to query guacamole
>>> about e.g. current connection count and other interesting
>>> data.
>>> How do i achieve this? Is that even possible?
>>>
>>
>> There is no built-in instrumentation for guacd that would provide these 
>> results directly, but there are a couple of possible things you could do:
>> * You could query the number of running guacd processes, which should be the 
>> number of active connections + 1 (for the parent guacd process).
>> * You could query the Guacamole Client REST API for active connections. I 
>> believe Zabbix's APM functionality would accomplish this pretty easily - 
>> pulling the data sources and then the active connections per data source 
>> should be reasonably straight-forward:
>> ** When you POST to the api/tokens endpoint you get a JSON response that 
>> includes an array of the availableDataSources.
>> ** For each of the available data sources you can GET api/session/data/<data 
>> source name>/activeConnections, which will give you the current active 
>> connections for that data source.
>>
>> If you're using the JDBC module to store your connections, you just need to 
>> query using an admin user account and that should give you all of the active 
>> connections. If you're using some other module for connections - JSON or 
>> LDAP, for example - this won't be quite so straight-forward, as there isn't 
>> an admin user who can see all of the active connections for all users, so 
>> this may not give the data you want.
>>
>> -Nick
>
>
>
> --
> --
> Henri Alves Godoy
> Tecnologia da Informação e Comunicação
> Faculdade de Ciências Aplicadas - FCA
> Universidade Estadual de Campinas - UNICAMP
> Fone: (19) 3701-6682

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to