Skip to content

Code snippet that allow to download data from LogAnalytics

Notifications You must be signed in to change notification settings

lerthe61/LogAnalyticsClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DRAFT

Simple snippet to download Log Analytics data.

Important steps to use

Register application that should have Reader priveleges for Log Analytics. Use ClientId and ClientSecret from this application to access data. Connect Configuration Manager to Log Analytics

Usage

Use code bellow to request all records that contain COUNTER tracking

var client = new LogAnalyticsDownloader(...);
var parameters = new SearchParaeters();
parameters.Query = "COUNTER tracking";
parameters.Start = date;
parameters.End = date.AddDays(1).AddMilliseconds(-1);
var data = await client.DownloadAsync(parameters);

Sharp corners

  • Limitation in 5000 records
  • whole class hierarchy should be reviewed. Current code is a part of small utility that give us ability to create daily report in Confluence.

References

About

Code snippet that allow to download data from LogAnalytics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages