You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,16 @@
1
1
# Change Log
2
2
3
+
## 2022-02-07
4
+
### Added
5
+
- Create a new mount (rw) using the value provided for baseDir.
6
+
- Expose "encoding" parameter of Fluentd's tail plugin as part of values.yaml, which allows users to override default encoding (ASCII-8BIT) for applicable logs/log types.
7
+
- Partial CRI logs handling.
8
+
- Oracle Resource Manager / Terraform support for deploying the solution.
9
+
### Changed
10
+
- Modified /var/log to mount as readonly by default, except when /var/log is set as baseDir (to store Fluentd state, buffer etc.,).
11
+
### Breaking Changes
12
+
- Logging Analytics Fluentd Output plugin log location will be derived using baseDir instead using value of fluentd:ociLoggingAnalyticsOutputPlugin:plugin_log_location. The default value still remains unchanged and is a non breaking change except if it was modified to a different value.
13
+
3
14
## 2022-08-30
4
15
### Added
5
16
- Helm chart templatisation/parameterisation to provide granular level control on the chart and its values.
Copy file name to clipboardExpand all lines: README.md
+127-2Lines changed: 127 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,13 @@
4
4
5
5
This provides an end-to-end monitoring solution for Oracle Container Engine for Kubernetes (OKE) and other forms of Kubernetes Clusters using Logging Analytics, Monitoring and other Oracle Cloud Infrastructure (OCI) Services.
@@ -75,6 +78,26 @@ The following are the list of objects supported at present:
75
78
76
79
## Installation Instructions
77
80
81
+
### Deploy using Oracle Resource Manager
82
+
83
+
> **_NOTE:_** If you aren't already signed in, when prompted, enter the tenancy and user credentials. Review and accept the terms and conditions. If you aren't on-boarded to OCI Logging Analytics, refer to [Pre-requisites](#pre-requisites) section to enable Logging Analytics in the region where you want to deploy the stack. The default container image available through the deployment is only for demo/non-production use-cases, we recommend you to refer [Docker Image](#docker-image) section to build your own image.
84
+
85
+
- Click to deploy the stack
86
+
87
+
[![Deploy to Oracle Cloud][orm_button]][oci_kubernetes_monitoring_stack]
88
+
89
+
- Select the region and compartment where you want to deploy the stack.
90
+
91
+
- Follow the on-screen prompts and instructions to create the stack.
92
+
93
+
- After creating the stack, click Terraform Actions, and select Plan.
94
+
95
+
- Wait for the job to be completed, and review the plan.
96
+
97
+
- To make any changes, return to the Stack Details page, click Edit Stack, and make the required changes. Then, run the Plan action again.
98
+
99
+
- If no further changes are necessary, return to the Stack Details page, click Terraform Actions, and select Apply.
100
+
78
101
### Pre-requisites
79
102
80
103
- Logging Analytics Service must be enabled in the given OCI region before trying out the following Solution. Refer [Logging Analytics Quick Start](https://docs.oracle.com/en-us/iaas/logging-analytics/doc/quick-start.html) for details.
@@ -393,3 +416,105 @@ subjects:
393
416
name: <serviceaccount>
394
417
namespace: <namespace>
395
418
```
419
+
420
+
### How to set encoding for logs ?
421
+
422
+
**Note**: This is supported only through the helm chart based deployment.
423
+
424
+
By default Fluentd tail plugin that is being used to collect various logs has default encoding set to ASCII-8BIT. To overrided the default encoding, use one of the following approaches.
425
+
426
+
#### Global level
427
+
428
+
Set value for encoding under fluentd:tailPlugin section of values.yaml, which applies to all the logs being collected from the cluster.
429
+
430
+
```
431
+
fluentd:
432
+
...
433
+
...
434
+
tailPlugin:
435
+
...
436
+
...
437
+
encoding: <ENCODING-VALUE>
438
+
```
439
+
440
+
#### Specific log type level
441
+
442
+
The encoding can be set at invidivual log types like kubernetesSystem, linuxSystem, genericContainerLogs, which applies to all the logs under the specific log type.
443
+
444
+
```
445
+
fluentd:
446
+
...
447
+
...
448
+
kubernetesSystem:
449
+
...
450
+
...
451
+
encoding: <ENCODING-VALUE>
452
+
```
453
+
454
+
```
455
+
fluentd:
456
+
...
457
+
...
458
+
genericContainerLogs:
459
+
...
460
+
...
461
+
encoding: <ENCODING-VALUE>
462
+
```
463
+
464
+
#### Specific log level
465
+
466
+
The encoding can be set at individual log level too, which takes precedence over all others.
The Dashboards are imported as part of deploying the Kubernetes solution using [Oracle Resource Manager stack](#deploy-using-oracle-resource-manager). The following steps can be used to import the Dashboards manually to your tenancy.
496
+
497
+
1. Download and configure [OCI CLI](https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm) or open cloud-shell where OCI CLI is pre-installed. Alternative methods like REST API, SDK, Terraform etc can also be used.
498
+
1. Find the **OCID** of compartment, where the dashboards need to be imported.
499
+
1. Download the dashboard JSONs from [here](logan/terraform/oke/modules/dashboards/dashboards_json/).
500
+
1. **Replace** all the instances of the keyword - "`${compartment_ocid}`" in the JSONs with the **Compartment OCID** identified in STEP 2.
501
+
- Following are the set of commands for quick reference that can be used in a linux/cloud-shell envirnment :
502
+
503
+
```
504
+
sed -i "s/\${compartment_ocid}/<Replace-with-Compartment-OCID>/g" file://cluster.json
505
+
sed -i "s/\${compartment_ocid}/<Replace-with-Compartment-OCID>/g" file://node.json
506
+
sed -i "s/\${compartment_ocid}/<Replace-with-Compartment-OCID>/g" file://workload.json
507
+
sed -i "s/\${compartment_ocid}/<Replace-with-Compartment-OCID>/g" file://pod.json
508
+
```
509
+
1. Run the following commands to import the dashboards.
# Concat filter to handle partial logs in CRI/ContainerD
145
+
# Docker can also have partial logs but handling is different for different docker versions. Considering Kubernetes/OKE moved to ContainerD/CRI since last 4-5 releases, ignoring docker handling.
146
+
# This filter can not be clubbed with concat filter for multiline as both are mutually exclusive.
147
+
{{- if eq $runtime "cri" }}
148
+
<filter oci.oke.{{ $name }}.**>
149
+
@type concat
150
+
key message
151
+
use_partial_cri_logtag true
152
+
partial_cri_logtag_key logtag
153
+
partial_cri_stream_key stream
154
+
# timeout scenario should not occur in general for partial logs handling
{{- if eq "false" ($logDefinition.isContainerLog | toString) }}
330
370
{{- if $logDefinition.multilineStartRegExp }}
@@ -368,7 +408,20 @@ data:
368
408
tag ${tag}
369
409
</record>
370
410
</filter>
371
-
411
+
# Concat filter to handle partial logs in CRI/ContainerD
412
+
# Docker can also have partial logs but handling is different for different docker versions. Considering Kubernetes/OKE moved to ContainerD/CRI since last 4-5 releases, ignoring docker handling.
413
+
# This filter can not be clubbed with concat filter for multiline as both are mutually exclusive.
414
+
{{- if and (ne "false" ($logDefinition.isContainerLog | toString)) (eq $runtime "cri") }}
415
+
<filter oci.oke.{{ $name }}.**>
416
+
@type concat
417
+
key message
418
+
use_partial_cri_logtag true
419
+
partial_cri_logtag_key logtag
420
+
partial_cri_stream_key stream
421
+
# timeout scenario should not occur in general for partial logs handling
422
+
timeout_label "@NORMAL"
423
+
</filter>
424
+
{{- end }}
372
425
{{- if and (ne "false" ($logDefinition.isContainerLog | toString)) ($logDefinition.multilineStartRegExp) }}
# Concat filter to handle partial logs in CRI/ContainerD
511
+
# Docker can also have partial logs but handling is different for different docker versions. Considering Kubernetes/OKE moved to ContainerD/CRI since last 4-5 releases, ignoring docker handling.
512
+
# This filter can not be clubbed with concat filter for multiline as both are mutually exclusive.
513
+
{{- if eq $runtime "cri" }}
514
+
<filter oci.oke.containerlogs.**>
515
+
@type concat
516
+
key message
517
+
use_partial_cri_logtag true
518
+
partial_cri_logtag_key logtag
519
+
partial_cri_stream_key stream
520
+
# timeout scenario should not occur in general for partial logs handling
0 commit comments