To create a Golang program that retrieves metrics from an Azure Monitor instance and displays them in a terminal dashboard, you'll need to follow these steps:

1. Set up your development environment with the necessary dependencies.
2. Authenticate with Azure using the SDK.
3. Retrieve the required metrics from Azure Monitor.
4. Create a terminal dashboard using a library like `termui`.
5. Display the retrieved metrics on the dashboard.

Here's a sample implementation of this program:

```go
package main

import (
	"context"
	"fmt"
	"log"
	"os"
	"time"

	"github.com/Azure/azure-sdk-for-go/profiles/latest/monitor/mgmt/insights"
	"github.com/Azure/go-autorest/autorest/azure/auth"
	ui "github.com/gizak/termui/v3"
	"github.com/gizak/termui/v3/widgets"
)

func main() {
	err := ui.Init()
	if err != nil {
		log.Fatalf("failed to initialize termui: %v", err)
	}
	defer ui.Close()

	resourceGroup := os.Getenv("AZURE_RESOURCE_GROUP")
	resourceURI := fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/virtualMachines/myVM", os.Getenv("AZURE_SUBSCRIPTION_ID"), resourceGroup)

	metricsClient, err := getMetricsClient()
	if err != nil {
		log.Fatal(err)
	}

	cpuGauge := widgets.NewGauge()
	memGauge := widgets.NewGauge()
	netSparkline := widgets.NewSparkline()

	grid := ui.NewGrid()
	termWidth, termHeight := ui.TerminalDimensions()
	grid.SetRect(0, 0, termWidth, termHeight)
	grid.Set(
		ui.NewRow(1.0/3,
			ui.NewCol(1.0/3, cpuGauge),
			ui.NewCol(1.0/3, memGauge),
			ui.NewCol(1.0/3, netSparkline),
		),
	)

	ui.Render(grid)

	ticker := time.NewTicker(time.Minute).C
	for {
		select {
		case <-ticker:
			cpuUsage, memUsage, netThroughput, err := getMetrics(metricsClient, resourceURI)
			if err != nil {
				log.Println(err)
				continue
			}

			cpuGauge.Percent = int(cpuUsage)
			memGauge.Percent = int(memUsage)
			netSparkline.Data = append(netSparkline.Data[1:], netThroughput)

			ui.Render(grid)
		}
	}
}

func getMetricsClient() (*insights.MetricsClient, error) {
	authorizer, err := auth.NewAuthorizerFromEnvironment()
	if err != nil {
		return nil, fmt.Errorf("failed to create authorizer: %v", err)
	}

	client := insights.NewMetricsClient(os.Getenv("AZURE_SUBSCRIPTION_ID"))
	client.Authorizer = authorizer

	return &client, nil
}

func getMetrics(client *insights.MetricsClient, resourceURI string) (float64, float64, float64, error) {
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	defer cancel()

	metricNames := []string{"Percentage CPU", "Memory\\Working Set", "Network In Total"}
	result, err := client.List(ctx, resourceURI, "PT1M", &metricNames, "", "", "value", "")
	if err != nil {
		return 0, 0, 0, fmt.Errorf("failed to retrieve metrics: %v", err)
	}

	var cpuUsage, memUsage, netThroughput float64
	for _, metric := range *result.Value {
		if len(*metric.Timeseries) == 0 || len((*metric.Timeseries)[0].Data) == 0 {
			continue
		}

		data := (*metric.Timeseries)[0].Data
		value := *data[len(data)-1].Average

		switch *metric.Name.Value {
		case "Percentage CPU":
			cpuUsage = value
		case "Memory\\Working Set":
			memUsage = value / (1024 * 1024)
		case "Network In Total":
			netThroughput = value
		}
	}

	return cpuUsage, memUsage, netThroughput, nil
}
```

This program assumes you have the Azure SDK for Go and termui library installed. You can install them using:

```sh
go get -u github.com/Azure/azure-sdk-for-go
go get -u github.com/gizak/termui/v3
```

Make sure to set the following environment variables before running the program:

- `AZURE_SUBSCRIPTION_ID`: Your Azure subscription ID.
- `AZURE_RESOURCE_GROUP`: The resource group containing your virtual machine.
- `AZURE_TENANT_ID`: Your Azure tenant ID.
- `AZURE_CLIENT_ID`: Your Azure client ID.
- `AZURE_CLIENT_SECRET`: Your Azure client secret.

The program will display a terminal dashboard with three widgets: one for CPU usage, one for memory usage, and one for network throughput. The dashboard will update every minute with new metrics from Azure Monitor.
Azure Monitor 인스턴스에서 메트릭을 검색하여 터미널 대시보드에 표시하는 Golang 프로그램을 만들려면 다음 단계를 따라야 합니다:

1. 필요한 종속성으로 개발 환경을 설정합니다.
2. SDK를 사용하여 Azure에 인증합니다.
3. Azure 모니터에서 필요한 메트릭을 검색합니다.
4. 터미널 대시보드를 `termui`와 같은 라이브러리를 사용하여 만듭니다.
5. 검색된 메트릭을 대시보드에 표시합니다.

이 프로그램의 샘플 구현은 다음과 같습니다:

```go
package main

import (
	"context"
	"fmt"
	"log"
	"os"
	"time"

	"github.com/Azure/azure-sdk-for-go/profiles/latest/monitor/mgmt/insights"
	"github.com/Azure/go-autorest/autorest/azure/auth"
	ui "github.com/gizak/termui/v3"
	"github.com/gizak/termui/v3/widgets"
)

func main() {
	err := ui.Init()
	if err != nil {
		log.Fatalf("failed to initialize termui: %v", err)
	}
	defer ui.Close()

	resourceGroup := os.Getenv("AZURE_RESOURCE_GROUP")
	resourceURI := fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/virtualMachines/myVM", os.Getenv("AZURE_SUBSCRIPTION_ID"), resourceGroup)

	metricsClient, err := getMetricsClient()
	if err != nil {
		log.Fatal(err)
	}

	cpuGauge := widgets.NewGauge()
	memGauge := widgets.NewGauge()
	netSparkline := widgets.NewSparkline()

	grid := ui.NewGrid()
	termWidth, termHeight := ui.TerminalDimensions()
	grid.SetRect(0, 0, termWidth, termHeight)
	grid.Set(
		ui.NewRow(1.0/3,
			ui.NewCol(1.0/3, cpuGauge),
			ui.NewCol(1.0/3, memGauge),
			ui.NewCol(1.0/3, netSparkline),
		),
	)

	ui.Render(grid)

	ticker := time.NewTicker(time.Minute).C
	for {
		select {
		case <-ticker:
			cpuUsage, memUsage, netThroughput, err := getMetrics(metricsClient, resourceURI)
			if err != nil {
				log.Println(err)
				continue
			}

			cpuGauge.Percent = int(cpuUsage)
			memGauge.Percent = int(memUsage)
			netSparkline.Data = append(netSparkline.Data[1:], netThroughput)

			ui.Render(grid)
		}
	}
}

func getMetricsClient() (*insights.MetricsClient, error) {
	authorizer, err := auth.NewAuthorizerFromEnvironment()
	if err != nil {
		return nil, fmt.Errorf("failed to create authorizer: %v", err)
	}

	client := insights.NewMetricsClient(os.Getenv("AZURE_SUBSCRIPTION_ID"))
	client.Authorizer = authorizer

	return &client, nil
}

func getMetrics(client *insights.MetricsClient, resourceURI string) (float64, float64, float64, error) {
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	defer cancel()

	metricNames := []string{"Percentage CPU", "Memory\\Working Set", "Network In Total"}
	result, err := client.List(ctx, resourceURI, "PT1M", &metricNames, "", "", "value", "")
	if err != nil {
		return 0, 0, 0, fmt.Errorf("failed to retrieve metrics: %v", err)
	}

	var cpuUsage, memUsage, netThroughput float64
	for _, metric := range *result.Value {
		if len(*metric.Timeseries) == 0 || len((*metric.Timeseries)[0].Data) == 0 {
			continue
		}

		data := (*metric.Timeseries)[0].Data
		value := *data[len(data)-1].Average

		switch *metric.Name.Value {
		case "Percentage CPU":
			cpuUsage = value
		case "Memory\\Working Set":
			memUsage = value / (1024 * 1024)
		case "Network In Total":
			netThroughput = value
		}
	}

	return cpuUsage, memUsage, netThroughput, nil
}
```

이 프로그램은 Go용 Azure SDK 및 termui 라이브러리가 설치되어 있다고 가정합니다. 다음을 사용하여 설치할 수 있습니다.

```sh
go get -u github.com/Azure/azure-sdk-for-go
go get -u github.com/gizak/termui/v3
``

프로그램 실행 전에 다음 환경 변수를 설정해야 합니다.

- `AZURE_SUBSCRIPTION_ID`: Azure 구독 ID.
- `AZURE_RESOURCE_GROUP`: 가상 머신이 포함된 리소스 그룹.
- `AZURE_TENANT_ID`: Azure 테넌트 ID.
- `AZURE_CLIENT_ID`: Azure 클라이언트 ID.
- `AZURE_CLIENT_SECRET`: Azure 클라이언트 암호.

프로그램은 CPU 사용량, 메모리 사용량, 네트워크 처리량 등 세 가지 위젯이 있는 터미널 대시보드를 표시합니다. 대시보드는 Azure Monitor의 새로운 메트릭으로 매분 업데이트됩니다.