import { ModelData, Model } from "@kubernetes-models/base"; /** * MetricsStageSpec is an action stage that allows for defining and updating * metrics based on data from the extracted map. Created metrics are not pushed * to Loki or Prometheus and are instead exposed via the /metrics endpoint of * the Grafana Agent pod. The Grafana Agent Operator should be configured with * a MetricsInstance that discovers the logging DaemonSet to collect metrics * created by this stage. */ export interface IMetricsStageSpec { /** * The action to take against the metric. Required. * * Must be either "inc" or "add" for type: counter or type: histogram. * When type: gauge, must be one of "set", "inc", "dec", "add", or "sub". * * "add", "set", or "sub" requires the extracted value to be convertible * to a positive float. */ "action": string; /** * Buckets to create. Bucket values must be convertible to float64s. Extremely * large or small numbers are subject to some loss of precision. * Only valid for type: histogram. */ "buckets"?: Array; /** * If true all log line bytes are counted. Can only be set with * matchAll: true and action: add. * * Only valid for type: counter. */ "countEntryBytes"?: boolean; /** * Sets the description for the created metric. */ "description"?: string; /** * If true, all log lines are counted without attempting to match the * source to the extracted map. Mutually exclusive with value. * * Only valid for type: counter. */ "matchAll"?: boolean; /** * Label values on metrics are dynamic which can cause exported metrics * to go stale. To prevent unbounded cardinality, any metrics not updated * within MaxIdleDuration are removed. * * Must be greater or equal to 1s. Defaults to 5m. */ "maxIdleDuration"?: string; /** * Sets the custom prefix name for the metric. Defaults to "promtail_custom_". */ "prefix"?: string; /** * Key from the extracted data map to use for the metric. Defaults to the * metrics name if not present. */ "source"?: string; /** * The metric type to create. Must be one of counter, gauge, histogram. * Required. */ "type": string; /** * Filters down source data and only changes the metric if the targeted * value matches the provided string exactly. If not present, all * data matches. */ "value"?: string; } /** * MetricsStageSpec is an action stage that allows for defining and updating * metrics based on data from the extracted map. Created metrics are not pushed * to Loki or Prometheus and are instead exposed via the /metrics endpoint of * the Grafana Agent pod. The Grafana Agent Operator should be configured with * a MetricsInstance that discovers the logging DaemonSet to collect metrics * created by this stage. */ export declare class MetricsStageSpec extends Model implements IMetricsStageSpec { "action": string; "buckets"?: Array; "countEntryBytes"?: boolean; "description"?: string; "matchAll"?: boolean; "maxIdleDuration"?: string; "prefix"?: string; "source"?: string; "type": string; "value"?: string; constructor(data?: ModelData); } export type { IMetricsStageSpec as IComGithubGrafanaAgentPkgOperatorApisMonitoringV1alpha1MetricsStageSpec, MetricsStageSpec as ComGithubGrafanaAgentPkgOperatorApisMonitoringV1alpha1MetricsStageSpec };