import { IComGithubPrometheusOperatorPrometheusOperatorPkgApisMonitoringV1ArbitraryFSAccessThroughSMsConfig } from "../../monitoring.coreos.com/v1/ArbitraryFSAccessThroughSMsConfig.js"; import { IIoK8sApimachineryPkgApisMetaV1LabelSelector } from "@kubernetes-models/apimachinery/apis/meta/v1/LabelSelector"; import { IComGithubGrafanaAgentPkgOperatorApisMonitoringV1alpha1RemoteWriteSpec } from "./RemoteWriteSpec.js"; import { ModelData, Model } from "@kubernetes-models/base"; /** * MetricsSubsystemSpec defines global settings to apply across the * Metrics subsystem. */ export interface IMetricsSubsystemSpec { /** * ArbitraryFSAccessThroughSMs configures whether configuration based on a * ServiceMonitor can access arbitrary files on the file system of the * Grafana Agent container, e.g., bearer token files. */ "arbitraryFSAccessThroughSMs"?: IComGithubPrometheusOperatorPrometheusOperatorPkgApisMonitoringV1ArbitraryFSAccessThroughSMsConfig; /** * EnforcedNamespaceLabel enforces adding a namespace label of origin for * each metric that is user-created. The label value is always the * namespace of the object that is being created. */ "enforcedNamespaceLabel"?: string; /** * EnforcedSampleLimit defines a global limit on the number of scraped samples * that are accepted. This overrides any SampleLimit set per * ServiceMonitor and/or PodMonitor. It is meant to be used by admins to * enforce the SampleLimit to keep the overall number of samples and series * under the desired limit. Note that if a SampleLimit from a ServiceMonitor * or PodMonitor is lower, that value is used instead. */ "enforcedSampleLimit"?: number; /** * EnforcedTargetLimit defines a global limit on the number of scraped * targets. This overrides any TargetLimit set per ServiceMonitor and/or * PodMonitor. It is meant to be used by admins to enforce the TargetLimit to * keep the overall number of targets under the desired limit. Note that if a * TargetLimit from a ServiceMonitor or PodMonitor is higher, that value is used instead. */ "enforcedTargetLimit"?: number; /** * ExternalLabels are labels to add to any time series when sending data over * remote_write. */ "externalLabels"?: { [key: string]: string; }; /** * IgnoreNamespaceSelectors, if true, ignores NamespaceSelector settings * from the PodMonitor and ServiceMonitor configs, so that they only * discover endpoints within their current namespace. */ "ignoreNamespaceSelectors"?: boolean; /** * InstanceNamespaceSelector is the set of labels that determines which * namespaces to watch for MetricsInstances. If not provided, it only checks its own namespace. */ "instanceNamespaceSelector"?: IIoK8sApimachineryPkgApisMetaV1LabelSelector; /** * InstanceSelector determines which MetricsInstances should be selected * for running. Each instance runs its own set of Metrics components, * including service discovery, scraping, and remote_write. */ "instanceSelector"?: IIoK8sApimachineryPkgApisMetaV1LabelSelector; /** * MetricsExternalLabelName is the name of the external label used to * denote Grafana Agent cluster. Defaults to "cluster." The external label is * _not_ added when the value is set to the empty string. */ "metricsExternalLabelName"?: string; /** * OverrideHonorLabels, if true, overrides all configured honor_labels read * from ServiceMonitor or PodMonitor and sets them to false. */ "overrideHonorLabels"?: boolean; /** * OverrideHonorTimestamps allows global enforcement for honoring timestamps in all scrape configs. */ "overrideHonorTimestamps"?: boolean; /** * RemoteWrite controls default remote_write settings for all instances. If * an instance does not provide its own RemoteWrite settings, these will be * used instead. */ "remoteWrite"?: Array; /** * ReplicaExternalLabelName is the name of the metrics external label used * to denote the replica name. Defaults to __replica__. The external label is _not_ * added when the value is set to the empty string. */ "replicaExternalLabelName"?: string; /** * Replicas of each shard to deploy for metrics pods. Number of replicas * multiplied by the number of shards is the total number of pods created. */ "replicas"?: number; /** * ScrapeInterval is the time between consecutive scrapes. */ "scrapeInterval"?: string; /** * ScrapeTimeout is the time to wait for a target to respond before marking a * scrape as failed. */ "scrapeTimeout"?: string; /** * Shards to distribute targets onto. Number of replicas multiplied by the * number of shards is the total number of pods created. Note that scaling * down shards does not reshard data onto remaining instances; it must be * manually moved. Increasing shards does not reshard data either, but it will * continue to be available from the same instances. Sharding is performed on * the content of the __address__ target meta-label. */ "shards"?: number; } /** * MetricsSubsystemSpec defines global settings to apply across the * Metrics subsystem. */ export declare class MetricsSubsystemSpec extends Model implements IMetricsSubsystemSpec { "arbitraryFSAccessThroughSMs"?: IComGithubPrometheusOperatorPrometheusOperatorPkgApisMonitoringV1ArbitraryFSAccessThroughSMsConfig; "enforcedNamespaceLabel"?: string; "enforcedSampleLimit"?: number; "enforcedTargetLimit"?: number; "externalLabels"?: { [key: string]: string; }; "ignoreNamespaceSelectors"?: boolean; "instanceNamespaceSelector"?: IIoK8sApimachineryPkgApisMetaV1LabelSelector; "instanceSelector"?: IIoK8sApimachineryPkgApisMetaV1LabelSelector; "metricsExternalLabelName"?: string; "overrideHonorLabels"?: boolean; "overrideHonorTimestamps"?: boolean; "remoteWrite"?: Array; "replicaExternalLabelName"?: string; "replicas"?: number; "scrapeInterval"?: string; "scrapeTimeout"?: string; "shards"?: number; constructor(data?: ModelData); } export type { IMetricsSubsystemSpec as IComGithubGrafanaAgentPkgOperatorApisMonitoringV1alpha1MetricsSubsystemSpec, MetricsSubsystemSpec as ComGithubGrafanaAgentPkgOperatorApisMonitoringV1alpha1MetricsSubsystemSpec };