The OMSDataInjection PowerShell module provides abilities to inject custom data into Microsoft Operations Management Suite (OMS) using it's HTTP data Collector API. This module also provides an Azure Automation / SMA connection type called 'OMSWorkspace', so it can be used in automation runbooks.
Install-module OMSDataInjection
Download this module from github, and place the OMSDataInjection module folder to 'C:\Program Files\WindowsPowerShell\Modules'
Find-Module OMSDataInjection | Save-Module -Force -Path 'C:\Temp'
Injecting custom data into Microsoft Operations Management Suite (OMS) Log Analytics using its HTTP Data Collector API.
Use Get-Help New-OMSDataInjection -Full to access the help file for this function.
Injecting data using JSON formatted string by specifying the OMSWorkspace Azure Automation / SMA connection object (to be used in a runbook)
- Added support for adding Azure Resource Id to the log entry
- Updated injection result error handling to reflect the change of the OMS HTTP Data Collector API response code for successful injection.
- Changed the UTCTimeGenerated input parameter from mandatory to optional. When it is not specified, the injection time will be used for the TimeGenerated field in OMS log entry.
- Updated the module to allow bulk injection.
- Initial release
https://www.powershellgallery.com/packages/OMSDataInjection
http://blog.tyang.org/2016/08/31/powershell-modul…ta-collector-api/
https://azure.microsoft.com/en-us/documentation/articles/log-analytics-data-collector-api/