Vestigium.Helpers.Kql
3.4.1
dotnet add package Vestigium.Helpers.Kql --version 3.4.1
NuGet\Install-Package Vestigium.Helpers.Kql -Version 3.4.1
<PackageReference Include="Vestigium.Helpers.Kql" Version="3.4.1" />
<PackageVersion Include="Vestigium.Helpers.Kql" Version="3.4.1" />
<PackageReference Include="Vestigium.Helpers.Kql" />
paket add Vestigium.Helpers.Kql --version 3.4.1
#r "nuget: Vestigium.Helpers.Kql, 3.4.1"
#:package Vestigium.Helpers.Kql@3.4.1
#addin nuget:?package=Vestigium.Helpers.Kql&version=3.4.1
#tool nuget:?package=Vestigium.Helpers.Kql&version=3.4.1
Vestigium.Helpers.Kql
KQL-inspired filter dialect and field catalog. Parse, bind against a pack session, evaluate rows. This package does not enumerate processes, services, or counters. Vestigium.Helpers.Processes references Kql — not the other way around.
Identity
| Field | Value |
|---|---|
| Package | Vestigium.Helpers.Kql 1.0.0 |
| TFM | net10.0 |
| APPID | Kql (KqlLoggingCatalog.AppId) |
| EVENTID | Reserved 14000–14499 (used through 14020) |
| Depends on | Vestigium.Logging |
| License | MIT |
| Contract | 002 -- Requirements Document |
KqlCatalog is the field catalog. KqlLoggingCatalog is the event catalog. Do not mix them.
Consume
<PackageReference Include="Vestigium.Helpers.Kql" Version="1.0.0" />
using Vestigium.Helpers.Kql;
using var session = KqlHelper.Create(KqlPack.Process);
var compiled = KqlHelper.Compile("(PID == 10 || Name LIKE '%edge%') && GPU.Usage GT 20", session);
Hosts that have rows call ProcessHelper.Search(query) — that lives in Processes.
Surface
| Call | Returns | Notes |
|---|---|---|
KqlHelper.Create(packs) / Create(options) |
KqlSession |
Pack + group field set. |
Parse(text) |
parse result | Syntax only. A \| where B is a parse error. |
Compile(text, session) |
compile result | Bind names. Unknown field names the enabled pack. |
session.TryGetField(name) |
bool + field | Canonical, suffix, and aliases. Case-insensitive. |
session.Fields |
field list | What this session can bind. |
KqlLoggingCatalog.Register(cfg) |
void | Host-only, during VestigiumLogger.Initialize. |
Packs: Process, Service, Thread, System, Adapter.
Operators: == != <> LIKE IN BETWEEN GT LT GE LE < > plus && \|\| !.
Rules that do not move
- Not a process enumerator. No reference to
Vestigium.Helpers.Processes. - Missing / denied / blank string values are unknown, never
"". Top-level unknown is not a hit. - Never log RHS strings, command lines, or passwords.
- Pipe (
\| where) is not supported. - The library never calls
VestigiumLogger.Initialize.
Logging
VestigiumLogger.Initialize(cfg =>
{
cfg.AppId = "PingIQ"; // host APPID, not Kql
cfg.LogDirectory = logDir;
KqlLoggingCatalog.Register(cfg);
});
Writes are no-ops until the host initializes. JSONL lands at %ProgramData%\Vestigium\Logs\{host-APPID}\.
Named events live in EventCatalog/kql.json.
Related
Row hosts: Vestigium.Helpers.Processes, Vestigium.Helpers.Services.
Long-form documents live in Vestigium.Documentation / Helpers / Kql. Folders, not files — current revision sits inside the folder.
| Area | GitHub |
|---|---|
| 000 -- Archived | folder |
| 001 -- Implementation Plan | folder |
| 002 -- Requirements Document | folder |
| 003 -- Design Document | folder |
| 004 -- Developers Guide | folder |
Methods (2.2.0)
<field>.<method>(<value>). The catalog declares the type. The library owns the methods.
publisher.contains("Microsoft")
installed.equals(yes)
installed.isTrue()
size.greaterThan(500)
InstallDate.after(date(-5))
InstallDate.between(date(-30), date(0))
Boolean equals and the closed form accept true false yes no y n t f 1 0, any case.
IS is ==. IS NOT is !=. Operator form is unchanged.
Types
A catalog declares the type, or passes typeof.
KqlField.Create("size", typeof(long));
KqlField.Create("route.destination", typeof(KqlIpAddress));
KqlField.Create("installed", KqlType.Boolean);
KqlIpAddress and KqlMacAddress are library types. Subscribing unlocks their methods. CompareAs still works.
Loose forms
A boolean field alone means true: IsX64.
A field then a value, with no operator, means contains for a string and equals for a number or boolean: publisher Microsoft, installed yes.
Size units: 500mb, 1.5gb, 100kb. Date words: today, yesterday, now, and date(-5).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Vestigium.Logging (>= 1.7.1)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Vestigium.Helpers.Kql:
| Package | Downloads |
|---|---|
|
Vestigium.Controls.QueryBar
WPF query bar for a KQL session: text, clear, saved queries, and completion. |
|
|
Vestigium.Helpers.Kql.AppMgmt
AppMgmt field catalogs and sessions for Vestigium.Helpers.Kql. |
|
|
Vestigium.Helpers.Services
Windows Service Control Manager: list, search, control, logon, recovery. |
|
|
Vestigium.Helpers.Processes
Windows process table: list, get, search, lifetime, campaigns. |
|
|
Vestigium.Helpers.Kql.ActiveSetup
Active Setup field catalog and session for Vestigium.Helpers.Kql. |
GitHub repositories
This package is not used by any popular GitHub repositories.