Administer > Configure Windows Event Log

Configure Windows Event Log

OMi MP for Microsoft Azure monitors event log only for Azure RM Windows VMs. You must deploy the Microsoft Azure Windows Events Log Monitoring aspect to begin the monitoring of Windows Event Log. Before you deploy the aspect, make sure you have enabled the categories in Diagnostics Setting blade of the Microsoft Azure portal. You must replicate the preferences set in Azure portal in MSAzure_WindowsEventLogMon_Config policy and deploy the version of aspect including the policy setting.

Configure Microsoft Azure windows event log monitoring aspect

By default, all the Storage Accounts in the subscription are monitored for the log files. You can also specify the particular VMs, log type or error level that you want to monitor. Modify the MSAzure_WindowsEventLogMon_Config policy and then deploy the latest version of Aspect. By default, following configuration is set in the policy.

XML tags Default value Definition
Subscription id * All the subscriptions provided during Discovery
StorageAccount * All the storage accounts associated with the subscription ID
EventLog * Application and System event logs.
level * Events with critical and error severity.

Follow the steps to edit the policy and deploy the aspect:

  1. Open the Management Templates & Aspects pane:

    Click Administration > Monitoring > Management Templates & Aspects.

  2. In the Configuration Folders pane:

    Click Configuration Folders > Cloud Management > Microsoft Azure > Aspects.

  3. In the Management Templates & Aspects pane, click Microsoft Azure Windows Event Log Monitoring Aspect and then click .

    The Microsoft Azure Windows Event Log Monitoring: Edit Aspect window appears.

  4. In the Policy Template tab, select the MSAzure_WindowsEventLogMon_Config policy and click Edit Policy Template (Raw Mode).

    The Edit Policy Template window appears.

  5. In the Policy Data tab, specify the Storage account, virtual machine, and Event Log category (Application, System or Security) that you need to monitor.

    If you require to monitor specific account, VMs or event category, then specify data in the required block and modify the policy with following syntax.

    <Subscriptions>
       <Subscription id="*">  
         <StorageAccounts>
           <StorageAccount name="*">
              <EventLog type="*" level="Critical,Error"/>
              <VirtualMachines>
                   <VMName name="*" />
              </VirtualMachines>
           </StorageAccount>
          </StorageAccounts>
       </Subscription>
    </Subscriptions>

    You can specify multiple subscriptions, storage accounts, multiple eventlog type or different error levels.

  6. Click Save and Close. New version of policy is created.
  7. In the Policy Templates tab, select the latest version of MSAzure_WindowsEventLogMon_Config policy and click OK. New version of aspect is created.
  8. In the Management Templates & Aspects pane, select the latest version of the Aspect and click .
  9. In the Configuration Item tab, select the CI and click Next.
  10. In the Parameter Summary tab, click Finish.

Configuration examples

Following are few scenarios and configuration syntax.

  1. Monitoring Storage Account for a particular Subscription for default Event Log Type (Application and System) and Error Levels (critial and error)

    <Subscriptions>
    	<Subscription id="eaxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx6d">
    	 <StorageAccounts>
    	  <StorageAccount name="mpqagroupdiag358">
    		<EventLog type="*" level="Critical,Error"/>
    		<VirtualMachines>
    			<VMName name="*" />
    		</VirtualMachines>
    	  </StorageAccount>
    	 </StorageAccounts>
    	</Subscription>
    </Subscriptions>
    
  2. Monitoring all Storage Account for a particular Subscription for default Event Log Type (Application,System) and all Error Levels.

    <Subscriptions>
    	<Subscription id="exxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx6d"> 
    	 <StorageAccounts>
    	  <StorageAccount name="*">
    		<EventLog type="*" level="Critical,Error,Information,Verbose,Warning"/>
    		<VirtualMachines>
    			<VMName name="*" />
    		</VirtualMachines>
    	  </StorageAccount>
    	 </StorageAccounts>
           </Subscription>
    </Subscriptions>
  3. Monitoring Storage Accounts of multiple subscription for the specified VMs.

    <Subscriptions>
    	<Subscription id="3yxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxy7">
    	<StorageAccounts>
    	   <StorageAccount name="testing">
    		<EventLog type="*" level="Critical,Error"/>
    		<VirtualMachines>
    			<VMName name="btpvm1234"/>
    			<VMName name="btpvm2345"/>
    		</VirtualMachines>
    	   </StorageAccount>
    	</StorageAccounts>
          </Subscription>
            <Subscription id="eyxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxd">
    	<StorageAccounts>
    	    <StorageAccount name="storageaccountodelete324234">
    		<EventLog type="*" level="Critical,Error"/>
    		<VirtualMachines>
    			<VMName name="*" />
    		</VirtualMachines>
    	    </StorageAccount>
    	</StorageAccounts>
    </Subscription>