I’ve got script that runs every xx hours that runs Session relevance query (using the info from the “Efficient session relevance query for computer properties”), data that is retrieved is imported into our SQL Database for ad-hoc reporting. We also have data from other sources (Tenable, ServiceNow, CrowdStrike, etc) in that SQL DB so we can link various sources and run comparison reports.
This is working fine, but from time to time we run into issue that the Session Relevance query is not returning all data !!!
Example: If I run WebReport for machines checked in last 24 hours it would return approx. 90,000 records. If I’m running the same using my script it would only return 35,000 records, same is also true if I’m running script to return all records (this should be around 116,000) my script would only return 43,000.
If i check the logs of my script then on 12/27/2021 it returned 116,000 checking when it run today only got 43,000 records. Checking webreports/bigfix console both return 116,000.
below session relevance query I’m using to return all records
Blockquote
(id of it as string,
name of it | “not found”,
value of results from (BES Property “OS”) of it | “not found”,
concatenation “;” of names of bes computer groups of it,
agent version of it,
value of results from (BES Property “_PG_Serial_Number”) of it | “not found”,
value of results from (BES Property “_PG_Manufacturer”) of it | “not found”,
value of results from (BES Property “_PG_Model_Name”) of it | “not found”,
value of results from (BES Property “_PG_Last_User”) of it | “not found”,
value of results from (BES Property “_PC1_ImageVersion”) of it | “not found”,
value of results from (BES Property “_PG_HeartbeatActive”) of it | “not found”,
value of results from (BES Property “Active Directory Path”) of it | “not found”,
value of results from (BES Property “Full Operating System Name and Service Pack level - Windows”) of it | “not found”,
value of results from (BES Property “_PG_CurrentLocation”) of it | “not found”,
last report time of it as string,
concatenation “|” of names of bes computer groups whose (name of site of it is “ActionSite”) of it | “not found”)
of subscribed computers of bes custom sites whose(name of it is contained by set of (“PC1 - Windows”;“SK2 - General”))
The root server has been running for 16 days.
I’ve got 2 scripts currently running
- Script 1: this will run every hour and retrieve machines that have checked-in last 2 hours
- Script 2: this will run 1/day and retrieves all machines
Any ideas and/or suggestions are welcome.