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: README.md
+99-30Lines changed: 99 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -13,12 +13,17 @@ across their entire environment - using Logs, Metrics, and Object metadata.
13
13
14
14
It does extensive enrichment of logs, metrics and object information to enable cross correlation across entities from different tiers in OCI Logging Analytics. A collection of dashboards is provided to get users started quickly.
15
15
16
+
## Solution UI
17
+
18
+

@@ -35,7 +40,7 @@ It does extensive enrichment of logs, metrics and object information to enable c
35
40
36
41
### Pre-requisites
37
42
38
-
* OCI Logging Analytics service must be onboarded with the minumum required policies, in the OCI region where you want to monitor. Refer [Logging Analytics Quick Start](https://docs.oracle.com/en-us/iaas/logging-analytics/doc/quick-start.html) for details.
43
+
* OCI Logging Analytics service must be onboarded with the minimum required policies, in the OCI region where you want to monitor. Refer [Logging Analytics Quick Start](https://docs.oracle.com/en-us/iaas/logging-analytics/doc/quick-start.html) for details.
39
44
* Create OCI Logging Analytics LogGroup(s) if not done already. Refer [Create Log Group](https://docs.oracle.com/en-us/iaas/logging-analytics/doc/create-logging-analytics-resources.html#GUID-D1758CFB-861F-420D-B12F-34D1CC5E3E0E) for details.
40
45
* OCI Dynamic Groups, User Group and Policies.
41
46
<details>
@@ -47,11 +52,11 @@ It does extensive enrichment of logs, metrics and object information to enable c
47
52
```
48
53
* Create a dynamic group with following sample rule for OKE Instances.
49
54
```
50
-
ALL {instance.compartment.id='OCI Management Agent Compartment OCID'}
55
+
ALL {instance.compartment.id='OKE Cluster Compartment OCID'}
51
56
```
52
57
- **Note**: _This dynamic group is not required for non OKE or when you choose to use Config file based AuthZ for monitoring the logs._
53
58
* Create a user and user group using which the logs to be published to OCI Logging Analytics. Refer [Managing Users](https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingusers.htm) and [Managing User Groups](https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managinggroups.htm) for details.
54
-
- **Note**: _This is not required for OKE when you choose to use the default (Instance princiapal) AuthZ mechanism._
59
+
- **Note**: _This is not required for OKE when you choose to use the default (Instance principal) AuthZ mechanism._
55
60
* Create a policy with following statements.
56
61
* Policy Statement for providing necessary access to upload the metrics.
57
62
```
@@ -60,39 +65,85 @@ It does extensive enrichment of logs, metrics and object information to enable c
60
65
* Policy Statement for providing necessary access to upload the logs and objects data.
61
66
```
62
67
Allow dynamic-group <OKE Instances Dynamic Group> to {LOG_ANALYTICS_LOG_GROUP_UPLOAD_LOGS} in compartment <Compartment Name>
68
+
Allow dynamic-group <OKE Instances Dynamic Group> to {LOG_ANALYTICS_DISCOVERY_UPLOAD} in tenancy
63
69
```
64
70
OR
65
71
```
66
72
Allow group <User Group> to {LOG_ANALYTICS_LOG_GROUP_UPLOAD_LOGS} in compartment <Compartment Name>
73
+
Allow group <User Group> to {LOG_ANALYTICS_DISCOVERY_UPLOAD} in tenancy
67
74
```
75
+
- **Note**: _The policy definition for LOG_ANALYTICS_DISCOVERY_UPLOAD permission only works at tenancy level and thereby it must be created at tenancy level._
68
76
</details>
69
77
70
78
### Installation instructions
71
79
72
-
#### Multiple methods of installation are avialble, with following differences:
80
+
#### Multiple methods of installation are available, with following differences:
| OCI Logging Analytics Connect Cluster | OKE*** | :heavy_check_mark: | Manual | Partial Control (Recommended) | Customisations are possible through `Helm` once deployed using `Logging Analytics Connect Cluster` flow from Console, which is applicable for both Automatic and Manual Deployment modes. We recommend choosing Manual Deployment mode for OKE clusters with Private API Server endpoint, as support for the automatic deployment for the same would be available soon. |
85
+
| Helm | All* | :heavy_check_mark:** | Manual| Full Control (Recommended) | |
86
+
| OCI Resource Manager | OKE | :heavy_check_mark:** | :heavy_check_mark: | Partial Control | Customisations are possible through `Helm` once deployed using `OCI Resource Manager`. |
87
+
| Terraform | OKE | :heavy_check_mark:** | :heavy_check_mark: | Partial Control | Customisations are possible through `Helm` once deployed using `Terraform`. |
88
+
| kubectl | All* | :heavy_check_mark:** | Manual | Full Control (Not recommended) | |
80
89
81
90
\* For some environments, modification of the configuration may be required.
82
91
92
+
\** Solution UI experience including Topology and other visualisations are available for customers deploying the solution using methods other than `OCI Logging Analytics Connect Cluster`, only if some additional steps are followed as mentioned in their individual sections.
93
+
94
+
\*** Connect cluster support for EKS and clusters other than OKE (partially automated flow) would be available soon. Meanwhile, if you would like to experience the Solution for EKS, use [helm](#helm) or other deployment methods.
95
+
96
+
#### OCI Logging Analytics Connect Cluster
97
+
98
+
This newly launched UI based workflow from Logging Analytics Console is the recommended approach to start enabling Kubernetes Monitoring Solution for your OKE clusters. In this approach, you would go through a guided flow to enable the monitoring. It has support for both Automatic and Manual deployment modes to install helm charts onto your OKE clusters. The creation of various OCI resources like Logging Analytics LogGroup, Entity, Management Agent Install Key is automatically taken care in this approach irrespective of the deployment method that you choose. The required IAM Dynamic Group and Policies for the collection of logs, metrics, objects discovery data into OCI, can be optionally enabled when using this flow.
99
+
100
+
Customisations are possible through helm once deployed using `Logging Analytics Connect Cluster` flow from Console, which is applicable for both Automatic and Manual Deployment modes. We recommend choosing Manual Deployment mode for OKE clusters with Private API Server endpoint, as support for the automatic deployment for the same would be available soon.
101
+
102
+
Refer [this doc](https://docs.oracle.com/en-us/iaas/logging-analytics/doc/kubernetes-solution.html) for complete instructions on using this approach.
103
+
104
+
:hourglass_flowing_sand: Connect cluster support for EKS and clusters other than OKE (partially automated flow) would be available soon. Meanwhile, if you would like to experience the Solution for EKS, use [helm](#helm) or other deployment methods.
105
+
83
106
#### Helm
84
107
85
108
##### 0 Pre-requisites
86
109
87
110
* Workstation or OCI Cloud Shell with access configured to the target k8s cluster.
- <Cluster_Name> => Replace with Name of the Cluster.
122
+
- <Cluster_Creation_Time> => Replace with Cluster's creation time in the format, YYYY-MM-DDTHH:MM:SSZ. It is used to distinguish 2 clusters with same name if exists.
123
+
- <Unique_Identifier_of_Cluster> => Replace with OCID of OKE cluster OR ARN of EKS cluster, etc.
124
+
- <Kubernetes_Version> => Replace with version of Kubernetes running on the cluster.
125
+
- <O&M_Compartment_OCID> => Replace with OCID of the compartment in which the `Logging Analytics LogGroup` exists. Note that for the Logging Analytics Solution UI to work properly, you must keep all your OCI resources like `Logging Analytics LogGroup`, `Logging Analytics Entity`, `Management Agent Install Key` under the same compartment.
126
+
- <Cluster_Type> => Replace with `OKE` for OKE cluster, `EKS` for Amazon EKS Cluster, etc.
127
+
128
+
* Create Logging Analytics Entity of type Kubernetes Cluster using above created metadata.
- <Tenancy_Namespace> => Namespace of the tenancy in which the Logging Analytics is subscribed. You find it by `Go to OCI Logging Analytics Administration, click Service Details, and note the namespace value.`
134
+
135
+
##### 2 Create Logging Analytics LogGroup
136
+
137
+
Create OCI Logging Analytics LogGroup(s) if not done already. Refer [Create Log Group](https://docs.oracle.com/en-us/iaas/logging-analytics/doc/create-logging-analytics-resources.html#GUID-D1758CFB-861F-420D-B12F-34D1CC5E3E0E) for details.
* Go to [releases](https://github.com/oracle-quickstart/oci-kubernetes-monitoring/releases) for a specific version.
94
143
95
-
##### 2 Update values.yaml
144
+
##### 4 Update values.yaml
145
+
146
+
**Note** that for the Logging Analytics Solution UI to work properly, you must keep all your OCI resources like `Logging Analytics LogGroup`, `Logging Analytics Entity`, `Management Agent Install Key` under the same compartment.
96
147
97
148
* Create override_values.yaml, to override the minimum required variables in values.yaml.
98
149
- override_values.yaml
@@ -108,39 +159,48 @@ It does extensive enrichment of logs, metrics and object information to enable c
# Provide the base64 encoded content of the Management Agent Install Key file
115
168
installKeyFileContent:
116
169
```
117
170
* **Refer to the oci-onm chart and sub-charts values.yaml for customising or modifying any other configuration.** It is recommended to not modify the values.yaml provided with the charts, instead use override_values.yaml to achieve the same.
118
171
119
-
##### 3.a Install helm release
172
+
##### 5.a Install helm release
120
173
121
-
Use the following `helm install` command to the install the chart. Provide a desired release name, path to override_values.yaml and path to helm chart.
174
+
Use the following `helm install` command to the install the chart. Provide a desired release name, path to override_values.yaml and path to helm chart (oci-onm chart).
Refer [this](https://helm.sh/docs/helm/helm_install/) for further details on `helm install`.
126
179
127
-
##### 3.b Upgrade helm release
180
+
##### 5.b Upgrade helm release
128
181
129
182
Use the following `helm upgrade` command if any further changes to override_values.yaml needs to be applied or a new chart version needs to be deployed.
Refer [this](https://helm.sh/docs/helm/helm_upgrade/) for further details on `helm upgrade`.
134
187
135
-
##### 3.c Import Dashboards
188
+
**Note** : If you have lost the override_values.yaml that was used while installing the helm (OR) you need to get the default one that was used while installing using other approaches like `OCI Logging Analytics Connect Cluster`, `OCI Resource Manager` etc., then run the following command to generate the same.
189
+
190
+
```
191
+
helm get values <release-name> > override_values.yaml
192
+
```
193
+
\<release-name> => Replace with release name. The default release name used while installing through `OCI Logging Analytics Connect Cluster` is `oci-kubernetes-monitoring`.
194
+
195
+
##### 5.c (Optional) Import Dashboards
136
196
137
197
Dashboards needs to be imported manually. Below is an example for importing Dashboards using OCI CLI.
138
198
139
199
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.
140
200
2. Find the **OCID** of the compartment, where the dashboards need to be imported.
141
201
3. Download the dashboard JSONs from [here](terraform/modules/dashboards/dashboards_json/).
142
202
4. **Replace** all the instances of the keyword - "`${compartment_ocid}`" in the JSONs with the **Compartment OCID** identified in previous step.
143
-
* Following command is for quick reference that can be used in a linux/cloud-shell envirnment :
203
+
* Following command is for quick reference that can be used in a linux/cloud-shell environment :
144
204
145
205
```
146
206
sed -i "s/\${compartment_ocid}/<Replace-with-Compartment-OCID>/g" *.json
@@ -156,7 +216,7 @@ Dashboards needs to be imported manually. Below is an example for importing Dash
Use the following `helm template` command to generate the resource yaml files. Provide path to override_values.yaml, path to helm chart and path to a dir where the yaml files to be generated.
275
+
Use the following `helm template` command to generate the resource yaml files. Provide path to override_values.yaml, path to helm chart (oci-onm chart) and path to a dir where the yaml files to be generated.
Refer [this](https://helm.sh/docs/helm/helm_template/) for further details on `helm template`.
211
280
212
-
##### 3.b Install
281
+
##### 5.b Install
213
282
214
283
Use `kubectl` tool to apply the yaml files generated in the previous step in the following order.
215
284
@@ -237,7 +306,7 @@ Use `kubectl` tool to apply the yaml files generated in the previous step in the
237
306
kubectl apply -f metric_server.yaml
238
307
```
239
308
240
-
##### 3.c Import Dashboards
309
+
##### 5.c (Optional) Import Dashboards
241
310
242
311
Refer [here](#3c-import-dashboards).
243
312
@@ -283,7 +352,7 @@ We recommend you to uninstall the release created using 2.x chart and follow the
283
352
284
353
If you have modified values.yaml provided in helm chart directly, we recommend you to identify all the changes and move them to override_values.yaml and follow the instructions provided in install or upgrade sections under [this](#helm). We recommend you to use override_values.yaml for updating values for any variables or to incorporate any customisations on top of existing values.yaml.
285
354
286
-
If you are already using a separate values.yaml for your customisations, you still need to compare 2.x vs 3.x variable heirarchy and make the necessary changes accordingly.
355
+
If you are already using a separate values.yaml for your customisations, you still need to compare 2.x vs 3.x variable hierarchy and make the necessary changes accordingly.
0 commit comments