Hello Fleet,
in the fleetdm docs, it mentions that the api endpoints for queries, particular one api for “run live query” can provide real time results in the API response. https://fleetdm.com/docs/using-fleet/rest-api#run-live-query
We’d like to know if fleet has any api endpoint could provide historical results (at least the latest results) for scheduled queries.
fleetdm.comREST API | Fleet documentation
Documentation for Fleet for osquery.
fleetdm.comREST API | Fleet documentation
Documentation for Fleet for osquery.
If this isn’t the case, what would be your suggestion to pull results, from a both logging and automation perspective?
k
Kathy Satterlee
07/12/2023, 6:28 PM
Hi @frederick ferby! The results for scheduled queries are included in osquery results logs. You can pipe those through to the logging destination that best works for you and ingest them from there.
Hi, sorry for adding additional question here. Looks like one single result log file contains results from all scheduled queries. Is this expected?
I was under the impression that I can easily filter and ingest logs from selected queries, but this way it’s more difficult.
k
Kathy Satterlee
08/02/2023, 4:22 PM
Apologies, @Jiayu Chang. I didn't see this! Yes, when logging to the filesystem, all logs are stored in one file. Otherwise, things could rapidly become unmanageable. For ease of ingestion, you can forward those logs to a logging destination that allows you to easily filter data.