hello everyone, I'm developing a personal projec...
# general
w
hello everyone, I'm developing a personal project where Osquery should send collected data to the endpoint of an API, what's the best way to do this? the api already handles the received data so the way they will be sent is not a problem.
s
I’m not sure what the question is here.
w
@seph Sorry for the bad English, but basically I want to collect information about CPU, RAM and disk usage and send it to an API that will record this in a database, is it possible to configure this directly in Osquery?
s
osquery can collect that data, yes. osquery has a handful of supported logger APIs. It’s not really designed to output to arbitrary APIs, it’s designed to output to a couple different kinds of osquery server.
w
@seph what would be the best method? extensions or plugins, from the Osquery documentation I understood that they must be in C++, is there no possibility of using another language? like node or python?
s
That’s misunderstanding a lot of details.
osquery can be thought of as an api translation layer. It presents os information in a structured sql format. The list of data osquery has support for is https://osquery.io/schema If you need additional data, then you might write a plugin to provide it.
One configures scheduled queries. They log to loggers. if you needed a different kind of logger, you could write a plugin.
plugins can be written in any language that supports thrift. The python and go SDKs are straight forward. The c/c++ one is more complicated.
There are extensive docs in https://osquery.readthedocs.io/
w
Thanks for the tips, I'll go deeper into the documentation and apply the knowledge.