1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-22 13:19:13 +00:00
community.general/plugins/callback
patchback[bot] 45d16053ee
[PR #10306/38f93c80 backport][stable-12] New Callback plugin: loganalytics_ingestion adding Azure Log Analytics Ingestion (#11527)
New Callback plugin: `loganalytics_ingestion` adding Azure Log Analytics Ingestion (#10306)

* Add Azure Log Analytics Ingestion API plugin

The Ingestion API allows sending data to a Log Analytics workspace in
Azure Monitor.

* Fix LogAnalytics Ingestion shebang

* Fix Log Analytics Ingestion pep8 tests

* Fix Log Analytics Ingestion pylint tests

* Fix Log Analytics Ingestion import tests

* Fix Log Analytics Ingestion pylint test

* Add Log Analytics Ingestion auth timeout

Previous behavior was to use the 'request' module's default timeout;
this makes auth timeout value consistent with the task submission
timeout value.

* Display Log Analytics Ingestion event data as JSON

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.

* Add Azure Log Analytics Ingestion timeout param

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.

* Fix Azure Log Ingestion unit test

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.

* Fix loganalytics_ingestion linter errors

* Fix LogAnalytics Ingestion env vars

Prefix the LogAnalytics Ingestion plugin's environment variable names
with 'ANSIBLE_' in order to align with plugin best practices.

* Remove LogAnalytics 'requests' dep from docs

The LogAnalytics callback plugin does not actually require 'requests',
so remove it from the documented dependencies.

* Refactor LogAnalytics Ingestion to use URL utils

This replaces the previous behavior of depending on the external
'requests' library.

* Simplify LogAnalytics Ingestion token valid check



* Remove LogAnalytics Ingestion extra arg validation

Argument validation should be handled by ansible-core, so remove the
extra argument validation in the plugin itself.

* Update LogAnalytics Ingestion version added

* Remove LogAnalytics Ingestion coding marker

The marker is no longer needed as Python2 is no longer supported.

* Fix some LogAnalytics Ingestion grammar errors

* Refactor LogAnalytics Ingestion plugin messages

Consistently use "plugin" instead of module, and refer to the module by
its FQCN instead of its prose name.

* Remove LogAnalytics Ingestion extra logic

A few unused vars were being set; stop setting them.

* Fix LogAnalytics Ingestion nox sanity tests

* Fix LogAnalytics Ingestion unit tests

The refactor to move away from the 'requests' dependency to use
module_utils broke the plugin's unit tests; re-write the plugin's unit
tests for module_utils.

* Add nox formatting to LogAnalytics Ingestion

* Fix Log Analytics Ingestion urllib import

Remove the compatibility import via 'six' for 'urllib' since Python 2
support is no longer supported.

* Bump LogAnalytics Ingestion plugin version added

* Remove LogAnalytics Ingestion required: false docs

Required being false is the default, so no need to explicitly add it.

* Simplify LogAnalytics Ingestion role name logic

* Clean LogAnalytics Ingestion redundant comments

* Clean LogAnalytics Ingestion unit test code

Rename all Mock objects to use snake_case and consistently use '_mock'
as a suffix instead of sometimes using it as a prefix and sometimes
using it as a suffix.

* Refactor LogAnalytics Ingestion unit tests

Move all of the tests outside of the 'setUp' method.

* Refactor LogAnalytics Ingestion test

Add a test to validate that part of the contents sent match what was
supposed to be sent.

* Refactor LogAnalytics Ingestion test

Make the names consistent again.

* Add LogAnalytics Ingestion sample data docs

* Apply suggestions from code review



---------


(cherry picked from commit 38f93c80f1)

Co-authored-by: wtcline-intc <wade.cline@intel.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-02-21 11:43:16 +01:00
..
cgroup_memory_recap.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
context_demo.py Reformat everything. 2025-11-01 13:46:53 +01:00
counter_enabled.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
default_without_diff.py Reformat everything. 2025-11-01 13:46:53 +01:00
dense.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
diy.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
elastic.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
jabber.py Reformat everything. 2025-11-01 13:46:53 +01:00
log_plays.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
loganalytics.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
loganalytics_ingestion.py [PR #10306/38f93c80 backport][stable-12] New Callback plugin: loganalytics_ingestion adding Azure Log Analytics Ingestion (#11527) 2026-02-21 11:43:16 +01:00
logdna.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
logentries.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
logstash.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
mail.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
nrdp.py Reformat everything. 2025-11-01 13:46:53 +01:00
null.py Reformat everything. 2025-11-01 13:46:53 +01:00
opentelemetry.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
print_task.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
say.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
selective.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
slack.py Reformat everything. 2025-11-01 13:46:53 +01:00
splunk.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
sumologic.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
syslog_json.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
tasks_only.py Reformat everything. 2025-11-01 13:46:53 +01:00
timestamp.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
unixy.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00