1

I have an Azure Container Instance running a docker image of Coldfusion application. I also configured this Container Instance to Log Analytics Workspace.

Now I need the Coldfusion logs to show at Log Analytics Workspace. I am unable to get those logs.

Is there a way to get those logs at Log Analytics Workspace.

2 Answers 2

1

Creating the log analytics workspace first and then providing the workspace ID and workspace key at container group creation worked fine for me (no need to create them both "at the same time"). Note, that it does take up to 10 minutes (according to the docs) for the ContainerInstanceLog_CL table to populate with your container's console logs.

Various programmatic ways to specify this at container creation, pertinent bit of C# client code shown below.

var containerGroupData = new ContainerGroupData(location, new[] { container }, ContainerInstanceOperatingSystemType.Linux);
var logAnalyticsWorkspaceId = ConfigurationManager.AppSettings["LogAnalyticsWorkspaceId"];
var logAnalyticsWorkspaceKey = ConfigurationManager.AppSettings["LogAnalyticsWorkspaceKey"];
containerGroupData.DiagnosticsLogAnalytics = new ContainerGroupLogAnalytics(logAnalyticsWorkspaceId, logAnalyticsWorkspaceKey);
Sign up to request clarification or add additional context in comments.

Comments

0

Assuming you have integrated the log analytic workspace after creation of azure container instance.

  1. If this is the case it won't works for you, for storing logs of container instance we have to create the log analytic workspace while creating the azure container instance.
  2. So you will need to delete and recreate the container instance.

You can refer this microsoft document for detailed information of how to store the logs in log analytic workspace. you can also refer this link. for custom log.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.