How do I disable Log Analytics Workspace without deleting it?

BJ Kea 21 Reputation points
2023-09-05T21:53:43.0233333+00:00

I have a Free Tier Azure account and I use Log Analytics for my container application. However, I get a charge every month for Log Analytics, and I want to avoid that. I don't want to delete my workspace because it will break my application and it will be hard to restore it. Is there a way to keep my workspace but stop the charge? I need a professional solution to this problem.

Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
3,579 questions
{count} votes

3 answers

Sort by: Most helpful
  1. AnuragSingh-MSFT 21,546 Reputation points Moderator
    2023-09-18T08:08:22.3033333+00:00

    BJ Kea, thank you for the reply.

    I think I understood the issue here. I assume that you are following the steps as highlighted in the following link to create the container apps - Quickstart: Deploy your first container app using the Azure portal

    In this set of steps, the 4th step under "Create an environment" option mentions to "Select the Monitoring tab to create a Log Analytics workspace.".

    Note that this "Monitoring" setting is optional, and you can choose "Don't save log" from this tab, if you do not want the container apps to store logs. You will still be able to stream them live but historical logs will not be available.

    In case, you have already created container apps using the steps above, you can still disable the saving of logs to "Log Analytics", by following the steps below:

    1. In Azure portal, navigate to your "Container App" instance.
    2. From the "Overview" menu, click on the "Container Apps Environment" link as shown below. The Azure Container App environment is the secure boundary around one or more container apps and jobs. This is what provides the runtime environment for container apps.

    User's image

    1. This opens up the "Container Apps Environment" instance in Azure portal. Select "Logging options" from resource menu, and click on "Don't save logs"

    User's image

    1. Once you click "Save" on this page, the dependency on LA workspace will be removed. The logs will be only available under the "Log Stream" option, but you will not be able to review them later.
    2. There is also a possibility that you might see "Diagnostic Settings" too along with "Logging Option" here, if you have selected "Azure monitor" when creating the Container Apps Environment. In that case, you can review the settings under "Diagnostic Settings" and delete any setting which says that it is forwarding logs to "Log Analytics Workspace"

    For more details on these options, please see Log storage and monitoring options in Azure Container Apps. Although these log saving settings are optional, they play a critical role in diagnosing and troubleshooting issues with container apps. Therefore, these options are enabled by default.

    Hope this helps.

    In case this still does not resolve your issue, can you please share the following information:

    1. How are you creating container apps? A link to the relevant document or cmdline/template (if creating using script/cmdline/PowerShell) should help us understand the issue better.
    2. What do you see under "Logging options" and "Diagnostic Settings" as mentioned in the steps in earlier part of this reply.
    3. When you deleted the "LA workspace" (as it needed to be recreated based on your last reply), did it break the container apps? Did you start receiving any specific error/s?
    4. "...workspace associated with my subscription" - can you please clarify this? A LA workspace is a resource, just like Virtual machines or App Service, in Azure Subscription. Like other resources, there can be multiple LA workspace in a single subscription. Why did you say that it is associated with your subscription? By chance, have you enabled "Send Activity logs to Log Analytics workspace"? If yes, you can follow the steps below to remove that dependency as well, in case it is not required:
    • In Azure Portal --> Monitor --> click "Export Activity Logs".
    • If you have any entry in this view, you can click on respective "Edit Setting" option in the row and "Delete" the setting which forwards the "Activity Logs" to Log Analytics Workspace.

    Hope this helps. Please let me know if you have any questions.

    1 person found this answer helpful.
    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

  3. Earla Veera Kumar 0 Reputation points
    2024-11-01T20:50:54.5633333+00:00

    I want to disable Log analytics workspace without deleting it. because i have logs in it which are collected before. wants to keep them for an interval of 1 year. so i want to disable the communication/ break the log collection link with other Azure resources, so that the log analytics workspace will be in standalone.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.