mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-06 06:04:24 -07:00
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.
This commit is contained in:
parent
1df54c9699
commit
ca43400d93
1 changed files with 4 additions and 1 deletions
|
@ -138,6 +138,7 @@ examples: |
|
|||
'''
|
||||
|
||||
import getpass
|
||||
import json
|
||||
try:
|
||||
import requests
|
||||
except ImportError as exception:
|
||||
|
@ -265,8 +266,10 @@ class AzureLogAnalyticsIngestionSource(object):
|
|||
"Result": result._result,
|
||||
"Session": self.session
|
||||
}]
|
||||
|
||||
# Display event data
|
||||
display.vvv(f"Event Data :{str(event_data)}")
|
||||
# The data displayed here can be used as a sample file in order to create the table's schema.
|
||||
display.vvv(f"Event Data: {json.dumps(event_data)}")
|
||||
|
||||
# Send the event data using the new Logs Ingestion API method
|
||||
self.send_event(event_data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue