Setting Up Azure Log Analytics Integration
  • 25 Aug 2022
  • 2 Minutes to read
  • Dark
    Light

Setting Up Azure Log Analytics Integration

  • Dark
    Light

Article summary

Users with v8 installations can integrate with Azure Log Analytics for external logging capabilities and storage and organizing logs for Azure Containerization.

Azure Log Analytics allows Azure users to run queries on information gathered via the Azure Monitor tool. These tools can be used to Log and monitor Decisions Studio from outside the environment. Logging can be accomplished via Environment Variables or Logging Settings

Prerequisites 


Configuration

  1. Login to Azure Portal
  2. From the Azure Portal, under Azure Services, select Create resource
  3. In the Search services and marketplace box, search for and locate Log Analytics Workspace, then click Create > Log Analytics Workspace


  4. From the Create Log Analytics workspace, under Project details, select the desired Resource group. Then, under Instance details, provide a Name, and select the same Region as the Resource Group. 

  5. Click Review + Create.


  6. Navigate to the newly created Log Analytics Workspace; then, under Settings, click Agents management

  7. From the Agents management screen, copy both the Workspace ID and the Primary key into a Text Editor. 

Environment Variables Method

  1. From the Local File System of the Decisions v.8 installation, press the Windows key, or select the Search icon on the bottom toolbar, then locate and open the Edit system environment variables Control Panel.


  2. From the System Properties window, click the Environment Variables... button. 


  3. From the Environment Variables window, under System Variables, click New...

  4. In the resulting New System Variable window, in the Variable name box, provide the name "DECISIONS_LOG_AZURE_WORKSPACE_ID"; paste the previously copied Workspace ID in the Variable value box. Then, click OK. 

  5. Repeat the process with the variable name "DECISIONS_LOG_AZURE_AUTHENTICATION_ID " and the Primary Key in the Variable Value box.


    If desired, provide the Variable "DECISIONS_LOG_SERILOG_DEBUG" with the Value "True". Serilog.txt is a file that records any errors that occur with Azure Logging. By adding "DECISIONS_LOG_SERILOG_DEBUG" to the Local File System's list of environment variables and setting it to "true", it will create the file within the /Logs directory.


  6. From the Environment Variables window, click OK. Then, click OK from the System Properties window to save and close the window. 

  7. Proceed to Running Logs

Logging Settings Method

  1. From Decisions Studio, navigate to System > Settings > Logging Settings, then open Azure Log Analytics

  2. From the Azure Log Analytics window, select the desired Levels. Then, under SETTINGS, provide the respective Workspace Id and Authentication Id.

    Under Log Name, provide the desired value formatted as "[Log Name]_CL"; Then, click OK. 

    Log Name Default 
     If a Log Name is not provided, the default value in Azure will be DecisionsWeb_CL.

  3. Proceed to Running Logs

Running Logs

  1. Restart the Decisions service to ensure that Decisions knows the Azure Log settings.

  2. Navigate back to the Portal for the Log Analytics workspace; under the General category on the left-hand side of the screen, select Logs.

  3. Close out of the Queries window and create a New Query in the Query Editor, input the Log Name (either the custom one defined in Logging Settings or "DecisionsWeb_CL"), then click Run. 


  4. Verify that the expected Logs display. 

    Filtering Logs 
    If desired, the resulting Logs may be filtered using Kusto Query Language (KQL).



For further information on Modules, visit the Decisions Forum.

Was this article helpful?