Documentation ¶
Index ¶
- func NewPrometheus_Override(p Prometheus, scope constructs.IConstruct, id *string, props *PrometheusProps)
- func Prometheus_CHART_NAME() *string
- func Prometheus_CHART_REPOSITORY() *string
- func Prometheus_DEFAULT_NAMESPACE() *string
- func Prometheus_IsConstruct(x interface{}) *bool
- func Prometheus_IsOwnedResource(construct constructs.IConstruct) *bool
- func Prometheus_IsResource(construct constructs.IConstruct) *bool
- type Prometheus
- type PrometheusOptions
- type PrometheusProps
- type QueueConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPrometheus_Override ¶
func NewPrometheus_Override(p Prometheus, scope constructs.IConstruct, id *string, props *PrometheusProps)
Creates a new instance of the Prometheus class.
func Prometheus_CHART_NAME ¶
func Prometheus_CHART_NAME() *string
func Prometheus_CHART_REPOSITORY ¶
func Prometheus_CHART_REPOSITORY() *string
func Prometheus_DEFAULT_NAMESPACE ¶
func Prometheus_DEFAULT_NAMESPACE() *string
func Prometheus_IsConstruct ¶
func Prometheus_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.
func Prometheus_IsOwnedResource ¶
func Prometheus_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func Prometheus_IsResource ¶
func Prometheus_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
Types ¶
type Prometheus ¶
type Prometheus interface { awscdk.Resource // The Helm chart that was used to deploy Prometheus. Chart() awseks.HelmChart // The EKS cluster where Prometheus should be deployed. Cluster() awseks.Cluster // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The Fargate profile used for running the service in Fargate. FargateProfile() awseks.FargateProfile // The Kubernetes namespace where the service should be deployed. Namespace() *string // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // Configures the queue used to write to Amazon Managed Service for Prometheus. QueueConfiguration() *QueueConfiguration // The service account that Prometheus will use to gain permissions for Kubernetes and AWS. ServiceAccount() awseks.ServiceAccount // Name of the Kubernetes service account that should be created and used by Prometheus. ServiceAccountName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // The Amazon Managed Service for Prometheus workspace where the Prometheus server should sned its data. Workspace() aps.IWorkspace // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. ToString() *string }
Deploys Prometheus into EKS.
The service is run in Fargate and writes data to Amazon Managed Service for Prometheus which provides the backing data store. See: [Official Helm chart documentation](https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus#readme)
func NewPrometheus ¶
func NewPrometheus(scope constructs.IConstruct, id *string, props *PrometheusProps) Prometheus
Creates a new instance of the Prometheus class.
type PrometheusOptions ¶
type PrometheusOptions struct { // The Kubernetes namespace where the service should be deployed. Namespace *string `field:"optional" json:"namespace" yaml:"namespace"` // Configures the queue used to write to Amazon Managed Service for Prometheus. QueueConfiguration *QueueConfiguration `field:"optional" json:"queueConfiguration" yaml:"queueConfiguration"` // Name of the Kubernetes service account that should be created and used by Prometheus. ServiceAccountName *string `field:"optional" json:"serviceAccountName" yaml:"serviceAccountName"` }
Optional configurations for the Prometheus resource.
type PrometheusProps ¶
type PrometheusProps struct { // The AWS account ID this resource belongs to. // Default: - the resource is in the same account as the stack it belongs to. // Account *string `field:"optional" json:"account" yaml:"account"` // ARN to deduce region and account from. // // The ARN is parsed and the account and region are taken from the ARN. // This should be used for imported resources. // // Cannot be supplied together with either `account` or `region`. // Default: - take environment from `account`, `region` parameters, or use Stack environment. // EnvironmentFromArn *string `field:"optional" json:"environmentFromArn" yaml:"environmentFromArn"` // The value passed in by users to the physical name prop of the resource. // // - `undefined` implies that a physical name will be allocated by // CloudFormation during deployment. // - a concrete value implies a specific physical name // - `PhysicalName.GENERATE_IF_NEEDED` is a marker that indicates that a physical will only be generated // by the CDK if it is needed for cross-environment references. Otherwise, it will be allocated by CloudFormation. // Default: - The physical name will be allocated by CloudFormation at deployment time. // PhysicalName *string `field:"optional" json:"physicalName" yaml:"physicalName"` // The AWS region this resource belongs to. // Default: - the resource is in the same region as the stack it belongs to. // Region *string `field:"optional" json:"region" yaml:"region"` // The Kubernetes namespace where the service should be deployed. Namespace *string `field:"optional" json:"namespace" yaml:"namespace"` // Configures the queue used to write to Amazon Managed Service for Prometheus. QueueConfiguration *QueueConfiguration `field:"optional" json:"queueConfiguration" yaml:"queueConfiguration"` // Name of the Kubernetes service account that should be created and used by Prometheus. ServiceAccountName *string `field:"optional" json:"serviceAccountName" yaml:"serviceAccountName"` // The EKS cluster where Prometheus should be deployed. Cluster awseks.Cluster `field:"required" json:"cluster" yaml:"cluster"` // The Amazon Managed Service for Prometheus workspace where the Prometheus server should sned its data. Workspace aps.IWorkspace `field:"required" json:"workspace" yaml:"workspace"` }
type QueueConfiguration ¶
type QueueConfiguration struct { // Number of samples to buffer per shard before we block reading of more samples from the WAL. // // It is recommended to have enough capacity in each // shard to buffer several requests to keep throughput up while processing // occasional slow remote requests. Capacity *float64 `field:"optional" json:"capacity" yaml:"capacity"` // Maximum number of samples per send. MaxSamplesPerSend *float64 `field:"optional" json:"maxSamplesPerSend" yaml:"maxSamplesPerSend"` // Maximum number of shards, i.e. amount of concurrency. MaxShards *float64 `field:"optional" json:"maxShards" yaml:"maxShards"` }
Configures the queue used to write to Amazon Managed Service for Prometheus. See: [Remote write configuration](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write)