Need help configuring Grafana plugin for OCI

Hello Everyone,

I am looking for some help with configuring grafana to display OCI metrics. I am following the instructions from https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/grafana.htm

I am doing a setup on a local host (Outside of OCI), So as instructed created a user “monitor_oci” in OCI with privileges to monitor my cloud resources in my tenancy.

I have grafana working on the localhost (running OEL 6) configured to use prometheus as Default datasource. Installed the oci plugin. Installed it as root.

I have created a user “oci_monitor” on my localhost and set up OCI CLI, and configured it to use the “monitor_oci” user in the tenancy. I am able to make calls using OCICLI

When trying to create the Datasource. I am getting a message "Data source is not working
" .

I have two queries here:

  1. Which user should be able to make OCI calls using OCI CLI? as OCI is getting installed on /home/oci_monitor/bin only oci_monitor is able to run it. Grafana is running as user grafana.

  2. Can I get a more detailed log of what is failing when grafana is trying add the data source?

Any help is much appreciated.

Thanks!
Bapi

Hi,

To anyone facing the same issue, User grafana needs to able to connect to oci using oci-cli, It accesses the config from

[root@mycb grafana]# pwd
/usr/share/grafana

[root@mycb grafana]# ls -latr
.
.
drwxr-xr-x.  2 grafana grafana   73 May 20 03:05 .oci
drwxr-xr-x.  2 grafana grafana   73 May 20 03:06 .oraclebmc

Place valid config file in them and the api keys and retry to add data source.

Also, log is in /var/log/grafana/grafana.log