Interface ApplicationLoggingProps

To ship your application logs to ELK automatically, you must:

  1. Set the enabled flag to true
  2. Include the cdk-base Amigo role in your AMI
  3. Log to journald. We recommend doing this by logging to stdout and using systemd to start your app
  4. Confirm that your [[systemdUnitName]] is configured properly.

Unless you have explicitly opted-out, appropriate IAM permissions for logging to Kinesis will be configured automatically via the [[GuEc2App]] pattern.

interface ApplicationLoggingProps {
    enabled: boolean;
    systemdUnitName?: string;
}

Properties

enabled: boolean

Enables forwarding of application logs to the Guardian ELK stack.

Note, to work, you will need to also do the following non-CDK things:

  1. Include the cdk-base Amigo role in your AMI.
  2. Log to journald. We recommend doing this by logging to stdout and using systemd to start your app
  3. Confirm that your [[systemdUnitName]] is configured properly.

Unless you have explicitly opted-out, appropriate IAM permissions for logging to Kinesis will be configured automatically via the [[GuEc2App]] pattern.

systemdUnitName?: string

This needs to match the name of your SystemD unit.

If your systemd unit is not <app>.service set this value.

<app>.service