-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add Azure Log Analytics Ingestion API plugin #10306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Azure Log Analytics Ingestion API plugin #10306
Conversation
The Ingestion API allows sending data to a Log Analytics workspace in Azure Monitor.
This comment was marked as outdated.
This comment was marked as outdated.
Thanks for your contribution! Since this is for Azure, wouldn't it make more sense to have this in azure.azcollection (https://github.com/ansible-collections/azure)? |
Thanks for the quick response! It might indeed make more sense for this module to be in the Azure collection, but the Log Analytics callback plugin is in this collection despite being Azure-specific, so, based on precedent, it might make more sense for this module to also be in this collection. I'm okay with either. |
That should fix CI issues. I'm also open to refactoring to using the |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
6a7f46a
to
eb7d846
Compare
Hmm, I wasn't aware / didn't notice before that @Fred-sun, since you maintain azure.azcollection, do you think this plugin (and maybe also community.general.loganalytics) should be placed in azure.azcollection? Or is there another collection you are aware of that this callback would be well suited for? |
Yes, The azure.azcollection already supports the management of log analytics workspace, and some functions are still under development. |
I can see a reason to place it in azure.azcollection, but within our team, I argued for keeping it in community.general because:
It appears that the individual collections are all focused on managing the respective service (azure, elastic, splunk) where as these items that have been placed in community.general are about shipping data into one of the services. Considering this, do you still want this moved to azcollection? |
Previous behavior was to use the 'request' module's default timeout; this makes auth timeout value consistent with the task submission timeout value.
Previous behavior was to display the data as a Python dictionary. The new behavior makes it easier to generate a sample JSON file in order to import into Azure when creating the table.
This parameter controls how long the plugin will wait for an HTTP response from the Azure Log Analytics API before considering the request a failure. Previous behavior was hardcoded to 2 seconds.
Made a few changes that we found helpful.
|
The class instantiation was missing an additional argument that was added in a previous patch; add it. Converting to JSON also caused the Mock TaskResult object to throw a serialization error; override the function for JSON conversion to just return bogus data instead.
The Log Ingestion API allows sending data to a Log Analytics workspace in Azure Monitor.
SUMMARY
Add a Log Analytics plugin for the Log Ingestion API. The module is based on the existing Log Analytics plugin. It is a callback module so data from each task can be transparently logged.
ISSUE TYPE
COMPONENT NAME
loganalytics_ingestion
ADDITIONAL INFORMATION
Will gladly rename the module to something less lengthy, pending your input.