Page 1 of 1

[RESOLVED] Error in retrieving information from the listening_timestamp field

Published: July 20, 2021 - 4:51 PM
by mviale
Good morning,

I'm trying to make a query that retrieves the version of a software program and the last connection date of the PC via the listening_timestamp field
However, this field only shows me the date 01/07, which corresponds to the migration date to Wapt Enterprise. When I go to one of the computers in the list and look at the listening_timestamp field in the hardware inventory, it correctly shows today's date.
I managed to work around the problem by using the last_seen_on field, but I'd really like to understand why and how?



I have the same problem with the predefined query "Connected Machines":
connected machines request.JPG
requete machines connectees.JPG (22.26 KB) Viewed 9908 times


at one of the stations:
on a post.JPG
on a workstation.JPG (19.95 KB) Viewed 9908 times



For your information, the request is:
select hosts.computer_name, hostsoftwares.name,hostsoftwares.version, hosts.listening_timestamp as "last_connection"
from hosts,hostsoftwares
where hostsoftwares.name ilike 'Cortex%%' and hosts.uuid=hostsoftwares.host_id
order by hosts.computer_name ASC

Re: Error in retrieving information from the listening_timestamp field

Published: July 21, 2021 - 10:16 AM
by dcardon
Hello Mathieu,
We need to change/delete/rename this column; the concept has changed with the switch to WebSockets. For your use case, I recommend using the value `last_update_status->date:`

Code: Select all

select hosts.computer_name, hostsoftwares.name,hostsoftwares.version,
last_update_status->'date' as "last_connection"
from hosts,hostsoftwares
where hostsoftwares.name ilike 'Cortex%%' and hosts.uuid=hostsoftwares.host_id
order by hosts.computer_name ASC  
Sincerely,
Denis

[SOLVED] Re: Error in retrieving information on the listening_timestamp field

Published: July 21, 2021 - 11:52 AM
by mviale
Hi Denis,

OK, thanks for the information, I'll modify my requests.

Mathieu