/** * The Receiver values that install the fleet default, as CLI options after * the app: a later value wins over the app's, and an environment variable * never overrides a config value, so options are the only way to change what * the receiver config sets (`pipelines/run/receive/rate/config.yaml`). * * The number itself comes from the rule in `fleet-default.ts`; this file only * writes it. */ import { type FleetDefaultAction } from './fleet-default.js'; export declare const FLEET_DEFAULT_MIN_ENGINE = "1.1.141"; export declare const CEILING_MIN_ENGINE = "1.1.146"; /** Error lines over a limit that still pass, per statement per node per window. */ export declare const KEEP_COUNT_DEFAULT = 50; /** * Sample lines (the first `baselineCount` of each statement) a service with a * total passes past it, per node per window (receiver config * `baselineMaxOverTotal`); within the total they count like any line. 0 * removes the bound. A service with no total passes every statement's sample. */ export declare const BASELINE_MAX_OVER_TOTAL_DEFAULT = 50; /** * Keep-count lines a service with a total passes past it, per node per window * (receiver config `keepMaxOverTotal`); within the total they count like any * line. 0 removes the bound. A service with no total keeps the per-statement * count alone. */ export declare const KEEP_MAX_OVER_TOTAL_DEFAULT = 500; /** The returned record's fields for the hot-tier run: identity, route, name, level and the counted size. */ export declare const ELASTIC_HOT_TIER_FIELDS = "fullText(\"tenx_hash\",\"routeState\",\"message_pattern\",\"severity_level\",\"utf8Size\")"; /** Levels the receiver config's floor list names; each is written so none falls back to the config's value. */ export declare const SEVERITY_FLOOR_LEVELS: readonly ["TRACE", "DEBUG", "INFO", "WARN", "ERROR", "CRITICAL", "FATAL"]; export declare const ERROR_CLASS_LEVELS: readonly ["ERROR", "CRITICAL", "FATAL"]; export declare function versionAtLeast(version: string, min: string): boolean; /** The engine version an image ref pins (`log10x/edge-10x:1.1.136`), or undefined for a moving tag. */ export declare function imageEngineVersion(image: string): string | undefined; /** The engine release an install plan pins for the Receiver. */ export declare function manifestEngineVersion(): string | undefined; export declare function engineReadsFleetDefault(version: string | undefined): boolean; export declare function engineReadsCeiling(version: string | undefined): boolean; export interface FleetDefaultInstall { /** Bytes per reset window per node, from `fleetDefaultNumber`. */ capBytesPerWindowPerNode: number; /** The same limit in lines per reset window per node, for a Receiver that counts events. */ capEventsPerWindowPerNode?: number; action: FleetDefaultAction; /** Share of ERROR and CRITICAL lines above the limit kept in Standard. Default by action. */ errorFloor?: number; } /** * The regulator values every Datadog Receiver install writes, in launch * order: no warm-up, no share guard, the always-pass sample, and a 0 floor * on every non-error level. The floor list repeats its option once per level * (doc.log10x.com/config/cli, "List Arguments"). Every level is named, so the * outcome is the same whether the command line adds to the config's list or * replaces it: the engine builds the floor map with a put per entry * (`EventMapFunctionFactory.map`), so the last value of a level wins. * `rateReceiverMinRetentionThreshold 0` makes a 0 floor hold even where the * receiver script reads a 0 floor as unset. * * With `keepCount` (engines that declare `rateReceiverKeepCounts`), the error * levels pass that many lines over the limit per statement per node per * window, and their share floor is 0; without it they keep `errorFloor`. */ export declare function regulatorEngineOptions(opts: { errorFloor: number; keepCount?: number; }): Array<[string, string]>; /** The fleet default's options, in launch order: its limit and action, then the regulator values. */ export declare function fleetDefaultEngineOptions(fd: FleetDefaultInstall, keepCount?: number): Array<[string, string]>; /** * Environment the fleet default needs. `outputOffload` puts `routeState` on * every line the Receiver returns (config `pipelines/run/input/forwarder/ * config.yaml`), which the Flex index filter and the forwarder's S3 branch * read. The config reads it through TenXEnv, which falls back to the * environment, and no module declares it as an option, so it is an env var. */ export declare const FLEET_DEFAULT_ENGINE_ENV: ReadonlyArray<[string, string]>; /** A Kubernetes label key, or undefined. */ export declare function validTeamLabel(label: string | undefined): string | undefined; export interface ReceiverFleetValues { /** Options after the app, in order. */ options: Array<[string, string]>; /** Env vars on the Receiver container. */ env: Array<[string, string]>; /** True when the fleet default's options are in `options`. */ fleetDefaultWritten: boolean; /** True when `k8sTeamLabel` is in `options`. */ teamLabelWritten: boolean; /** True when the regulator values (no warm-up, no share guard, 0 non-error floors) are in `options`. */ regulatorValuesWritten: boolean; /** True when `rateReceiverKeepCounts` is in `options`. */ keepCountsWritten: boolean; /** True when `rateReceiverUnit events` is in `options`. */ eventsUnitWritten: boolean; /** The count written in `rateReceiverKeepCounts`, when written. */ keepCount?: number; /** The share floor written on the error levels. */ errorFloor?: number; /** The engine release the gate read. */ engineVersion?: string; /** One sentence per value held back, and why. */ notes: string[]; } /** * Everything a Receiver install adds for Datadog: `symbolMessageHashField * tenx_hash` (index filters and monitors select a statement by `@tenx_hash`), * the regulator values, the error keep count, the fleet default and the team * label. Each ships only on an engine that declares its options: an * undeclared option fails the launch. */ export declare function receiverFleetValues(input: { datadog: boolean; fleetDefault?: FleetDefaultInstall; teamLabel?: string; engineVersion?: string; /** Error lines over a limit that pass per statement per node per window. Default 50. */ keepCount?: number; /** True when any service sends its excess to S3, which sets the error floor on engines without keep counts. */ anyOffload?: boolean; /** * `events`: limits and totals count lines, not bytes (Datadog bills * Standard per event). Default `events` for a Datadog Receiver on engine * 1.1.146 or later, `bytes` otherwise. */ unit?: 'bytes' | 'events'; /** * A ClickHouse Receiver the rows run holds: limits and totals count lines * (rateReceiverUnit events), and each returned record carries tenx_hash. */ clickhouseRows?: boolean; /** * An Elasticsearch Receiver the hot-tier run holds: each returned record * carries `tenx_hash`, `routeState`, `message_pattern`, `severity_level` * and `utf8Size` (the size the byte limits count), which the run sums from * the Receiver's indices. Not with compact: it replaces the output field * list compact encodes with. */ elasticHotTier?: boolean; }): ReceiverFleetValues;