oracle / oci-grafana-metrics

Grafana datasource plugin for OCI metrics
https://grafana.com/grafana/plugins/oci-metrics-datasource
Universal Permissive License v1.0
79 stars 40 forks source link

Documentation clarification of 'Environment' when configuring datasource #124

Closed alexdyas closed 9 months ago

alexdyas commented 2 years ago

The documentation (kubernetes.md) states:

"Fill in your Tenancy OCID, Default Region, and Environment. Your Default region is the same as your home region listed in the Tenancy Details page. For Environment choose OCI Instance."

I can't find any clarification on what "Environment" means in this case, the documentation should be clearer here. What is the difference between "OCI Instance" and "local"? I'm happy to submit a PR if someone explains this.

Thanks.

ghost commented 2 years ago

I believe there are two ways to configure Grafana data source to access OCI. I am sure you understand the fact that the Grafana environment will not have permissions to access OCI resources. My understanding is when you choose 1) Local: The grafana service will use OCI user credentials (your .oci cli configuration) to access logs and metrics. Which means you need to create a user/group and give this user permissions to read logs and metrics 2) OCI Instance: In this case an OCI compute instance (instead of a user) is part of a dynamic group that has permissions to read oci logs/metrics. This OCI VM instance would have grafana installed. So depending on how you setup the policy - user permissions to read oci logs/metrics or OCI instance to read logs/metrics - you would select local or OCI Instance.

I still have not gotten this to work since i am using Grafana as a pod in OKE and my data source isn't working.