Skip to content
v2.278.0

LoggingOptions Struct ​

Configures log settings for the domain.

Example ​

ts
const prodDomain = new es.Domain(this, 'Domain', {
  version: es.ElasticsearchVersion.V7_1,
  capacity: {
    masterNodes: 5,
    dataNodes: 20,
  },
  ebs: {
    volumeSize: 20,
  },
  zoneAwareness: {
    availabilityZoneCount: 3,
  },
  logging: {
    slowSearchLogEnabled: true,
    appLogEnabled: true,
    slowIndexLogEnabled: true,
  },
});
python
prod_domain = es.Domain(self, "Domain",
    version=es.ElasticsearchVersion.V7_1,
    capacity=es.CapacityConfig(
        master_nodes=5,
        data_nodes=20
    ),
    ebs=es.EbsOptions(
        volume_size=20
    ),
    zone_awareness=es.ZoneAwarenessConfig(
        availability_zone_count=3
    ),
    logging=es.LoggingOptions(
        slow_search_log_enabled=True,
        app_log_enabled=True,
        slow_index_log_enabled=True
    )
)
java
Domain prodDomain = Domain.Builder.create(this, "Domain")
        .version(ElasticsearchVersion.V7_1)
        .capacity(CapacityConfig.builder()
                .masterNodes(5)
                .dataNodes(20)
                .build())
        .ebs(EbsOptions.builder()
                .volumeSize(20)
                .build())
        .zoneAwareness(ZoneAwarenessConfig.builder()
                .availabilityZoneCount(3)
                .build())
        .logging(LoggingOptions.builder()
                .slowSearchLogEnabled(true)
                .appLogEnabled(true)
                .slowIndexLogEnabled(true)
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
var prodDomain = new Domain(this, "Domain", new DomainProps {
    Version = ElasticsearchVersion.V7_1,
    Capacity = new CapacityConfig {
        MasterNodes = 5,
        DataNodes = 20
    },
    Ebs = new EbsOptions {
        VolumeSize = 20
    },
    ZoneAwareness = new ZoneAwarenessConfig {
        AvailabilityZoneCount = 3
    },
    Logging = new LoggingOptions {
        SlowSearchLogEnabled = true,
        AppLogEnabled = true,
        SlowIndexLogEnabled = true
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
prodDomain := es.NewDomain(this, jsii.String("Domain"), &DomainProps{
	Version: es.ElasticsearchVersion_V7_1(),
	Capacity: &CapacityConfig{
		MasterNodes: jsii.Number(5),
		DataNodes: jsii.Number(20),
	},
	Ebs: &EbsOptions{
		VolumeSize: jsii.Number(20),
	},
	ZoneAwareness: &ZoneAwarenessConfig{
		AvailabilityZoneCount: jsii.Number(3),
	},
	Logging: &LoggingOptions{
		SlowSearchLogEnabled: jsii.Boolean(true),
		AppLogEnabled: jsii.Boolean(true),
		SlowIndexLogEnabled: jsii.Boolean(true),
	},
})

Properties ​

appLogEnabledoptionalbooleanapp_log_enabledoptionalboolappLogEnabledoptionalBooleanAppLogEnabledoptionalboolAppLogEnabledoptional*bool = false deprecated #
use opensearchservice module instead

Requires Elasticsearch version 5.1 or later.

appLogGroupoptionalILogGroupRefapp_log_groupoptionalILogGroupRefappLogGroupoptionalILogGroupRefAppLogGroupoptionalILogGroupRefAppLogGroupoptionalILogGroupRef deprecated #
use opensearchservice module instead

Default: a new log group is created if app logging is enabled

auditLogEnabledoptionalbooleanaudit_log_enabledoptionalboolauditLogEnabledoptionalBooleanAuditLogEnabledoptionalboolAuditLogEnabledoptional*bool = false deprecated #
use opensearchservice module instead

Requires Elasticsearch version 6.7 or later and fine grained access control to be enabled.

auditLogGroupoptionalILogGroupRefaudit_log_groupoptionalILogGroupRefauditLogGroupoptionalILogGroupRefAuditLogGroupoptionalILogGroupRefAuditLogGroupoptionalILogGroupRef deprecated #
use opensearchservice module instead

Default: a new log group is created if audit logging is enabled

slowIndexLogEnabledoptionalbooleanslow_index_log_enabledoptionalboolslowIndexLogEnabledoptionalBooleanSlowIndexLogEnabledoptionalboolSlowIndexLogEnabledoptional*bool = false deprecated #
use opensearchservice module instead

Requires Elasticsearch version 5.1 or later.

slowIndexLogGroupoptionalILogGroupRefslow_index_log_groupoptionalILogGroupRefslowIndexLogGroupoptionalILogGroupRefSlowIndexLogGroupoptionalILogGroupRefSlowIndexLogGroupoptionalILogGroupRef deprecated #
use opensearchservice module instead

Default: a new log group is created if slow index logging is enabled

slowSearchLogEnabledoptionalbooleanslow_search_log_enabledoptionalboolslowSearchLogEnabledoptionalBooleanSlowSearchLogEnabledoptionalboolSlowSearchLogEnabledoptional*bool = false deprecated #
use opensearchservice module instead

Requires Elasticsearch version 5.1 or later.

slowSearchLogGroupoptionalILogGroupRefslow_search_log_groupoptionalILogGroupRefslowSearchLogGroupoptionalILogGroupRefSlowSearchLogGroupoptionalILogGroupRefSlowSearchLogGroupoptionalILogGroupRef deprecated #
use opensearchservice module instead

Default: a new log group is created if slow search logging is enabled