Debian Codegraph @

testdata/collectorforkubernetes.yaml.golden/collectorforkubernetes-cm.yaml

raw
1 apiVersion: v1
2 kind: ConfigMap
3 metadata:
4 name: collectorforkubernetes
5 namespace: collectorforkubernetes
6 labels:
7 app: collectorforkubernetes
8 data:
9 001-general.conf: |
10 # The general configuration is used for all deployments
11 #
12 # Run collector with the flag -conf and specify location of the configuration files.
13 #
14 # You can override all the values using environment variables with the format like
15 # COLLECTOR__<ANYNAME>=<section>__<key>=<value>
16 # As an example you can set dataPath in [general] section as
17 # COLLECTOR__DATAPATH=general__dataPath=C:\\some\\path\\data.db
18 # This parameter can be configured using -env-override, set it to empty string to disable this feature
19
20 [general]
21
22 # Review EULA https://www.outcoldsolutions.com/docs/license-agreement/
23 # and accept EULA by changing the value to *true*
24 acceptEULA = false
25
26 # Location for the database
27 # Collector stores positions of the files and internal state
28 dataPath = ./data/
29
30 # log level (accepted values are trace, debug, info, warn, error, fatal)
31 logLevel = info
32
33 # http server gives access to two endpoints
34 # /healthz
35 # /metrics
36 httpServerBinding =
37
38 # telemetry report endpoint, set it to empty string to disable telemetry
39 telemetryEndpoint = https://license.outcold.solutions/telemetry/
40
41 # license check endpoint
42 licenseEndpoint = https://license.outcold.solutions/license/
43
44 # license server through proxy
45 licenseServerProxyUrl =
46
47 # authentication with basic authorization (user:password)
48 licenseServerProxyBasicAuth =
49
50 # license key
51 license =
52
53 # Environment variable $KUBERNETES_NODENAME is used by default to setup hostname
54 # Use value below to override specific name
55 hostname =
56
57 # Default output for events, logs and metrics
58 # valid values: splunk and devnull
59 # Use devnull by default if you don't want to redirect data
60 defaultOutput = splunk
61
62 # Default buffer size for file input
63 fileInputBufferSize = 256b
64
65 # Maximum size of one line the file reader can read
66 fileInputLineMaxSize = 1mb
67
68 # Include custom fields to attach to every event, in example below every event sent to Splunk will hav
69 # indexed field my_environment=dev. Fields names should match to ^[a-z][_a-z0-9]*$
70 # Better way to configure that is to specify labels for Kubernetes Nodes.
71 # ; fields.my_environment = dev
72 # Identify the cluster if you are planning to monitor multiple clusters
73 fields.kubernetes_cluster = -
74
75 # Include EC2 Metadata (see list of possible fields https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
76 # Should be in format ec2Metadata.{desired_field_name} = {url path to read the value}
77 # ec2Metadata.ec2_instance_id = /latest/meta-data/instance-id
78 # ec2Metadata.ec2_instance_type = /latest/meta-data/instance-type
79
80 # subdomain for the annotations added to the pods, workloads, namespaces or containers, like splunk.collectord.io/..
81 annotationsSubdomain =
82
83 # Configure acknowledgement database.
84 # - force fsync on every write to Write-Ahead-Log
85 db.fsync = false
86 # - maximum size of the Write-Ahead-Log
87 db.compactAt = 1M
88
89 # configure global thruput per second for forwarded logs (metrics are not included)
90 # for example if you set `thruputPerSecond = 512Kb`, that will limit amount of logs forwarded
91 # from the single Collectord instance to 512Kb per second.
92 # You can configure thruput individually for the logs (including specific for container logs) below
93 thruputPerSecond =
94
95 # Configure events that are too old to be forwarded, for example 168h (7 days) - that will drop all events
96 # older than 7 days
97 tooOldEvents =
98
99 # Configure events that are too new to be forwarded, for example 1h - that will drop all events that are 1h in future
100 tooNewEvents =
101
102 # connection to kubernetes api
103 [general.kubernetes]
104
105 # Override service URL for Kubernetes (default is ${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT})
106 serviceURL =
107
108 # Environment variable $KUBERNETES_NODENAME is used by default to setup nodeName
109 # Use it only when you need to override it
110 nodeName =
111
112 # Configuration to access the API server,
113 # see https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#accessing-the-api-from-a-pod
114 # for details
115 tokenPath = /var/run/secrets/kubernetes.io/serviceaccount/token
116 certPath = /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
117
118 # Default timeout for http responses. The streaming/watch requests depend on this timeout.
119 timeout = 30m
120
121 # (obsolete) In case if pod metadata was not retrievied. how often collector should retry to reload the pod metadata
122 # metadataFetchRetry = 5s
123
124 # (obsolete) In case if event is recent, how long pipeline should wait for the metadata to be available in Kubernetes API
125 # metadataFetchWait = 30s
126
127 # How long to keep the cache for the recent calls to API server (to limit number of calls when collector discovers new pods)
128 metadataTTL = 30s
129
130 # regex to find pods
131 podsCgroupFilter = ^/([^/\s]+/)*kubepods(\.slice)?/((kubepods-)?(burstable|besteffort)(\.slice)?/)?([^/]*)pod([0-9a-f]{32}|[0-9a-f\-_]{36})(\.slice)?$
132
133 # regex to find containers in the pods
134 containersCgroupFilter = ^/([^/\s]+/)*kubepods(\.slice)?/((kubepods-)?(burstable|besteffort)(\.slice)?/)?([^/]*)pod([0-9a-f]{32}|[0-9a-f\-_]{36})(\.slice)?/(docker-|crio-)?[0-9a-f]{64}(\.scope)?(\/.+)?$
135
136 # path to the kubelet root location (use it to discover application logs for emptyDir)
137 # the expected format is `pods/{pod-id}/volumes/kubernetes.io~empty-dir/{volume-name}/_data/`
138 volumesRootDir = /rootfs/var/lib/kubelet/
139
140 # You can attach annotations as a metadata, using the format
141 # includeAnnotations.{key} = {regexp}
142 # For example if you want to include all annotations that starts with `prometheus.io` or `example.com` you can include
143 # the following format:
144 # includeAnnotations.1 = ^prometheus\.io.*
145 # includeAnnotations.2 = ^example\.com.*
146
147 # watch for changes (annotations) in the objects
148 watch.namespaces = v1/namespace
149 watch.deployments = apis/v1/deployment
150 watch.configurations = apis/v1/collectord.io/configuration
151
152
153 # watch for pods annotations, setup prometheus collection
154 # for these pods
155 # Addon listens on Pod Network
156 # DaemonSets listen on Host Network
157 [input.prometheus_auto]
158
159 # disable prometheus auto discovery for pods
160 disabled = false
161
162 # override type
163 type = kubernetes_prometheus
164
165 # specify Splunk index
166 index =
167
168 # how often to collect prometheus metrics
169 interval = 60s
170
171 # include metrics help with the events
172 includeHelp = true
173
174 # http client timeout
175 timeout = 30s
176
177 # set output (splunk or devnull, default is [general]defaultOutput)
178 output =
179
180
181 # Splunk output
182 [output.splunk]
183
184 # Splunk HTTP Event Collector url
185 url =
186 # You can specify muiltiple splunk URls with
187 #
188 # urls.0 = https://server1:8088/services/collector/event/1.0
189 # urls.1 = https://server1:8088/services/collector/event/1.0
190 # urls.2 = https://server1:8088/services/collector/event/1.0
191 #
192 # Limitations:
193 # * The urls cannot have different path.
194
195 # Specify how URL should be picked up (in case if multiple is used)
196 # urlSelection = random|round-robin|random-with-round-robin
197 # where:
198 # * random - choose random url on first selection and after each failure (connection or HTTP status code >= 500)
199 # * round-robin - choose url starting from first one and bump on each failure (connection or HTTP status code >= 500)
200 # * random-with-round-robin - choose random url on first selection and after that in round-robin on each
201 # failure (connection or HTTP status code >= 500)
202 urlSelection = random-with-round-robin
203
204 # Splunk HTTP Event Collector Token
205 token =
206
207 # Allow invalid SSL server certificate
208 insecure = false
209
210 # Path to CA cerificate
211 caPath =
212
213 # CA Name to verify
214 caName =
215
216 # path for client certificate (if required)
217 clientCertPath =
218
219 # path for client key (if required)
220 clientKeyPath =
221
222 # Events are batched with the maximum size set by batchSize and staying in pipeline for not longer
223 # than set by frequency
224 frequency = 5s
225 batchSize = 768K
226 # limit by the number of events (0 value has no limit on the number of events)
227 events = 50
228
229 # Splunk through proxy
230 proxyUrl =
231
232 # authentication with basic authorization (user:password)
233 proxyBasicAuth =
234
235 # Splunk acknowledgement url (.../services/collector/ack)
236 ackUrl =
237 # You can specify muiltiple splunk URls for ackUrl
238 #
239 # ackUrls.0 = https://server1:8088/services/collector/ack
240 # ackUrls.1 = https://server1:8088/services/collector/ack
241 # ackUrls.2 = https://server1:8088/services/collector/ack
242 #
243 # Make sure that they in the same order as urls for url, to make sure that this Splunk instance will be
244 # able to acknowledge the payload.
245 #
246 # Limitations:
247 # * The urls cannot have different path.
248
249 # Enable index acknowledgment
250 ackEnabled = false
251
252 # Index acknowledgment timeout
253 ackTimeout = 3m
254
255 # Timeout specifies a time limit for requests made by collector.
256 # The timeout includes connection time, any
257 # redirects, and reading the response body.
258 timeout = 30s
259
260 # in case when pipeline can post to multiple indexes, we want to avoid posibility of blocking
261 # all pipelines, because just some events have incorrect index
262 dedicatedClientPerIndex = true
263 # in case if some indexes aren't used anymore, how often to destroy the dedicated client
264 # dedicatedClientCleanPeriod = 24h
265 # possible values: RedirectToDefault, Drop, Retry
266 incorrectIndexBehavior = RedirectToDefault
267
268 # gzip compression level (nocompression, default, 1...9)
269 compressionLevel = default
270
271 # number of dedicated splunk output threads (to increase throughput above 4k events per second)
272 threads = 1
273
274 # if you want to exclude some preindexed fields from events
275 # excludeFields.kubernetes_pod_ip = true
276
277 002-daemonset.conf: |
278 # DaemonSet configuration is used for Nodes and Masters.
279
280 # Connection to the docker host
281 [general.docker]
282
283 # url for docker API, only unix socket is supported
284 url = unix:///rootfs/var/run/docker.sock
285
286 # path to docker root folder (can fallback to use folder structure to read docker metadata)
287 dockerRootFolder = /rootfs/var/lib/docker/
288
289 # (obsolete) In case if pod metadata was not retrievied. how often collector should retry to reload the pod metadata
290 # metadataFetchRetry = 5s
291
292 # (obsolete) In case if event is recent, how long pipeline should wait for the metadata to be available in Kubernetes API
293 # metadataFetchWait = 30s
294
295 # (obsolete) In case if collector does not see new events for specific container and with the last metadata refresh
296 # We have not found this container - fow how long we should keep this metadata in cache.
297 # metadataTTL = 5s
298
299 # Timeout for http responses to docker client. The streaming requests depend on this timeout.
300 timeout = 1m
301
302 # in case of Kubernetes/OpenShift if you schedule some containers with Docker, but not with the Kubernetes
303 # that allows us to find them (by default finding all containers with name not starting with k8s_)
304 containersNameFilter = ^(([^k])|(k[^8])|(k8[^s])|(k8s[^_])).*$
305
306 # regex to find docker container cgroups (helps excluding other cgroups with matched ID)
307 containersCgroupFilter = ^(/([^/\s]+/)*(docker-|docker/)[0-9a-f]{64}(\.scope)?)$
308
309
310 // connection to CRIO
311 [general.cri-o]
312
313 # url for CRIO API, only unix socket is supported
314 url = unix:///rootfs/var/run/crio/crio.sock
315
316 # Timeout for http responses to docker client. The streaming requests depend on this timeout.
317 timeout = 1m
318
319
320 [general.containerd]
321
322 runtimePath = /rootfs/var/run/containerd
323 namespace = k8s.io
324
325
326 # cgroup input
327 [input.system_stats]
328
329 # disable system level stats
330 disabled.host = false
331 disabled.cgroup = false
332
333 # cgroups fs location
334 pathCgroups = /rootfs/sys/fs/cgroup
335
336 # proc location
337 pathProc = /rootfs/proc
338
339 # how often to collect cgroup stats
340 statsInterval = 30s
341
342 # override type
343 type.host = kubernetes_stats_v2_host
344 type.cgroup = kubernetes_stats_v2_cgroup
345
346 # specify Splunk index
347 index.host =
348 index.cgroup =
349
350 # set output (splunk or devnull, default is [general]defaultOutput)
351 output.host =
352 output.cgroup =
353
354
355 # proc input
356 [input.proc_stats]
357
358 # disable proc level stats
359 disabled = false
360
361 # proc location
362 pathProc = /rootfs/proc
363
364 # how often to collect proc stats
365 statsInterval = 60s
366
367 # override type
368 type = kubernetes_proc_stats_v2
369
370 # specify Splunk index
371 index.host =
372 index.cgroup =
373
374 # proc filesystem includes by default system threads (there can be over 100 of them)
375 # these stats do not help with the observability
376 # excluding them can reduce the size of the index, performance of the searches and usage of the collector
377 includeSystemThreads = false
378
379 # set output (splunk or devnull, default is [general]defaultOutput)
380 output.host =
381 output.cgroup =
382
383
384 # network stats
385 [input.net_stats]
386
387 # disable net stats
388 disabled = false
389
390 # proc path location
391 pathProc = /rootfs/proc
392
393 # how often to collect net stats
394 statsInterval = 30s
395
396 # override type
397 type = kubernetes_net_stats_v2
398
399 # specify Splunk index
400 index.host =
401 index.cgroup =
402
403 # set output (splunk or devnull, default is [general]defaultOutput)
404 output.host =
405 output.cgroup =
406
407
408 # network socket table
409 [input.net_socket_table]
410
411 # disable net stats
412 disabled = false
413
414 # proc path location
415 pathProc = /rootfs/proc
416
417 # how often to collect net stats
418 statsInterval = 30s
419
420 # override type
421 type = kubernetes_net_socket_table
422
423 # specify Splunk index
424 index.host =
425 index.cgroup =
426
427 # set output (splunk or devnull, default is [general]defaultOutput)
428 output.host =
429 output.cgroup =
430
431 # group connections by tcp_state, localAddr, remoteAddr (if localPort is not the port it is listening on)
432 # that can significally reduces the amount of events
433 group = true
434
435
436 # mount input (collects mount stats where kubelet runtime is stored)
437 [input.mount_stats]
438
439 # disable system level stats
440 disabled = false
441
442 # how often to collect mount stats
443 statsInterval = 30s
444
445 # override type
446 type = kubernetes_mount_stats
447
448 # specify Splunk index
449 index =
450
451 # set output (splunk or devnull, default is [general]defaultOutput)
452 output =
453
454
455 # Container Log files
456 [input.files]
457
458 # disable container logs monitoring
459 disabled = false
460
461 # root location of docker log files
462 # logs are expected in standard docker format like {containerID}/{containerID}-json.log
463 # rotated files
464 path = /rootfs/var/lib/docker/containers/
465 # root location of CRI-O files
466 # logs are expected in Kubernetes format, like {podID}/{containerName}/0.log
467 crioPath = /rootfs/var/log/pods/
468
469 # (obsolete) glob matching pattern for log files
470 # glob = */*-json.log*
471
472 # files are read using polling schema, when reach the EOF how often to check if files got updated
473 pollingInterval = 250ms
474
475 # how often to look for the new files under logs path
476 walkingInterval = 5s
477
478 # include verbose fields in events (file offset)
479 verboseFields = false
480
481 # override type
482 type = kubernetes_logs
483
484 # specify Splunk index
485 index =
486
487 # docker splits events when they are larger than 10-100k (depends on the docker version)
488 # we join them together by default and forward to Splunk as one event
489 joinPartialEvents = true
490
491 # In case if your containers report messages with terminal colors or other escape sequences
492 # you can enable strip for all the containers in one place.
493 # Better is to enable it only for required container with the label collectord.io/strip-terminal-escape-sequences=true
494 stripTerminalEscapeSequences = false
495 # Regexp used for stripping terminal colors, it does not stip all the escape sequences
496 # Read http://man7.org/linux/man-pages/man4/console_codes.4.html for more information
497 stripTerminalEscapeSequencesRegex = (\x1b\[\d{1,3}(;\d{1,3})*m)|(\x07)|(\x1b]\d+(\s\d)?;[^\x07]+\x07)|(.*\x1b\[K)
498
499 # set output (splunk or devnull, default is [general]defaultOutput)
500 output =
501
502 # configure default thruput per second for for each container log
503 # for example if you set `thruputPerSecond = 128Kb`, that will limit amount of logs forwarded
504 # from the single container to 128Kb per second.
505 thruputPerSecond =
506
507 # Configure events that are too old to be forwarded, for example 168h (7 days) - that will drop all events
508 # older than 7 days
509 tooOldEvents =
510
511 # Configure events that are too new to be forwarded, for example 1h - that will drop all events that are 1h in future
512 tooNewEvents =
513
514
515 # Application Logs
516 [input.app_logs]
517
518 # disable container application logs monitoring
519 disabled = false
520
521 # root location of mounts (applies to hostPath mounts only), if the hostPath differs inside container from the path on host
522 root = /rootfs/
523
524 # how often to review list of available volumes
525 syncInterval = 5s
526
527 # glob matching pattern for log files
528 glob = *.log*
529
530 # files are read using polling schema, when reach the EOF how often to check if files got updated
531 pollingInterval = 250ms
532
533 # how often to look for the new files under logs path
534 walkingInterval = 5s
535
536 # include verbose fields in events (file offset)
537 verboseFields = false
538
539 # override type
540 type = kubernetes_logs
541
542 # specify Splunk index
543 index =
544
545 # we split files using new line character, with this configuration you can specify what defines the new event
546 # after new line
547 eventPatternRegex = ^[^\s]
548 # Maximum interval of messages in pipeline
549 eventPatternMaxInterval = 100ms
550 # Maximum time to wait for the messages in pipeline
551 eventPatternMaxWait = 1s
552 # Maximum message size
553 eventPatternMaxSize = 100kb
554
555 # set output (splunk or devnull, default is [general]defaultOutput)
556 output =
557
558 # configure default thruput per second for for each container log
559 # for example if you set `thruputPerSecond = 128Kb`, that will limit amount of logs forwarded
560 # from the single container to 128Kb per second.
561 thruputPerSecond =
562
563 # Configure events that are too old to be forwarded, for example 168h (7 days) - that will drop all events
564 # older than 7 days
565 tooOldEvents =
566
567 # Configure events that are too new to be forwarded, for example 1h - that will drop all events that are 1h in future
568 tooNewEvents =
569
570
571 # Host logs. Input syslog(.\d+)? files
572 [input.files::syslog]
573
574 # disable host level logs
575 disabled = false
576
577 # root location of docker files
578 path = /rootfs/var/log/
579
580 # regex matching pattern
581 match = ^(syslog|messages)(.\d+)?$
582
583 # limit search only on one level
584 recursive = false
585
586 # files are read using polling schema, when reach the EOF how often to check if files got updated
587 pollingInterval = 250ms
588
589 # how often o look for the new files under logs path
590 walkingInterval = 5s
591
592 # include verbose fields in events (file offset)
593 verboseFields = false
594
595 # override type
596 type = kubernetes_host_logs
597
598 # specify Splunk index
599 index =
600
601 # field extraction
602 extraction = ^(?P<timestamp>[A-Za-z]+\s+\d+\s\d+:\d+:\d+)\s(?P<syslog_hostname>[^\s]+)\s(?P<syslog_component>[^:\[]+)(\[(?P<syslog_pid>\d+)\])?: (.+)$
603
604 # timestamp field
605 timestampField = timestamp
606
607 # format for timestamp
608 # the layout defines the format by showing how the reference time, defined to be `Mon Jan 2 15:04:05 -0700 MST 2006`
609 timestampFormat = Jan 2 15:04:05
610
611 # Adjust date, if month/day aren't set in format
612 timestampSetMonth = false
613 timestampSetDay = false
614
615 # timestamp location (if not defined by format)
616 timestampLocation = Local
617
618 # sample output (-1 does not sample, 20 - only 20% of the logs should be forwarded)
619 samplingPercent = -1
620
621 # sampling key for hash based sampling (should be regexp with the named match pattern `key`)
622 samplingKey =
623
624 # set output (splunk or devnull, default is [general]defaultOutput)
625 output =
626
627 # configure default thruput per second for this files group
628 # for example if you set `thruputPerSecond = 128Kb`, that will limit amount of logs forwarded
629 # from the files in this group to 128Kb per second.
630 thruputPerSecond =
631
632 # Configure events that are too old to be forwarded, for example 168h (7 days) - that will drop all events
633 # older than 7 days
634 tooOldEvents =
635
636 # Configure events that are too new to be forwarded, for example 1h - that will drop all events that are 1h in future
637 tooNewEvents =
638
639
640 # Host logs. Input all *.log(.\d+)? files
641 [input.files::logs]
642
643 # disable host level logs
644 disabled = false
645
646 # root location of log files
647 path = /rootfs/var/log/
648
649 # regex matching pattern
650 match = ^(([\w\-.]+\.log(.[\d\-]+)?)|(docker))$
651
652 # files are read using polling schema, when reach the EOF how often to check if files got updated
653 pollingInterval = 250ms
654
655 # how often o look for the new files under logs path
656 walkingInterval = 5s
657
658 # include verbose fields in events (file offset)
659 verboseFields = false
660
661 # override type
662 type = kubernetes_host_logs
663
664 # specify Splunk index
665 index =
666
667 # field extraction
668 extraction =
669
670 # timestamp field
671 timestampField =
672
673 # format for timestamp
674 # the layout defines the format by showing how the reference time, defined to be `Mon Jan 2 15:04:05 -0700 MST 2006`
675 timestampFormat =
676
677 # timestamp location (if not defined by format)
678 timestampLocation =
679
680 # sample output (-1 does not sample, 20 - only 20% of the logs should be forwarded)
681 samplingPercent = -1
682
683 # sampling key for hash based sampling (should be regexp with the named match pattern `key`)
684 samplingKey =
685
686 # set output (splunk or devnull, default is [general]defaultOutput)
687 output =
688
689 # configure default thruput per second for this files group
690 # for example if you set `thruputPerSecond = 128Kb`, that will limit amount of logs forwarded
691 # from the files in this group to 128Kb per second.
692 thruputPerSecond =
693
694 # Configure events that are too old to be forwarded, for example 168h (7 days) - that will drop all events
695 # older than 7 days
696 tooOldEvents =
697
698 # Configure events that are too new to be forwarded, for example 1h - that will drop all events that are 1h in future
699 tooNewEvents =
700
701
702 [input.journald]
703
704 # disable host level logs
705 disabled = false
706
707 # root location of log files
708 path.persistent = /rootfs/var/log/journal/
709 path.volatile = /rootfs/run/log/journal/
710
711 # when reach end of journald, how often to pull
712 pollingInterval = 250ms
713
714 # if you don't want to forward journald from the beginning,
715 # set the oldest event in relative value, like -14h or -30m or -30s (h/m/s supported)
716 startFromRel =
717
718 # override type
719 type = kubernetes_host_logs
720
721 # specify Splunk index
722 index =
723
724 # sample output (-1 does not sample, 20 - only 20% of the logs should be forwarded)
725 samplingPercent = -1
726
727 # sampling key (should be regexp with the named match pattern `key`)
728 samplingKey =
729
730 # how often to reopen the journald to free old files
731 reopenInterval = 1h
732
733 # set output (splunk or devnull, default is [general]defaultOutput)
734 output =
735
736 # configure default thruput per second for this files group
737 # for example if you set `thruputPerSecond = 128Kb`, that will limit amount of logs forwarded
738 # from the files in this group to 128Kb per second.
739 thruputPerSecond =
740
741 # Configure events that are too old to be forwarded, for example 168h (7 days) - that will drop all events
742 # older than 7 days
743 tooOldEvents =
744
745 # Configure events that are too new to be forwarded, for example 1h - that will drop all events that are 1h in future
746 tooNewEvents =
747
748
749 # Pipe to join events (container logs only)
750 [pipe.join]
751
752 # disable joining event
753 disabled = false
754
755 # Maximum interval of messages in pipeline
756 maxInterval = 100ms
757
758 # Maximum time to wait for the messages in pipeline
759 maxWait = 1s
760
761 # Maximum message size
762 maxSize = 100K
763
764 # Default pattern to indicate new message (should start not from space)
765 patternRegex = ^[^\s]
766
767
768 # Kube API Server has trace messages with multi line events
769 [pipe.join::kube-apiserver]
770 disabled = false
771 matchRegex.kubernetes_container_image = ^gcr.io/google_containers/kube-apiserver-.*$
772 matchRegex.stream = stderr
773 patternRegex = ^[IWEF]\d{4}\s\d{2}:\d{2}:\d{2}.\d{6}\s
774
775
776 # (depricated, use annotations for settings up join rules)
777 # Define special event join patterns for matched events
778 # Section consist of [pipe.join::<name>]
779 # [pipe.join::my_app]
780 ## Set match pattern for the fields
781 #; matchRegex.docker_container_image = my_app
782 #; matchRegex.stream = stdout
783 ## All events start from '[<digits>'
784 #; patternRegex = ^\[\d+
785
786
787 [input.prometheus::kubelet]
788
789 # disable prometheus kubelet metrics
790 disabled = false
791
792 # override type
793 type = kubernetes_prometheus
794
795 # specify Splunk index
796 index =
797
798 # override host (environment variables are supported, by default Kubernetes node name is used)
799 host = ${KUBERNETES_NODENAME}
800
801 # override source
802 source = kubelet
803
804 # how often to collect prometheus metrics
805 interval = 60s
806
807 # Prometheus endpoint, multiple values can be specified, collector tries them in order till finding the first
808 # working endpoint.
809 # At first trying to get it through proxy
810 endpoint.1proxy = https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}/api/v1/nodes/${KUBERNETES_NODENAME}/proxy/metrics
811 # In case if cannot get it through proxy, trying localhost
812 endpoint.2http = http://127.0.0.1:10255/metrics
813
814 # token for "Authorization: Bearer $(cat tokenPath)"
815 tokenPath = /var/run/secrets/kubernetes.io/serviceaccount/token
816
817 # server certificate for certificate validation
818 certPath = /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
819
820 # client certificate for authentication
821 clientCertPath =
822
823 # Allow invalid SSL server certificate
824 insecure = true
825
826 # include metrics help with the events
827 includeHelp = false
828
829 # set output (splunk or devnull, default is [general]defaultOutput)
830 output =
831
832
833 # [diagnostics::node-entropy]
834 # settings.path = /rootfs/proc/sys/kernel/random/entropy_avail
835 # settings.interval = 1h
836 # settings.threshold = 800
837
838
839 003-daemonset-master.conf: |
840 [input.prometheus::kubernetes-api]
841
842 # disable prometheus kubernetes-api metrics
843 disabled = false
844
845 # override type
846 type = kubernetes_prometheus
847
848 # specify Splunk index
849 index =
850
851 # override host (environment variables are supported, by default Kubernetes node name is used)
852 host = ${KUBERNETES_NODENAME}
853
854 # override source
855 source = kubernetes-api
856
857 # how often to collect prometheus metrics
858 interval = 60s
859
860 # prometheus endpoint
861 # at first trying to get it from localhost (avoiding load balancer, if multiple api servers)
862 endpoint.1localhost = https://127.0.0.1:6443/metrics
863 # as fallback using proxy
864 endpoint.2kubeapi = https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}/metrics
865
866 # token for "Authorization: Bearer $(cat tokenPath)"
867 tokenPath = /var/run/secrets/kubernetes.io/serviceaccount/token
868
869 # server certificate for certificate validation
870 certPath = /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
871
872 # client certificate for authentication
873 clientCertPath =
874
875 # Allow invalid SSL server certificate
876 insecure = true
877
878 # include metrics help with the events
879 includeHelp = false
880
881 # set output (splunk or devnull, default is [general]defaultOutput)
882 output =
883
884
885 # This configuration works if scheduled is bind to the localhost:10251
886 [input.prometheus::scheduler]
887
888 # disable prometheus scheduler metrics
889 disabled = false
890
891 # override type
892 type = kubernetes_prometheus
893
894 # specify Splunk index
895 index =
896
897 # override host
898 host = ${KUBERNETES_NODENAME}
899
900 # override source
901 source = scheduler
902
903 # how often to collect prometheus metrics
904 interval = 60s
905
906 # prometheus endpoint
907 endpoint = http://127.0.0.1:10251/metrics
908
909 # token for "Authorization: Bearer $(cat tokenPath)"
910 tokenPath =
911
912 # server certificate for certificate validation
913 certPath =
914
915 # client certificate for authentication
916 clientCertPath =
917
918 # Allow invalid SSL server certificate
919 insecure = true
920
921 # include metrics help with the events
922 includeHelp = false
923
924 # set output (splunk or devnull, default is [general]defaultOutput)
925 output =
926
927
928 # This configuration works if controller-manager is bind to the localhost:10252
929 [input.prometheus::controller-manager]
930
931 # disable prometheus controller-manager metrics
932 disabled = false
933
934 # override type
935 type = kubernetes_prometheus
936
937 # specify Splunk index
938 index =
939
940 # override host
941 host = ${KUBERNETES_NODENAME}
942
943 # override source
944 source = controller-manager
945
946 # how often to collect prometheus metrics
947 interval = 60s
948
949 # prometheus endpoint
950 endpoint = http://127.0.0.1:10252/metrics
951
952 # token for "Authorization: Bearer $(cat tokenPath)"
953 tokenPath =
954
955 # server certificate for certificate validation
956 certPath =
957
958 # client certificate for authentication
959 clientCertPath =
960
961 # Allow invalid SSL server certificate
962 insecure = false
963
964 # include metrics help with the events
965 includeHelp = false
966
967 # set output (splunk or devnull, default is [general]defaultOutput)
968 output =
969
970
971 [input.prometheus::etcd]
972
973 # disable prometheus etcd metrics
974 disabled = false
975
976 # override type
977 type = kubernetes_prometheus
978
979 # specify Splunk index
980 index =
981
982 # override host
983 host = ${KUBERNETES_NODENAME}
984
985 # override source
986 source = etcd
987
988 # how often to collect prometheus metricd
989 interval = 60s
990
991 # prometheus endpoint
992 endpoint.http = http://:2379/metrics
993 endpoint.https = https://:2379/metrics
994
995 # token for "Authorization: Bearer $(cat tokenPath)"
996 tokenPath =
997
998 # server certificate for certificate validation
999 certPath = /rootfs/etc/kubernetes/pki/etcd/ca.crt
1000
1001 # client certificate for authentication
1002 clientCertPath = /rootfs/etc/kubernetes/pki/apiserver-etcd-client.crt
1003 clientKeyPath = /rootfs/etc/kubernetes/pki/apiserver-etcd-client.key
1004
1005 # Allow invalid SSL server certificate
1006 insecure = true
1007
1008 # include metrics help with the events
1009 includeHelp = false
1010
1011 # set output (splunk or devnull, default is [general]defaultOutput)
1012 output =
1013
1014
1015 004-addon.conf: |
1016 [general]
1017
1018 # addons can be run in parallel with agents
1019 addon = true
1020
1021 [input.kubernetes_events]
1022
1023 # disable events
1024 disabled = false
1025
1026 # override type
1027 type = kubernetes_events
1028
1029 # specify Splunk index
1030 index =
1031
1032 # (obsolete, depends on kubernetes timeout)
1033 # Set the timeout for how long request to watch events going to hang reading.
1034 # eventsWatchTimeout = 30m
1035
1036 # (obsolete, depends on kubernetes timeout)
1037 # Ignore events last seen later that this duration.
1038 # eventsTTL = 12h
1039
1040 # set output (splunk or devnull, default is [general]defaultOutput)
1041 output =
1042
1043
1044 [input.kubernetes_watch::pods]
1045
1046 # disable events
1047 disabled = false
1048
1049 # Set the timeout for how often watch request should refresh the whole list
1050 refresh = 10m
1051
1052 apiVersion = v1
1053 kind = pod
1054 namespace =
1055
1056 # override type
1057 type = kubernetes_objects
1058
1059 # specify Splunk index
1060 index =
1061
1062 # set output (splunk or devnull, default is [general]defaultOutput)
1063 output =