Operations
List the rules
position is the evaluation order, 0 first. measured counts what the rule did over the last 7
days, in billing bytes. kept counts matched rows that the rule kept: the sampled share and
protected error rows. The saving values are examples; Squasher reads them from your plan.
Add a rule
Each item of
match.attributes is { "key", "op", "value" }. op is eq (exact text) or regex
(an RE2 search, up to 256 characters, no lookaround or backreferences). The key is looked up in the
resource attributes, then in the record attributes.
201 and the new rule. The rule applies within about 60 seconds.
Change a rule
Send only the fields that change. Fields ofmatch merge with the saved conditions. To remove a
condition, set it to null (or [] for severities and attributes).
Order the rules
Send every rule ID of the project once, first rule first.Remove a rule
204. Within about 60 seconds, the rows of the rule are stored again, or
the next matching rule applies.
Preview a rule
The preview takes the same body as a new rule and writes nothing. AddruleId to test changes to a
saved rule in its place. Rows that an earlier enabled rule matches are not counted, because that
rule decides them first. The preview works on every plan.
matchedRows and matchedBytes are estimates: the project’s billed rows and bytes of the signal
over the last 7 days, times the share of a bounded sample of stored rows that the rule matches.
droppedShare is the share of the matched bytes the rule would drop: 1 for drop, 1 - samplePercent / 100 for sample, less the error rows when includeErrors is false. source
names the data behind the estimate.
The saving
saving is the monthly money effect of the dropped bytes, from your plan’s current prices.
Dropped data is not billed, so:
ingestCentsis the telemetry charge of the month with the dropped bytes minus the charge without them. It is 0 while your telemetry stays withinincludedBytes;notethen says so.storageCentsis an estimate of the storage charge of the data that is no longer stored.storageIsEstimateis alwaystrue.projectedMonthBytesis your organization’s telemetry for a month at its recent rate.droppedBytesPerMonthis the 7-day dropped bytes times 30/7.
Errors
TypeScript client and CLI
squasher ingest-rules create, update, reorder, and delete. For their flags,
see the CLI reference.