osquery / osquery-go

Go bindings for osquery
MIT License
386 stars 78 forks source link

Fix example for table and config #83

Closed prateeknischal closed 4 years ago

prateeknischal commented 4 years ago

When running an extension with osqueryi or osqueryd, osquery* binary spawns the extension process with the following command line args

--socket /path/to/socket --timeout 3 --interval 3

The example plugins only accept 2 arguments for a valid invocation which caused the extension to fail when running via --extension flag.

Fix by adding a more formal flag parsing.

Usage:

  1. When running the extension as a self managed process:

    osqueryi

    and then

    ./extension.ext --socket /var/osquery/osquery.em
  2. Allowing osquery extension manager to manage the lifecyle of the extension

    osqueryi --extension extension.ext
CLAassistant commented 4 years ago

CLA assistant check
All committers have signed the CLA.