다음을 통해 공유


온-프레미스 서버용 Azure Monitor Application Insights 에이전트 배포

Application Insights 에이전트는 PowerShell 갤러리에 게시된 PowerShell 모듈입니다. Application Insights 에이전트는 상태 모니터를 대체합니다. 원격 분석은 앱을 모니터링할 수 있는 Azure Portal로 전송됩니다.

지원되는 자동 침입 시나리오의 전체 목록은 지원되는 환경, 언어 및 리소스 공급자를 참조하세요.

참고 항목

이 모듈은 현재 IIS(인터넷 정보 서버)로 호스트되는 ASP.NET 및 ASP.NET Core 웹앱의 코드리스 계측을 지원합니다. SDK를 사용하여 Java 및 Node.js 애플리케이션을 계측합니다.

참고 항목

클라이언트 쪽 모니터링은 기본적으로 ASP.NET Core 앱에 사용하도록 설정됩니다. 클라이언트 쪽 모니터링을 사용하지 않도록 설정하려면 다음 정보를 사용하여 서버에서 환경 변수를 정의합니다.

  • 이름: APPINSIGHTS_JAVASCRIPT_ENABLED
  • : false

Application Insights 에이전트는 PowerShell 갤러리에 있습니다.

PowerShell 갤러리 아이콘

지침

  • 간결한 코드 샘플을 시작하려면 시작 탭을 참조하세요.
  • 시작하는 방법에 대한 자세한 내용은 자세한 지침 탭을 참조하세요.
  • PowerShell API 참조는 API 참조 탭을 확인합니다.
  • 릴리스 정보 업데이트를 보려면 릴리스 정보 탭을 참조하세요.

이 탭에는 대부분의 환경에서 작동할 것으로 예상되는 빠른 시작 명령이 포함되어 있습니다. 지침은 업데이트를 배포하는 PowerShell 갤러리에 따라 달라집니다. 이러한 명령은 PowerShell -Proxy 매개 변수를 지원합니다.

이러한 명령에 대한 설명, 사용자 지정 지침, 문제 해결 관련 정보는 자세한 지침을 참조하세요.

Azure 구독이 없는 경우 시작하기 전에 체험 계정을 만듭니다.

다운로드 및 설치에 PowerShell 갤러리를 사용합니다.

설치 필수 구성 요소

모니터링을 사용하도록 설정하려면 연결 문자열이 필요합니다. 연결 문자열이 Application Insights 리소스의 개요 창에 표시됩니다. 자세한 내용은 연결 문자열을 참조하세요.

참고 항목

필요할 수 있는 더 많은 필수 구성 요소는 PowerShell TLS(갤러리 전송 계층 보안) 지원을 참조하세요.

관리자 권한으로 PowerShell을 실행합니다.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
Install-Module -Name PowerShellGet -Force

PowerShell을 닫습니다.

Application Insights 에이전트 설치

관리자 권한으로 PowerShell을 실행합니다.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force
Install-Module -Name Az.ApplicationMonitor -AllowPrerelease -AcceptLicense

참고 항목

AllowPrerelease cmdlet의 Install-Module 스위치를 사용하면 베타 릴리스를 설치할 수 있습니다.

자세한 내용은 모듈 설치를 참조하세요.

모니터링 사용

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force
Enable-ApplicationInsightsMonitoring -ConnectionString 'InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://xxxx.applicationinsights.azure.com/'

수동으로 다운로드 및 설치(오프라인 옵션)

수동으로 다운로드하여 설치할 수도 있습니다.

모듈 다운로드

PowerShell 갤러리에서 모듈의 최신 버전을 수동으로 다운로드합니다.

Application Insights 에이전트 압축 풀기 및 설치

$pathToNupkg = "C:\Users\t\Desktop\Az.ApplicationMonitor.0.3.0-alpha.nupkg"
$pathToZip = ([io.path]::ChangeExtension($pathToNupkg, "zip"))
$pathToNupkg | rename-item -newname $pathToZip
$pathInstalledModule = "$Env:ProgramFiles\WindowsPowerShell\Modules\Az.ApplicationMonitor"
Expand-Archive -LiteralPath $pathToZip -DestinationPath $pathInstalledModule

모니터링 사용

Enable-ApplicationInsightsMonitoring -ConnectionString 'InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://xxxx.applicationinsights.azure.com/'