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
+50-6Lines changed: 50 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -42,37 +42,81 @@ It does extensive enrichment of logs, metrics and object information to enable c
42
42
43
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.
44
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.
45
+
46
+
* Compartments:
47
+
* OKE Compartment: where OKE and related infra resources are created.
48
+
* Different OKE components such as Node Pools, VCN, Subnets, Load Balancers may be hosted in different compartments (other than OKE compartment).
49
+
* You may need to modify the policy statements if any of the above resources are not created in same compartment as OKEs.
50
+
* ONM Compartment: where Observability & Monitoring resources will be created.
51
+
* OCI resources such as entities, management agent key, service connector, logging logs and logGroup, RMS stack and jobs will be created in this compartment.
52
+
* It can be same as OKE compartment.
45
53
* OCI Dynamic Groups, User Group and Policies.
46
54
<details>
47
55
<summary>Details</summary>
48
-
56
+
49
57
* Create a dynamic group with the following sample rule for OCI Management Agent. Refer [Managing Dynamic Groups](https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingdynamicgroups.htm) for details.
50
58
```
51
-
ALL {resource.type='managementagent', resource.compartment.id='OCI Management Agent Compartment OCID'}
59
+
ALL {resource.type='managementagent', resource.compartment.id='ONM Compartment OCID'}
52
60
```
53
-
* Create a dynamic group with following sample rule for OKE Instances.
61
+
62
+
* Create a dynamic group with following sample rule for OKE Instances.
54
63
```
55
64
ALL {instance.compartment.id='OKE Cluster Compartment OCID'}
56
65
```
57
66
- **Note**: _This dynamic group is not required for non OKE or when you choose to use Config file based AuthZ for monitoring the logs._
67
+
58
68
* 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.
59
69
- **Note**: _This is not required for OKE when you choose to use the default (Instance principal) AuthZ mechanism._
70
+
60
71
* Create a policy with following statements.
61
72
* Policy Statement for providing necessary access to upload the metrics.
62
73
```
63
-
Allow dynamic-group <OCI Management Agent Dynamic Group> to use metrics in compartment <Compartment Name> WHERE target.metrics.namespace = 'mgmtagent_kubernetes_metrics'
74
+
Allow dynamic-group <OCI Management Agent Dynamic Group> to use metrics in compartment id <ONM Compartment OCID> WHERE target.metrics.namespace = 'mgmtagent_kubernetes_metrics'
64
75
```
76
+
65
77
* Policy Statement for providing necessary access to upload the logs and objects data.
66
78
```
67
-
Allow dynamic-group <OKE Instances Dynamic Group> to {LOG_ANALYTICS_LOG_GROUP_UPLOAD_LOGS} in compartment <Compartment Name>
79
+
Allow dynamic-group <OKE Instances Dynamic Group> to {LOG_ANALYTICS_LOG_GROUP_UPLOAD_LOGS} in compartment id <ONM Compartment OCID>
68
80
Allow dynamic-group <OKE Instances Dynamic Group> to {LOG_ANALYTICS_DISCOVERY_UPLOAD} in tenancy
69
81
```
70
82
OR
71
83
```
72
-
Allow group <User Group> to {LOG_ANALYTICS_LOG_GROUP_UPLOAD_LOGS} in compartment <Compartment Name>
84
+
Allow group <User Group> to {LOG_ANALYTICS_LOG_GROUP_UPLOAD_LOGS} in compartment id <ONM Compartment OCID>
73
85
Allow group <User Group> to {LOG_ANALYTICS_DISCOVERY_UPLOAD} in tenancy
74
86
```
75
87
- **Note**: _The policy definition for LOG_ANALYTICS_DISCOVERY_UPLOAD permission only works at tenancy level and thereby it must be created at tenancy level._
88
+
89
+
* Policy statements for providing necessary access to enable OKE infra discovery and service logs collection.
90
+
* Only required if service logs [collection is enabled](docs/FAQ.md#how-to-enable-oke-infra-discovery-and-corresponding-infra-services-log-collection)
91
+
```
92
+
Allow dynamic-group <OKE Instances Dynamic Group> to {CLUSTER_READ} in compartment id <OKE Compartment OCID> where target.cluster.id='<OKE Cluster OCID>'
93
+
Allow dynamic-group <OKE Instances Dynamic Group> to read cluster-node-pools in compartment id <OKE Compartment OCID>
94
+
Allow dynamic-group <OKE Instances Dynamic Group> to inspect vcns in compartment id <OKE Compartment OCID>
95
+
Allow dynamic-group <OKE Instances Dynamic Group> to inspect subnets in compartment id <OKE Compartment OCID>
96
+
Allow dynamic-group <OKE Instances Dynamic Group> to read load-balancers in compartment id <OKE Compartment OCID>
97
+
98
+
Allow dynamic-group <OKE Instances Dynamic Group> to read loganalytics-entity in compartment id <ONM Compartment OCID>
99
+
Allow dynamic-group <OKE Instances Dynamic Group> to manage orm-jobs in compartment id <ONM Compartment OCID>
100
+
Allow dynamic-group <OKE Instances Dynamic Group> to manage orm-stacks in compartment id <ONM Compartment OCID>
101
+
102
+
Allow dynamic-group <OKE Instances Dynamic Group> to use load-balancers in compartment id <OKE Compartment OCID>
103
+
Allow dynamic-group <OKE Instances Dynamic Group> to {SUBNET_UPDATE} in compartment id <OKE Compartment OCID>
104
+
Allow dynamic-group <OKE Instances Dynamic Group> to {CLUSTER_UPDATE} in compartment id <OKE Compartment OCID>
105
+
Allow dynamic-group <OKE Instances Dynamic Group> to read log-content in compartment id <OKE Compartment OCID>
106
+
Allow dynamic-group <OKE Instances Dynamic Group> to read log-content in compartment id <ONM Compartment OCID>
107
+
Allow dynamic-group <OKE Instances Dynamic Group> to use log-groups in compartment id <OKE Compartment OCID>
108
+
Allow dynamic-group <OKE Instances Dynamic Group> to manage log-groups in compartment id <ONM Compartment OCID>
109
+
110
+
Allow dynamic-group <OKE Instances Dynamic Group> to manage serviceconnectors in compartment id <ONM Compartment OCID>
111
+
Allow any-user to {LOG_ANALYTICS_LOG_GROUP_UPLOAD_LOGS} in compartment id <Compartment OCID> where all {request.principal.type='serviceconnector', request.principal.compartment.id='<Compartment OCID>'}
112
+
113
+
Allow service loganalytics to {VCN_READ,SUBNET_READ,LOAD_BALANCER_READ,CLUSTER_READ,VNIC_READ} in compartment id <OKE Compartment OCID>
114
+
```
115
+
116
+
* Policy Statement for using tag namespaces. (*_Only required if defined tags are used_)
117
+
```
118
+
Allow dynamic-group <OKE Instances Dynamic Group> to use tag-namespaces in tenancy where any {target.tag-namespace.name='example-ns-1', target.tag-namespace.name='example-ns-2'}
0 commit comments