UNPKG

2.77 kBTypeScriptView Raw
1import { ContainerDefinition } from '../container-definition';
2import { BaseLogDriverProps } from './base-log-driver';
3import { LogDriver, LogDriverConfig } from './log-driver';
4import { Construct as CoreConstruct } from '@aws-cdk/core';
5/**
6 * Specifies the syslog log driver configuration options.
7 *
8 * [Source](https://docs.docker.com/config/containers/logging/syslog/)
9 */
10export interface SyslogLogDriverProps extends BaseLogDriverProps {
11 /**
12 * The address of an external syslog server. The URI specifier may be
13 * [tcp|udp|tcp+tls]://host:port, unix://path, or unixgram://path.
14 *
15 * @default - If the transport is tcp, udp, or tcp+tls, the default port is 514.
16 */
17 readonly address?: string;
18 /**
19 * The syslog facility to use. Can be the number or name for any valid
20 * syslog facility. See the syslog documentation:
21 * https://tools.ietf.org/html/rfc5424#section-6.2.1.
22 *
23 * @default - facility not set
24 */
25 readonly facility?: string;
26 /**
27 * The absolute path to the trust certificates signed by the CA. Ignored
28 * if the address protocol is not tcp+tls.
29 *
30 * @default - tlsCaCert not set
31 */
32 readonly tlsCaCert?: string;
33 /**
34 * The absolute path to the TLS certificate file. Ignored if the address
35 * protocol is not tcp+tls.
36 *
37 * @default - tlsCert not set
38 */
39 readonly tlsCert?: string;
40 /**
41 * The absolute path to the TLS key file. Ignored if the address protocol
42 * is not tcp+tls.
43 *
44 * @default - tlsKey not set
45 */
46 readonly tlsKey?: string;
47 /**
48 * If set to true, TLS verification is skipped when connecting to the syslog
49 * daemon. Ignored if the address protocol is not tcp+tls.
50 *
51 * @default - false
52 */
53 readonly tlsSkipVerify?: boolean;
54 /**
55 * The syslog message format to use. If not specified the local UNIX syslog
56 * format is used, without a specified hostname. Specify rfc3164 for the RFC-3164
57 * compatible format, rfc5424 for RFC-5424 compatible format, or rfc5424micro
58 * for RFC-5424 compatible format with microsecond timestamp resolution.
59 *
60 * @default - format not set
61 */
62 readonly format?: string;
63}
64/**
65 * A log driver that sends log information to syslog Logs.
66 */
67export declare class SyslogLogDriver extends LogDriver {
68 private readonly props;
69 /**
70 * Constructs a new instance of the SyslogLogDriver class.
71 *
72 * @param props the syslog log driver configuration options.
73 */
74 constructor(props?: SyslogLogDriverProps);
75 /**
76 * Called when the log driver is configured on a container
77 */
78 bind(_scope: CoreConstruct, _containerDefinition: ContainerDefinition): LogDriverConfig;
79}