hi there! I am noob to osquery. Is there a ER (ent...
# general
c
hi there! I am noob to osquery. Is there a ER (entity relationship) diagram for osquery schema, much like in traditional RDBMS? That will help understand how the tables are linked together and what info can be queried.
s
Hey @CK Kee wrote this blog about the relationships, this might help you on your way. Working on the next more accurate version at the moment. “Untangling the Osquery tables web🕸️ using Jupyter Notebooks📓” by Sevickson https://link.medium.com/3sJ1mLrnS7
c
hey @SK! This is really cool! Thanks for sharing!
😉 1
👍 1
s
That’s really neat looking. But also a little misleading. osquery tables are (generally) light wrappers around underlying os apis. What a given column name means is table specific. And frustrating, some names are divergent that shouldn’t be, while some are the same that also shouldn’t be.
It makes me think that idea might be a good starting point to review this.
FWIW I generally approach this the other way — for a given piece of OS data, what other data would want to join. And knowing that, is there a table for it?
s
@seph You have good points that I also stumbled upon as we speak I am working on a more correct approach by looking at the data and not the column name. In my blog I also have some improvements written.
s
How are you looking at the data?
And if you haven’t found it yet, the table schemas are translated into json for the web site. https://github.com/osquery/osquery-site/blob/source/src/data/osquery_schema_versions (updated with correct url)
If you come up with something neat, I’d be interesting to think about how to improve the web site’s schema browser. Or under take some larger name normalization
s
By running Osquery on different kind of systems I get a baseline of possible connections dependent on OS. Attached is what I have till now. I can send you a link later on after I fixed some issues.
s
That sounds interesting. Like running it somewhere, and looking for table data correlations?
✔️ 1
Very data-science. (As said, I come it the other way)
I’d absolutely love to see the update. And any thoughts/PRs about improving it all
s
Yes, writing a blog and hopefully will have it finished next week. Will surely give you a shout out when it is out. 😉