UNPKG

@luminati-io/kubernetes-models-fluent-operator

Version:
299 lines (298 loc) 14.2 kB
import { IObjectMeta } from "@kubernetes-models/apimachinery/apis/meta/v1/ObjectMeta"; import { Model, ModelData } from "@kubernetes-models/base"; /** * ClusterInput is the Schema for the inputs API */ export interface IClusterInput { /** * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ "apiVersion": "fluentbit.fluent.io/v1alpha2"; /** * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ "kind": "ClusterInput"; "metadata"?: IObjectMeta; /** * InputSpec defines the desired state of ClusterInput */ "spec"?: { /** * A user friendly alias name for this input plugin. Used in metrics for distinction of each configured input. */ "alias"?: string; /** * CustomPlugin defines Custom Input configuration. */ "customPlugin"?: { "config"?: string; }; /** * Dummy defines Dummy Input configuration. */ "dummy"?: { /** * Dummy JSON record. */ "dummy"?: string; /** * Events number generated per second. */ "rate"?: number; /** * Sample events to generate. */ "samples"?: number; /** * Tag name associated to all records comming from this plugin. */ "tag"?: string; }; /** * FluentBitMetrics defines Fluent Bit Metrics Input configuration. */ "fluentBitMetrics"?: { /** * The rate at which metrics are collected from the host operating system. default is 2 seconds. */ "scrapeInterval"?: string; /** * Scrape metrics upon start, useful to avoid waiting for 'scrape_interval' for the first round of metrics. */ "scrapeOnStart"?: boolean; "tag"?: string; }; "logLevel"?: "off" | "error" | "warning" | "info" | "debug" | "trace"; /** * NodeExporterMetrics defines Node Exporter Metrics Input configuration. */ "nodeExporterMetrics"?: { "path"?: { /** * The mount point used to collect process information and metrics. */ "procfs"?: string; /** * The path in the filesystem used to collect system metrics. */ "sysfs"?: string; }; /** * The rate at which metrics are collected from the host operating system, default is 5 seconds. */ "scrapeInterval"?: string; /** * Tag name associated to all records comming from this plugin. */ "tag"?: string; }; /** * PrometheusScrapeMetrics defines Prometheus Scrape Metrics Input configuration. */ "prometheusScrapeMetrics"?: { /** * The host of the prometheus metric endpoint that you want to scrape */ "host"?: string; /** * The metrics URI endpoint, that must start with a forward slash, deflaut: /metrics */ "metricsPath"?: string; /** * The port of the promethes metric endpoint that you want to scrape */ "port"?: number; /** * The interval to scrape metrics, default: 10s */ "scrapeInterval"?: string; /** * Tag name associated to all records comming from this plugin */ "tag"?: string; }; /** * Systemd defines Systemd Input configuration. */ "systemd"?: { /** * Specify the database file to keep track of monitored files and offsets. */ "db"?: string; /** * Set a default synchronization (I/O) method. values: Extra, Full, Normal, Off. This flag affects how the internal SQLite engine do synchronization to disk, for more details about each option please refer to this section. note: this option was introduced on Fluent Bit v1.4.6. */ "dbSync"?: "Extra" | "Full" | "Normal" | "Off"; /** * When Fluent Bit starts, the Journal might have a high number of logs in the queue. In order to avoid delays and reduce memory usage, this option allows to specify the maximum number of log entries that can be processed per round. Once the limit is reached, Fluent Bit will continue processing the remaining log entries once Journald performs the notification. */ "maxEntries"?: number; /** * Set a maximum number of fields (keys) allowed per record. */ "maxFields"?: number; /** * Optional path to the Systemd journal directory, if not set, the plugin will use default paths to read local-only logs. */ "path"?: string; /** * Specifies if the input plugin should be paused (stop ingesting new data) when the storage.max_chunks_up value is reached. */ "pauseOnChunksOverlimit"?: "on" | "off"; /** * Start reading new entries. Skip entries already stored in Journald. */ "readFromTail"?: "on" | "off"; /** * Specify the buffering mechanism to use. It can be memory or filesystem */ "storageType"?: "filesystem" | "memory"; /** * Remove the leading underscore of the Journald field (key). For example the Journald field _PID becomes the key PID. */ "stripUnderscores"?: "on" | "off"; /** * Allows to perform a query over logs that contains a specific Journald key/value pairs, e.g: _SYSTEMD_UNIT=UNIT. The Systemd_Filter option can be specified multiple times in the input section to apply multiple filters as required. */ "systemdFilter"?: Array<string>; /** * Define the filter type when Systemd_Filter is specified multiple times. Allowed values are And and Or. With And a record is matched only when all of the Systemd_Filter have a match. With Or a record is matched when any of the Systemd_Filter has a match. */ "systemdFilterType"?: "And" | "Or"; /** * The tag is used to route messages but on Systemd plugin there is an extra functionality: if the tag includes a star/wildcard, it will be expanded with the Systemd Unit file (e.g: host.\* => host.UNIT_NAME). */ "tag"?: string; }; /** * Tail defines Tail Input configuration. */ "tail"?: { /** * Set the initial buffer size to read files data. This value is used too to increase buffer size. The value must be according to the Unit Size specification. */ "bufferChunkSize"?: string; /** * Set the limit of the buffer size per monitored file. When a buffer needs to be increased (e.g: very long lines), this value is used to restrict how much the memory buffer can grow. If reading a file exceed this limit, the file is removed from the monitored file list The value must be according to the Unit Size specification. */ "bufferMaxSize"?: string; /** * Specify the database file to keep track of monitored files and offsets. */ "db"?: string; /** * Set a default synchronization (I/O) method. Values: Extra, Full, Normal, Off. */ "dbSync"?: "Extra" | "Full" | "Normal" | "Off"; /** * DisableInotifyWatcher will disable inotify and use the file stat watcher instead. */ "disableInotifyWatcher"?: boolean; /** * If enabled, the plugin will recombine split Docker log lines before passing them to any parser as configured above. This mode cannot be used at the same time as Multiline. */ "dockerMode"?: boolean; /** * Wait period time in seconds to flush queued unfinished split lines. */ "dockerModeFlushSeconds"?: number; /** * Specify an optional parser for the first line of the docker multiline mode. The parser name to be specified must be registered in the parsers.conf file. */ "dockerModeParser"?: string; /** * Set one or multiple shell patterns separated by commas to exclude files matching a certain criteria, e.g: exclude_path=\*.gz,\*.zip */ "excludePath"?: string; /** * Ignores records which are older than this time in seconds. Supports m,h,d (minutes, hours, days) syntax. Default behavior is to read all records from specified files. Only available when a Parser is specificied and it can parse the time of a record. */ "ignoredOlder"?: string; /** * When a message is unstructured (no parser applied), it's appended as a string under the key name log. This option allows to define an alternative name for that key. */ "key"?: string; /** * Set a limit of memory that Tail plugin can use when appending data to the Engine. If the limit is reach, it will be paused; when the data is flushed it resumes. */ "memBufLimit"?: string; /** * If enabled, the plugin will try to discover multiline messages and use the proper parsers to compose the outgoing messages. Note that when this option is enabled the Parser option is not used. */ "multiline"?: boolean; /** * Wait period time in seconds to process queued multiline messages */ "multilineFlushSeconds"?: number; /** * This will help to reassembly multiline messages originally split by Docker or CRI Specify one or Multiline Parser definition to apply to the content. */ "multilineParser"?: string; /** * Specify the name of a parser to interpret the entry as a structured message. */ "parser"?: string; /** * Name of the parser that matchs the beginning of a multiline message. Note that the regular expression defined in the parser must include a group name (named capture) */ "parserFirstline"?: string; /** * Optional-extra parser to interpret and structure multiline entries. This option can be used to define multiple parsers. */ "parserN"?: Array<string>; /** * Pattern specifying a specific log files or multiple ones through the use of common wildcards. */ "path"?: string; /** * If enabled, it appends the name of the monitored file as part of the record. The value assigned becomes the key in the map. */ "pathKey"?: string; /** * Specifies if the input plugin should be paused (stop ingesting new data) when the storage.max_chunks_up value is reached. */ "pauseOnChunksOverlimit"?: "on" | "off"; /** * For new discovered files on start (without a database offset/position), read the content from the head of the file, not tail. */ "readFromHead"?: boolean; /** * The interval of refreshing the list of watched files in seconds. */ "refreshIntervalSeconds"?: number; /** * Specify the number of extra time in seconds to monitor a file once is rotated in case some pending data is flushed. */ "rotateWaitSeconds"?: number; /** * When a monitored file reach it buffer capacity due to a very long line (Buffer_Max_Size), the default behavior is to stop monitoring that file. Skip_Long_Lines alter that behavior and instruct Fluent Bit to skip long lines and continue processing other lines that fits into the buffer size. */ "skipLongLines"?: boolean; /** * Specify the buffering mechanism to use. It can be memory or filesystem */ "storageType"?: "filesystem" | "memory"; /** * Set a tag (with regex-extract fields) that will be placed on lines read. E.g. kube.<namespace_name>.<pod_name>.<container_name> */ "tag"?: string; /** * Set a regex to exctract fields from the file */ "tagRegex"?: string; }; }; } /** * ClusterInput is the Schema for the inputs API */ export declare class ClusterInput extends Model<IClusterInput> implements IClusterInput { "apiVersion": IClusterInput["apiVersion"]; "kind": IClusterInput["kind"]; "metadata"?: IClusterInput["metadata"]; "spec"?: IClusterInput["spec"]; static apiVersion: IClusterInput["apiVersion"]; static kind: IClusterInput["kind"]; static is: import("@kubernetes-models/base").TypeMetaGuard<IClusterInput>; constructor(data?: ModelData<IClusterInput>); }