1 | import { SecretValue } from '@aws-cdk/core';
|
2 | import { ContainerDefinition, Secret } from '../container-definition';
|
3 | import { BaseLogDriverProps } from './base-log-driver';
|
4 | import { LogDriver, LogDriverConfig } from './log-driver';
|
5 | import { Construct as CoreConstruct } from '@aws-cdk/core';
|
6 | /**
|
7 | * Log Message Format
|
8 | */
|
9 | export declare enum SplunkLogFormat {
|
10 | INLINE = "inline",
|
11 | JSON = "json",
|
12 | RAW = "raw"
|
13 | }
|
14 | /**
|
15 | * Specifies the splunk log driver configuration options.
|
16 | *
|
17 | * [Source](https://docs.docker.com/config/containers/logging/splunk/)
|
18 | */
|
19 | export interface SplunkLogDriverProps extends BaseLogDriverProps {
|
20 | /**
|
21 | * Splunk HTTP Event Collector token.
|
22 | *
|
23 | * The splunk-token is added to the Options property of the Log Driver Configuration. So the secret value will be resolved and
|
24 | * viewable in plain text in the console.
|
25 | *
|
26 | * Please provide at least one of `token` or `secretToken`.
|
27 | * @deprecated Use {@link SplunkLogDriverProps.secretToken} instead.
|
28 | * @default - token not provided.
|
29 | */
|
30 | readonly token?: SecretValue;
|
31 | /**
|
32 | * Splunk HTTP Event Collector token (Secret).
|
33 | *
|
34 | * The splunk-token is added to the SecretOptions property of the Log Driver Configuration. So the secret value will not be
|
35 | * resolved or viewable as plain text.
|
36 | *
|
37 | * Please provide at least one of `token` or `secretToken`.
|
38 | * @default - If secret token is not provided, then the value provided in `token` will be used.
|
39 | */
|
40 | readonly secretToken?: Secret;
|
41 | /**
|
42 | * Path to your Splunk Enterprise, self-service Splunk Cloud instance, or Splunk
|
43 | * Cloud managed cluster (including port and scheme used by HTTP Event Collector)
|
44 | * in one of the following formats: https://your_splunk_instance:8088 or
|
45 | * https://input-prd-p-XXXXXXX.cloud.splunk.com:8088 or https://http-inputs-XXXXXXXX.splunkcloud.com.
|
46 | */
|
47 | readonly url: string;
|
48 | /**
|
49 | * Event source.
|
50 | *
|
51 | * @default - source not set.
|
52 | */
|
53 | readonly source?: string;
|
54 | /**
|
55 | * Event source type.
|
56 | *
|
57 | * @default - sourceType not set.
|
58 | */
|
59 | readonly sourceType?: string;
|
60 | /**
|
61 | * Event index.
|
62 | *
|
63 | * @default - index not set.
|
64 | */
|
65 | readonly index?: string;
|
66 | /**
|
67 | * Path to root certificate.
|
68 | *
|
69 | * @default - caPath not set.
|
70 | */
|
71 | readonly caPath?: string;
|
72 | /**
|
73 | * Name to use for validating server certificate.
|
74 | *
|
75 | * @default - The hostname of the splunk-url
|
76 | */
|
77 | readonly caName?: string;
|
78 | /**
|
79 | * Ignore server certificate validation.
|
80 | *
|
81 | * @default - insecureSkipVerify not set.
|
82 | */
|
83 | readonly insecureSkipVerify?: string;
|
84 | /**
|
85 | * Message format. Can be inline, json or raw.
|
86 | *
|
87 | * @default - inline
|
88 | */
|
89 | readonly format?: SplunkLogFormat;
|
90 | /**
|
91 | * Verify on start, that docker can connect to Splunk server.
|
92 | *
|
93 | * @default - true
|
94 | */
|
95 | readonly verifyConnection?: boolean;
|
96 | /**
|
97 | * Enable/disable gzip compression to send events to Splunk Enterprise or Splunk
|
98 | * Cloud instance.
|
99 | *
|
100 | * @default - false
|
101 | */
|
102 | readonly gzip?: boolean;
|
103 | /**
|
104 | * Set compression level for gzip. Valid values are -1 (default), 0 (no compression),
|
105 | * 1 (best speed) ... 9 (best compression).
|
106 | *
|
107 | * @default - -1 (Default Compression)
|
108 | */
|
109 | readonly gzipLevel?: number;
|
110 | }
|
111 | /**
|
112 | * A log driver that sends log information to splunk Logs.
|
113 | */
|
114 | export declare class SplunkLogDriver extends LogDriver {
|
115 | private readonly props;
|
116 | /**
|
117 | * Constructs a new instance of the SplunkLogDriver class.
|
118 | *
|
119 | * @param props the splunk log driver configuration options.
|
120 | */
|
121 | constructor(props: SplunkLogDriverProps);
|
122 | /**
|
123 | * Called when the log driver is configured on a container
|
124 | */
|
125 | bind(_scope: CoreConstruct, _containerDefinition: ContainerDefinition): LogDriverConfig;
|
126 | }
|