Fast and efficient osquery management.
osctrl is a fast and efficient osquery management solution, implementing its remote API as TLS endpoint.
With osctrl you can:
- โจ Monitor all your systems running osquery
- ๐ฆ Distribute its configuration fast
- ๐ Collect all the status and result logs
- โก Run on-demand queries
- ๐๏ธ Carve files and directories
- โ๏ธ Scale from hundreds to hundreds of thousands of nodes
Warning
osctrl is a fast evolving project, and while it is already being used in production environments, it is still under active development. Please make sure to read the documentation and understand its current state before deploying it in a critical environment.
Whether youโre running a small deployment or managing large fleets, osctrl gives you visibility and control over your osquery endpoints without compromising security or performance.
You can find the documentation of the project in https://osctrl.net
osctrl/
โโโ cmd/ # Service and CLI entrypoints
โ โโโ admin/ # osctrl-admin (web UI + admin handlers/templates/static)
โ โโโ api/ # osctrl-api (REST API service)
โ โโโ cli/ # osctrl-cli (operator CLI)
โ โโโ tls/ # osctrl-tls (osquery remote API endpoint)
โโโ pkg/ # Shared application packages
โ โโโ auditlog/ # Audit log manager
โ โโโ backend/ # DB manager/bootstrap
โ โโโ cache/ # Redis/cache managers
โ โโโ carves/ # File carve logic/storage integrations
โ โโโ config/ # Config structs/flags/validation
โ โโโ environments/ # Environment management
โ โโโ handlers/ # Shared HTTP handlers
โ โโโ logging/ # Log pipeline + logger backends
โ โโโ nodes/ # Node state/registration/cache
โ โโโ queries/ # Query management/scheduling/results
โ โโโ settings/ # Runtime settings
โ โโโ tags/ # Tag management
โ โโโ users/ # User and permissions management
โ โโโ utils/ # Utility helpers
โ โโโ types/ # Shared type definitions
โ โโโ version/ # Version metadata
โโโ deploy/ # Deployment configs/scripts (docker/nginx/osquery/systemd, CI/CD, redis, config, helpers, etc.)
โโโ tools/ # Dev/release helpers and API test assets (Bruno collections, scripts)
โโโ bin/ # Built binaries (from make)
โโโ docker-compose-dev.yml # Local multi-service development stack
โโโ Makefile # Build/test/dev targets
โโโ osctrl-api.yaml # OpenAPI specification for osctrl-api
flowchart LR
A["osquery Agents"] -->|TLS Remote API| T["osctrl-tls"]
O["Operators"] -->|Web UI| W["osctrl-admin"]
O -->|CLI| C["osctrl-cli"]
O -->|REST| P["osctrl-api"]
W -->|HTTP API| P
C -->|HTTP API| P
T --> S["Shared Packages (pkg/*)"]
W --> S
P --> S
C --> S
C -.->|Direct DB mode| D
S --> D["PostgreSQL Backend"]
S --> R["Redis Cache"]
S --> L["Log Destinations (DB, file, S3, Elastic, Splunk, Graylog, Kafka, Kinesis, Logstash)"]
S --> F["Carve Storage (DB, local, S3)"]
The fastest way to get started with osctrl development is by using Docker and Docker Compose. But you can find other methods below.
You can use docker to run osctrl and all the components are defined in the docker-compose-dev.yml that ties all the components together, to serve a functional deployment.
Ultimately you can just execute make docker_dev and it will automagically build and run osctrl locally in docker, for development purposes.
Using the provided deploy/provision.sh script, you can set up a development environment on your local machine. This script will install all necessary dependencies and configure the environment for osctrl development in a latest Ubuntu LTS system.
Check the documentation for more details on how to use the provisioning script.
Ultimately the script can also be used to deploy osctrl in production systems, please refer to the documentation for more details.
To build osctrl from source, ensure you have Go installed (version 1.25 or higher is recommended). Then, clone the repository and run the following commands:
git clone https://github.com/jmpsec/osctrl.git
cd osctrl
makeThis will compile all the osctrl components (osctrl-tls, osctrl-admin, osctrl-api, osctrl-cli), placing the binaries in the bin/ directory.
Find us in the #osctrl channel in the official osquery Slack community (Request an auto-invite!)
osctrl is licensed under the MIT License.
This is a security-sensitive project. Please read the SECURITY.md for vulnerability reporting and responsible disclosure guidelines.
We โค๏ธ contributions!
Feel free to fork the repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.
