- 참조
- 기준 치수:
- 더.모니터
활동 로그 이벤트를 검색합니다.
통사론
Get-Az 로그 [-StartTime ] [-EndTime ] [-Status ] [-Caller ] [-DetailedOutput] [-CorrelationId] [-MaxRecord ] [-DefaultProfile ] [<공통 매개변수>]
Get-Az 로그 [-StartTime ] [-EndTime ] [-Status ] [-Caller ] [-DetailedOutput] [-ResourceId] [-MaxRecord ] [-DefaultProfile ] [<공통 매개변수>]
Get-Az 로그 [-StartTime ] [-EndTime ] [-Status ] [-Caller ] [-DetailedOutput] [-ResourceGroupName] [-MaxRecord ] [-DefaultProfile ] [<공통 매개변수>]
Get-Az 로그 [-StartTime ] [-EndTime ] [-Status ] [-Caller ] [-DetailedOutput] [-ResourceProvider] [-MaxRecord ] [-DefaultProfile ] [<공통 매개변수>]
Get-Az 로그 [-StartTime ] [-EndTime ] [-Status ] [-Caller ] [-DetailedOutput] [-MaxRecord ] [-DefaultProfile ] []
설명
그만큼Get-AzLogcmdlet은 활동 로그 이벤트를 검색합니다. 이벤트는 현재 구독 ID, 상관 관계 ID, 리소스 그룹, 리소스 ID 또는 리소스 공급자와 연결할 수 있습니다.
예
예제 1: 구독 ID로 이벤트 로그 가져오기
PS C:\>AzLog 가져오기
이 명령은 현재 날짜/시간으로부터 7일 동안 발생한 사용자 구독 ID와 관련된 최대 1000개의 이벤트를 나열합니다.
예 2: 최대 이벤트 수가 있는 구독 ID로 이벤트 로그 가져오기
PS C:\>Get-AzLog -MaxRecord 100
이 명령은 현재 날짜/시간으로부터 7일 동안 발생한 사용자 구독 ID와 관련된 최대 100개의 이벤트를 나열합니다.
예 3: 시작 시간이 있는 구독 ID로 이벤트 로그를 가져옵니다.
PS C:\>Get-AzLog -StartTime 2017-06-01T10:30
이 명령은 해당 날짜/시간이 현재 날짜/시간으로부터 90일보다 오래되지 않은 경우 현지 시간 2017-06-01T10:30 이후에 발생한 사용자 구독 ID와 관련된 최대 1000개의 이벤트를 나열합니다.
예 4: 시작 시간 및 종료 시간이 있는 구독 ID로 이벤트 로그를 가져옵니다.
PS C:\>Get-AzLog -StartTime 2017-04-01T10:30 -EndTime 2017-04-14T11:30
이 명령은 2017-04-01T10:30 현지 시간 이후 및 전체 날짜/시간 범위가 현재 날짜/시간으로부터 90일 이내, 즉 보존 기간.
예 5: 상관 관계 ID로 이벤트 로그 가져오기
PS C:\>Get-AzLog -CorrelationId "60c694d0-e46f-4c12-bed1-9b7aef541c23"
이 명령은 현재 날짜/시간으로부터 7일 동안 발생한 지정된 상관 관계 ID와 관련된 최대 1000개의 이벤트를 나열합니다.메모: 이것은 일반적으로 하나의 이벤트입니다.
예 6: 최대 이벤트 수를 가진 상관 관계 ID로 이벤트 로그 가져오기
PS C:\>Get-AzLog -CorrelationId "60c694d0-e46f-4c12-bed1-9b7aef541c23" -MaxRecord 100
이 명령은 현재 날짜/시간으로부터 7일 동안 발생한 지정된 상관 관계 ID와 관련된 최대 100개의 이벤트를 나열합니다.메모: 이것은 일반적으로 하나의 이벤트입니다.
예 7: 상관 관계 ID 및 시작 시간으로 이벤트 로그 가져오기
PS C:\>Get-AzLog -CorrelationId "60c694d0-e46f-4c12-bed1-9b7aef541c23" -StartTime 2017-05-22T04:30:00
이 명령은 시작 시간이 현재 날짜/시간으로부터 90일보다 오래되지 않은 경우 현지 시간 2017-05-22T04:30:00 이후에 발생한 지정된 상관 관계 ID와 관련된 최대 1000개의 이벤트를 나열합니다.메모: 이것은 일반적으로 하나의 이벤트입니다.
예 8: 시작 시간 및 종료 시간이 있는 상관 관계 ID로 이벤트 로그 가져오기
PS C:\>Get-AzLog -CorrelationId "60c694d0-e46f-4c12-bed1-9b7aef541c23" -StartTime 2017-04-15T04:30:00 -EndTime 2017-04-25T12:30:00
이 명령은 2017-04-15T04:30 현지 시간 또는 그 이후에 발생했지만 전체 날짜/시간 범위가 이전이 아닌 경우 현지 시간 2017-04-25T12:30 이전에 발생한 지정된 상관 관계 ID와 관련된 최대 1000개의 이벤트를 나열합니다. 현재 날짜/시간부터 90일 이상, 즉 보존 기간.
예제 9: 리소스 그룹에 대한 이벤트 로그 가져오기
PS C:\>Get-AzLog -ResourceGroupName "Contoso-Web-CentralUS"
이 명령은 현재 날짜/시간으로부터 7일 동안 발생한 지정된 리소스 그룹과 관련된 이벤트를 최대 1000개까지 나열합니다.
예 10: 최대 이벤트 수가 있는 리소스 그룹에 대한 이벤트 로그 가져오기
PS C:\>Get-AzLog -ResourceGroup "Contoso-Web-CentralUS" -MaxRecord 100
이 명령은 현재 날짜/시간으로부터 7일 후에 발생한 지정된 리소스 그룹과 관련된 최대 100개의 이벤트를 나열합니다.
예 11: 시작 시간별로 리소스 그룹에 대한 이벤트 로그 가져오기
PS C:\>Get-AzLog -ResourceGroup "Contoso-Web-CentralUS" -StartTime 2017-05-22T04:30:00
이 명령은 시작 시간이 현재 날짜/시간으로부터 90일보다 오래되지 않은 경우 2017-05-22T04:30:00 현지 시간 이후에 발생한 지정된 리소스 그룹과 관련된 최대 1000개의 이벤트를 나열합니다.
예 12: 시작 시간 및 종료 시간이 있는 리소스 그룹에 대한 이벤트 로그 가져오기
PS C:\>Get-AzLog -ResourceGroup "Contoso-Web-CentralUS" -StartTime 2017-04-15T04:30 -EndTime 2017-04-25T12:30
이 명령은 2017-04-15T04:30 현지 시간 또는 그 이후에 발생했지만 전체 날짜/시간 범위가 이전이 아닌 경우 현지 시간 2017-04-25T12:30 이전에 발생한 지정된 리소스 그룹과 관련된 최대 1000개의 이벤트를 나열합니다. 현재 날짜/시간부터 90일 이상, 즉 보존 기간.
예시 13: 리소스 ID로 이벤트 로그 가져오기
PS C:\>Get-AzLog -ResourceId "/subscriptions/623d50f1-4fa8-4e46-a967-a9214aed43ab/ResourceGroups/Contoso-Web-CentralUS/providers/Microsoft.Web/ServerFarms/Contoso1"
이 명령은 현재 날짜/시간으로부터 7일 동안 발생한 지정된 리소스 ID와 관련된 최대 1000개의 이벤트를 나열합니다.
예 14: 최대 이벤트 수가 있는 리소스 ID로 이벤트 로그 가져오기
PS C:\>Get-AzLog -ResourceId "/subscriptions/623d50f1-4fa8-4e46-a967-a9214aed43ab/ResourceGroups/Contoso-Web-CentralUS/providers/Microsoft.Web/ServerFarms/Contoso1" -MaxRecord 100
이 명령은 현재 날짜/시간으로부터 7일 동안 발생한 지정된 리소스 ID와 관련된 최대 100개의 이벤트를 나열합니다.
예 15: 시작 시간이 있는 리소스 ID별로 이벤트 로그 가져오기
PS C:\>Get-AzLog -ResourceId "/subscriptions/623d50f1-4fa8-4e46-a967-a9214aed43ab/ResourceGroups/Contoso-Web-CentralUS/providers/Microsoft.Web/ServerFarms/Contoso1" -StartTime 2017-05-22T04: 30
이 명령은 시작 시간이 현재 날짜/시간으로부터 90일보다 오래되지 않은 경우 2017-05-22T04:30:00 현지 시간 이후에 발생한 지정된 리소스 ID와 관련된 최대 1000개의 이벤트를 나열합니다.
예 16: 시작 시간 및 종료 시간이 있는 리소스 ID별로 이벤트 로그 가져오기
PS C:\>Get-AzLog -ResourceId "/subscriptions/623d50f1-4fa8-4e46-a967-a9214aed43ab/ResourceGroups/Contoso-Web-CentralUS/providers/Microsoft.Web/ServerFarms/Contoso1" -StartTime 2017-04-15T04: 30 -EndTime 2017-04-25T12:30
이 명령은 2017-04-15T04:30 현지 시간 또는 그 이후에 발생했지만 전체 날짜/시간 범위가 이전이 아닌 경우 현지 시간 2017-04-25T12:30 이전에 발생한 지정된 리소스 ID와 관련된 최대 1000개의 이벤트를 나열합니다. 현재 날짜/시간부터 90일 이상, 즉 보존 기간.
예제 17: 리소스 공급자별 이벤트 로그 가져오기
PS C:\>Get-AzLog -ResourceProvider "Microsoft.Web"
이 명령은 현재 날짜/시간으로부터 7일 후에 발생한 지정된 리소스 공급자와 관련된 최대 1000개의 이벤트를 나열합니다.
예제 18: 최대 이벤트 수로 리소스 공급자별로 이벤트 로그 가져오기
PS C:\>Get-AzLog -ResourceProvider "Microsoft.Web" -MaxRecord 100
이 명령은 현재 날짜/시간으로부터 7일 후에 발생한 지정된 리소스 공급자와 관련된 최대 100개의 이벤트를 나열합니다.
예제 19: 시작 시간이 있는 리소스 공급자별 이벤트 로그 가져오기
PS C:\>Get-AzLog -ResourceProvider "Microsoft.Web" -StartTime 2017-05-22T04:30
이 명령은 시작 시간이 현재 날짜/시간으로부터 90일보다 오래되지 않은 경우 2017-05-22T04:30:00 현지 시간 이후에 발생한 지정된 리소스 공급자와 관련된 최대 1000개의 이벤트를 나열합니다.
예 20: 시작 시간 및 종료 시간이 포함된 리소스 공급자별 이벤트 로그 가져오기
PS C:\>Get-AzLog -ResourceProvider "Microsoft.Web" -StartTime 2017-04-15T04:30 -EndTime 2017-04-25T12:30
이 명령은 2017-04-15T04:30 현지 시간 또는 이후에 발생했지만 전체 날짜/시간 범위가 이전이 아닌 경우 현지 시간 2017-04-25T12:30 이전에 발생한 지정된 리소스 공급자와 관련된 최대 1000개의 이벤트를 나열합니다. 현재 날짜/시간부터 90일 이상, 즉 보존 기간.
매개변수
-방문객
발신자를 지정합니다.
유형: | 끈 |
위치: | 명명 된 |
기본값: | 없음 |
파이프라인 입력 수락: | 진실 |
와일드카드 문자 허용: | 거짓 |
-CorrelationId
상관 ID를 지정합니다. 이 매개변수는 필수입니다.
유형: | 끈 |
위치: | 0 |
기본값: | 없음 |
파이프라인 입력 수락: | 진실 |
와일드카드 문자 허용: | 거짓 |
-기본 프로필
Azure와의 통신에 사용되는 자격 증명, 계정, 테넌트 및 구독
유형: | IAzureContextContainer |
별칭: | AzContext, AzureRmContext, AzureCredential |
위치: | 명명 된 |
기본값: | 없음 |
파이프라인 입력 수락: | 거짓 |
와일드카드 문자 허용: | 거짓 |
-자세한 출력
이 cmdlet이 자세한 출력을 표시함을 나타냅니다. 기본적으로 출력이 요약됩니다.
유형: | SwitchParameter |
위치: | 명명 된 |
기본값: | 스위치 없음 = False, 즉 요약된 출력 |
파이프라인 입력 수락: | 진실 |
와일드카드 문자 허용: | 거짓 |
-종료 시간
쿼리 종료 시간을 현지 시간으로 지정합니다.기본값은 현재 시간입니다.값은 이후여야 합니다.시작 시간.Get-Date cmdlet을 사용하여날짜 시간물체.
유형: | 널 입력 가능 |
위치: | 명명 된 |
기본값: | 현재 날짜(시간: 오전 00:00:00) + 1일 |
파이프라인 입력 수락: | 진실 |
와일드카드 문자 허용: | 거짓 |
-최대 기록
지정된 필터에 대해 가져올 총 레코드 수를 지정합니다. 기본값은 1000이고 허용되는 최대값은 100000입니다. 음수 값과 0은 무시되고 기본값이 사용됩니다.
유형: | Int32 |
위치: | 명명 된 |
기본값: | 1000 |
파이프라인 입력 수락: | 진실 |
와일드카드 문자 허용: | 거짓 |
-리소스 그룹 이름
리소스 그룹의 이름을 지정합니다.
유형: | 끈 |
별칭: | 리소스 그룹 |
위치: | 0 |
기본값: | 없음 |
파이프라인 입력 수락: | 진실 |
와일드카드 문자 허용: | 거짓 |
-자원 ID
리소스 ID를 지정합니다.
유형: | 끈 |
위치: | 0 |
기본값: | 없음 |
파이프라인 입력 수락: | 진실 |
와일드카드 문자 허용: | 거짓 |
-자원 제공자
리소스 공급자별로 필터를 지정합니다.
유형: | 끈 |
위치: | 0 |
기본값: | 없음 |
파이프라인 입력 수락: | 진실 |
와일드카드 문자 허용: | 거짓 |
-시작 시간
쿼리 시작 시간을 현지 시간으로 지정합니다. 기본값은종료 시간마이너스 7일. Get-Date cmdlet을 사용하여날짜 시간물체.
유형: | 널 입력 가능 |
위치: | 명명 된 |
기본값: | 종료 시간 - 7일 |
파이프라인 입력 수락: | 진실 |
와일드카드 문자 허용: | 거짓 |
-상태
상태를 지정합니다.
유형: | 끈 |
위치: | 명명 된 |
기본값: | 없음 |
파이프라인 입력 수락: | 진실 |
와일드카드 문자 허용: | 거짓 |
입력
널 입력 가능
끈
SwitchParameter
Int32
출력
PSEventData
FAQs
How do I get Azure logs? ›
- In the Azure portal, go to your resource and select Workbooks.
- In the Activity Logs Insights section, select Activity Logs Insights.
- At the top of the Activity Logs Insights page, select a time range for which to view data from the TimeRange dropdown:
To get the Azure VM activity logs with PowerShell, we need to use the Get-AzLog command. Before running, AZ commands make sure that you are connected to the Azure Account using (ConnectAzAccount) and the subscription (Set-AzContext). We need to use this ID in the Get-AzLog command to retrieve the activity logs.
How do I Monitor user activity in Azure? ›Access the activity logs in the portal
Go to Azure AD and select Audit logs, Sign-in logs, or Provisioning logs. Adjust the filter according to your needs. For more information on the filter options for audit logs, see Azure AD audit log categories and activities.
From the home screen of your Azure portal, go to Azure Active Directory. Under Monitoring, click Audit logs. Click Export Data Settings. You can view your current settings under the Diagnostic settings blade.
How do I view logs in Azure Monitor? ›Sign in to the Azure portal. Select Azure Active Directory, and then select Logs from the Monitoring section to open your Log Analytics workspace. The workspace will open with a default query.
How do I export Azure logs? ›On the Log Analytics workspace menu in the Azure portal, select Data Export under the Settings section to view all export rules in the workspace.
Where are Azure logs stored? ›All logs are stored in block blobs in a container named $logs , which is automatically created when Storage Analytics is enabled for a storage account. The $logs container is located in the blob namespace of the storage account, for example: http://<accountname>.blob.core.windows.net/$logs .
What is the command to get logs in PowerShell? ›Windows PowerShell versions 3.0, 4.0, 5.0, and 5.1 include EventLog cmdlets for the Windows event logs. In those versions, to display the list of EventLog cmdlets type: Get-Command -Noun EventLog .
How do I view logs in PowerShell? ›The Get-EventLog cmdlet gets events and event logs from local and remote computers. By default, Get-EventLog gets logs from the local computer. To get logs from remote computers, use the ComputerName parameter. You can use the Get-EventLog parameters and property values to search for events.
How do I extract information from Azure Monitor log data? ›- Export all data from your Log Analytics workspace to a storage account or event hub. ...
- Scheduled export from a log query by using a logic app workflow. ...
- One-time export by using a logic app workflow.
What is the monitoring tool in Azure? ›
Microsoft combined three unique services—Azure Monitor, Log Analytics, and Application Insights—under the umbrella of Azure Monitor to provide powerful end-to-end monitoring of your applications and the components they rely on. Log Analytics and Application Insights are now features of Azure Monitor.
How do I get audit logs in Azure? ›Sign in to the Azure portal and go to Azure AD and select Audit log from the Monitoring section. The audit activity report is available in all editions of Azure AD. If you have an Azure Active Directory P1 or P2 license, you can access the audit log through the Microsoft Graph API.
How do you collect diagnostic logs? ›Navigate to Devices > Windows > select a supported device. On the device's Overview page, select … > Collect diagnostics > Yes. A pending notification appears on the device's Overview page.
How do I Monitor access logs? ›You can access Apache logs from var/log/log_type. For example, you can access Apache logs from the Apache Unix/Linux server by looking in the following directories: /var/log/apache/access. log.
How long does Azure Monitor keep Logs? ›You can keep data in interactive retention between 4 and 730 days. You can set the archive period for a total retention time of up to 2,556 days (seven years). To set the retention and archive duration for a table in the Azure portal: From the Log Analytics workspaces menu, select Tables.
How do I Download logs from Azure Web App? ›Log detailed errors
To save the error page or failed request tracing for Windows apps in the Azure portal, navigate to your app and select App Service logs. Under Detailed Error Logging or Failed Request Tracing, select On, then select Save. Both types of logs are stored in the App Service file system.
Select Azure Monitor Logs for Destination type. Select your Log Analytics workspace for Account or namespace. Select Add data source to save the data source. Select Add data source again to add logs to the DCR.
Where are Azure Monitor metrics stored? ›Data that Azure Monitor Metrics collects is stored in a time-series database that's optimized for analyzing time-stamped data. Each set of metric values is a time series with the following properties: The time when the value was collected.
What logs are available in Azure? ›Log category | Log type |
---|---|
Virtual machines and cloud services | Windows Event Log service and Linux Syslog |
Azure Storage Analytics | Storage logging, provides metrics data for a storage account |
Network security group (NSG) flow logs | JSON format, shows outbound and inbound flows on a per-rule basis |
You can view the log data using a storage explorer like the Microsoft Azure Storage Explorer, or programmatically using the storage client library or PowerShell. For information about accessing the $logs container, see Storage analytics logging.
What is the command to see the logs? ›
/var/log. This is such a crucial folder on your Linux systems. Open up a terminal window and issue the command cd /var/log.
How to get logs from command line? ›- Open a command-line utility.
- Open the tools directory.
- Run the command to see a list of log files: imcl viewLog. These examples show the command for different operating systems: Windows: imcl.exe viewLog. ...
- Run the command to view the contents of a log file: imcl viewLog YYYYMMDD_HHMM.xml.
- type PowerShell in search area and click on "Windows PowerShell"
- If you have a .bat (batch) file go to step 3 OR copy your commands to a file and save it with .bat extension (e.g. file.bat)
- run the .bat file with following command. PS (location)> <path to bat file>/file.bat | Tee-Object -file log.txt.
Windows event log location is C:\WINDOWS\system32\config\ folder. Event logs can be checked with the help of 'Event Viewer' to keep track of issues in the system.
Where does PowerShell log history? ›The user profile now contains a detailed log file for each PowerShell session in the %USERPROFILE%\Documents\WindowsPowerShell\TranscriptLog directory.
How do I query Log Analytics in Azure? ›Open the Log Analytics demo environment, or select Logs from the Azure Monitor menu in your subscription. This step sets the initial scope to a Log Analytics workspace so that your query selects from all data in that workspace.
How do I extract metadata from Azure? ›- Search for Get Metadata in the pipeline Activities pane, and drag a Fail activity to the pipeline canvas.
- Select the new Get Metadata activity on the canvas if it is not already selected, and its Settings tab, to edit its details.
On the Message Analyzer File menu, point to New Session and then select Azure Table in the submenu to open a Data Retrieval Session that enables you to target Azure Storage table data as input to Message Analyzer. Enter an Account Name, Account Key, and Table Name on the Azure Table tab of the New Session dialog.
Can my manager see my computer activity? ›Monitoring in the workplace is legal in the U.S., Europe, Australia and many other countries. Employers have the right to monitor company-owned computers and employee productivity to protect business interests. Employee computer monitoring software is one of the most commonly used surveillance tools for this purpose.
Is there a computer activity log? ›Select Start , then select Settings > Privacy & security > Activity history.
Can monitor usage be tracked? ›
You can't. Obviously, you could take your internet connection offline, and then even were it being monitored, it can't be reported to someone else, because your computer will be unable to communicate the information until it has another Internet connection.
What is the difference between Azure Monitor and Azure Monitor logs? ›Azure Monitor Metrics can only store numeric data in a particular structure, whereas Azure Monitor Logs can store a variety of data types that have their own structures. You can also perform complex analysis on Azure Monitor Logs data by using log queries, which can't be used for analysis of Azure Monitor Metrics data.
What is Azure Monitor Log Analytics? ›Log Analytics is a tool in the Azure portal that's used to edit and run log queries against data in the Azure Monitor Logs store. You might write a simple query that returns a set of records and then use features of Log Analytics to sort, filter, and analyze them.
What is the difference between Azure Monitor and log analytics? ›Azure monitor is a monitoring service that provides data and insights about the health and performance of Azure resources. Log analytics is a service that helps you collect, search, and analyze data to gain insights into your application and business.
How do I query Audit log? ›- In Object Explorer, expand the Security folder.
- Expand the Audits folder.
- Right-click the audit log that you want to view and select View Audit Logs. This opens the Log File Viewer -server_name dialog box. For more information, see Log File Viewer F1 Help.
- When finished, click Close.
Click Audit log reports in the Site Collection Administration section. Select the report that you want, such as Deletion on the View Auditing Reports page, .
What is the most common method for log collection? ›The two most common mechanisms for collecting log data are agentless and agent-based log collection. Some of the other common log collection techniques include API-based log collection, WMI-based log collection, and SNMP traps.
How do I check all logs? ›Double-click on the log file and it will likely open in a text program by default, or you can choose the program you'd like to use to open the file by using the right-click and “Open With” option. Another option is to use a web browser and open the server log file in HTML.
What is log collection tool? ›A log collector is a tool that aggregates the logs from different sources across your system, normalizes them, and offers a way to view the logs more easily.
Where are the Azure logs? ›In the App Service file system, these log files are the contents of the /home/LogFiles directory.
Where can I find Azure function logs? ›
From the Monitoring section of your function app in the Azure portal, select Diagnostic settings, and then select Add diagnostic setting. In the Diagnostics settings page, under Category details and log, choose FunctionAppLogs. The FunctionAppLogs table contains the desired logs.
How do I see all logs in Azure function? ›To view streaming logs in the portal, select the Platform features tab in your function app. Then, under Monitoring, choose Log streaming. This connects your app to the log streaming service and application logs are displayed in the window.
How do I get logs from Azure Web App? ›To access App Service diagnostics, navigate to your App Service app in the Azure portal. In the left navigation, click on Diagnose and solve problems – Checkout the tile for “Diagnostic Tools” and “Availability and Performance” > "Application Logs" title.
How long are Azure logs kept? ›Audit records for operations in Azure Active Directory, Exchange Online, SharePoint Online, and OneDrive for Business, are retained for one year by default.
What is Azure Monitor in Azure? ›Azure Monitor is a comprehensive monitoring solution for collecting, analyzing, and responding to telemetry from your cloud and on-premises environments. You can use Azure Monitor to maximize the availability and performance of your applications and services.
How do I view logs in Azure data Factory? ›To monitor the log, you can check the output of a pipeline run on the Monitoring tab of ADF Studio, under pipeline runs. Select the run you want to monitor and then hover over the area beside the Activity name.
Can we track Azure function run history? ›Live Metrics Stream: when your function app is connected to Application Insights, you can view log data and other metrics in near real time in the Azure portal using Live Metrics Stream. Use this method when monitoring functions running on multiple-instances or on Linux in a Consumption plan.