Introduction
OCI Log Analytics is a great value add to OIC monitoring, especially in respect of OIC fleet management.
Previously, we needed to send the logs via OCI Logging, and, from there, via a Connector to OCI Log Analytics. Some customer also experienced data truncation, when pushing the activity stream logs bia OCI Logging.
Net, net, the above problem is solved, as you will see, we've simplified this completely.
Just go to your service instance page in the OCI console, select your service instance and then check out the Settings section on the Details tab -
Now for a bit of reading, check out the docs here.
We have to ensure we have a log group for OIC logs in OCI Log Analytics -
For this we need the OIC client id; this can be retrieved by the Oracle Cloud Services app, auto-created when you provisioned your instance.
Click OAuth configuration and then scroll down to General Information, here you find the client id -
Now to the Policy which will grant permissions to the dynamic group.
allow dynamic-group DynamicGroup to {LOG_ANALYTICS_LOG_GROUP_UPLOAD_LOGS} in compartment LogGroup_Compartment
allow dynamic-group DynamicGroup to {LOG_ANALYTICS_SOURCE_READ} in tenancy
allow dynamic-group DynamicGroup to use loganalytics-ondemand-upload in tenancy
allow dynamic-group DynamicGroup to {LOG_ANALYTICS_LOG_GROUP_UPLOAD_LOGS} in tenancy
That's the prep work done, all we need to do now is enable this in the OIC service instance page -
Click enable and enter the ocid of your target OCI Log Analytics log group.
Note, I ran the integration in Debug mode.

No comments:
Post a Comment