Skip to content

A simple Python client for uploading data to Azure Log Analytics via its Data Collector API

License

Notifications You must be signed in to change notification settings

aka0/azure-data-collector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

azure-data-collector

What is it?

azure-data-collector is a Python client package for uploading events to Azure Monitor/Log Analytics workspace using the data collector api.

How do I use it?

    from azuredatacollector.datacollector import DataCollectorClient

    # Setup client
    client = DataCollectorClient(
        WORKSPACE_ID, SHARED_KEY
    )

    # Upload data without proxy
    test_data = [{"col": "row1"}, {"col": "row2"}, {"col": "row3"}]
    client.post_data(test_data, "TestLATable")

    # Upload data with proxy
    client.proxies = {"http": "http://127.0.0.1:8080"}
    metric = client.post_data(test_data, "TestLATable")

Reference

https://learn.microsoft.com/en-us/azure/azure-monitor/logs/data-collector-api

About

A simple Python client for uploading data to Azure Log Analytics via its Data Collector API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages