msticpy.data.uploaders.loganalytics_uploader module
LogAnalytics Uploader class.
- class msticpy.data.uploaders.loganalytics_uploader.LAUploader(workspace: str, workspace_secret: str, **kwargs)
Bases:
UploaderBase
Uploader class for LogAnalytics.
Initialize a LogAnalytics Uploader instance.
- static get_http_timeout(**kwargs)
Get http timeout from settings or kwargs.
- upload_df(data: DataFrame, table_name: Any, **kwargs)
Upload a pandas DataFrame to Log Analytics.
- Parameters:
data (pd.DataFrame) – Pandas DataFrame to upload.
table_name (str) – Custom table name to upload the data to.
batch_size (int) – Custom number of rows to batch.
- upload_file(file_path: str, table_name: str | None = None, delim: str = ',', **kwargs)
Upload a seperated value file to Log Analytics.
- Parameters:
file_path (str) – Path to file to upload.
table_name (str) – Table name to upload data to.
delim (str, optional) – Value seperator used by the file, by default “,”
- upload_folder(folder_path: str, table_name: str | None = None, delim: str = ',', **kwargs)
Upload all files in a folder to Log Analytics.
- Parameters:
folder_path (str) – Folder path to upload.
table_name (str, optional) – Table name to upload all files to, by default None.
delim (str, optional) – Sperator used in files in target folder, by default “,”.