Skip to content

Commit

Permalink
Log Analytics sample commands
Browse files Browse the repository at this point in the history
  • Loading branch information
johnthebrit committed Jun 12, 2022
1 parent e07068b commit 6b4d56e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion AZCLI/OverviewDemo.azcli
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ az group list --debug --output table


#Check the version
az version
az vm li
#Get latest version
az upgrade
#this also upgrades any extensions install
Expand Down
5 changes: 5 additions & 0 deletions LogAnalytics/LogTypes.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#Restore logs
az monitor log-analytics workspace table restore create --subscription "SavillTech Dev Subscription" --resource-group defaultresourcegroup-scus --workspace-name DefaultWorkspace-466c1a5d-e93b-4138-91a5-670daf44b0f8-SCUS --name AzureActivity_RST --restore-source-table AzureActivity --start-restore-time "2022-09-05T00:00:00.000Z" --end-restore-time "2022-09-10T00:00:00.000Z" --no-wait

#Performa a search
az monitor log-analytics workspace table search-job create --resource-group defaultresourcegroup-scus --workspace-name DefaultWorkspace-466c1a5d-e93b-4138-91a5-670daf44b0f8-SCUS --name AzureActivity_SRCH --search-query "AzureActivity" --limit 500 --start-search-time "2022-09-05T00:00:00.000Z" --end-search-time "2022-09-10T00:00:00.000Z" --no-wait

0 comments on commit 6b4d56e

Please sign in to comment.