Hi team, have a question on osquery distributed wr...
# general
p
Hi team, have a question on osquery distributed write interface. (I am a beginner, so please excuse me if this is a naive question) so I am using following interfaces to communicate with osqeryd process, I am getting the result returned by osqueryd, and sending it to an api. whenever post to api fails, next time I read results it will accumulate previously failed results even though I am just feeding in 1 query. I want to know is it caching those results, and if yes, can I configure the caching on osqueryd side? Thanks.
Copy code
GetQueriesFunc
WriteResultsFunc
s
When you say you’re using those interfaces, what exactly do you mean?
p
using GetQueriesFunc interface to send queries to osqueryd service to process, and calling WriteResultsFunc to get results back from the daemon
s
What library? What SDK? What software?
Osquery itself does not really do caching. It runs a query, and returns results. Evented tables are a bit weird — they source events, and generally only run queries on data newer-than-the-last-run.
p
I am using
osquery-5.1.0_1.linux_x86_64.tar.gz
can I see the logs interacting with this interface?
s
I have no idea what interface you’re using.
p
oh bdw I am running simple
select *  time('now)
query
s
How are you communicating with osquery?
p
so I am using my own extension to run with osqueryd. which basically communicates with osqueryd using extensio socket.
s
What SDK was my next question.
A go extension, communicating over the extension socket is important information
Neither the go SDK, nor osquery are doing caching. When your extension triggers a distributed query, osquery will execute it, and return the results.
Rereading your question, there’s something there about how logs are handled? If osquery cannot send it’s log, they will be buffered until the configured logging destination can accept them
The distributed interface there is a bit of an odd choice. But maybe it’s what you intend.
p
Thanks for explaining this Seph, let me check more on my side, ang will get back to you if needed. thanks.