• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Coldfusion log parse in Azure Log Analytics Workspace

Explorer ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

I created an Azure Container Instance and Coldfusion 2021 is running on it as a Docker image.

The application creates multiple log files. I sent all these logs to Standard Output by the symlink.

Now, I want to parse these logs file-wise in Azure Log Analytics Workspace.

 

Can anyone help me?

 

Thanks!

Thanks,
Souvik

Views

224

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

I don't see that there's anything cf-specific about this. With the cf logs symlinked to docker logs (or kubectl logs), your question would seem to be how to have a container in Azure route its logs to alaw. There are such generic docs at ms, such as if you use aks:

 

https://docs.microsoft.com/en-us/azure/azure-monitor/containers/container-insights-enable-existing-c...

 

If somehow that doesn't suit, please clarify a) which of the dozens of ways to run a container on Azure are you using, and b) are you really looking for help getting them INTO alaw, or some other aspect of "parsing" them? Have you already considered the dcr vs ingestion-time rules options, such as are discussed here:

 

https://docs.microsoft.com/en-us/azure/azure-monitor/logs/log-analytics-workspace-overview

 

(To be clear, I have not yet myself used any of these, though it sounds a lot like an ms-packaged implementation of loki and logql, which I am more familiar with.) 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

I am running the container in Azure Container Instance.

I also send Coldfusion custom logs to stdout and it's showing in alaw.

Now I want to parse logs file-wise in alaw but I am unable to do so as all logs are showing there. 

Thanks,
Souvik

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 18, 2022 Jun 18, 2022

Copy link to clipboard

Copied

Again,  nothing specific to cf here, nor really to aci. First, genericslly, if you symlink the cf "custom" logs to stdout, you WILL lose any way to distinguish them. If that distinction matters, you can't use that approach.

 

Instead, now you're looking at how (generically, with any container) you can get a containers "custom" logs to be fed to some logging solution (like LAW). And the most common solution (generically) is to adopt the sidecar pattern, where you run a other container alongside your cf container to watch its logs and send them elsewhere. Since they are in the same pod, the sidecar can see the logs in the cf (or whatever) container.

 

And again there's are many such logging sidecar and server solutions. One that is specific to LAW (and shows using it with ECS) is this one :

 

https://github.com/yangl900/log2oms

 

Check it out and let us know how it goes. Other Azure resources that may be useful are :

 

"Collect text logs with Log Analytics agent in Azure Monitor - Azure Monitor | Microsoft Docs" https://docs.microsoft.com/en-us/azure/azure-monitor/agents/data-sources-custom-logs

 

"Azure Monitor HTTP Data Collector API - Azure Monitor | Microsoft Docs" https://docs.microsoft.com/en-us/azure/azure-monitor/logs/data-collector-api


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 07, 2022 Jul 07, 2022

Copy link to clipboard

Copied

LATEST

@Charlie Arehart Thank you.

I used Data Collector API for different log files.

 

Thanks,
Souvik

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation