你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

New-AzPrometheusForwarderDataSourceObject

Create an in-memory object for PrometheusForwarderDataSource.

Syntax

New-AzPrometheusForwarderDataSourceObject
   [-LabelIncludeFilter <Hashtable>]
   [-Name <String>]
   [-Stream <String[]>]
   [<CommonParameters>]

Description

Create an in-memory object for PrometheusForwarderDataSource.

Examples

Example 1: Create prometheus forwarder data source object

New-AzPrometheusForwarderDataSourceObject -LabelIncludeFilter @{"microsoft_metrics_include_label"="MonitoringData"} -Name "myPromDataSource1" -Stream "Microsoft-PrometheusMetrics"

LabelIncludeFilter                                          Name              Stream
------------------                                          ----              ------
{…                                                          myPromDataSource1 {Microsoft-PrometheusMetrics}

This command creates a prometheus forwarder data source object.

Parameters

-LabelIncludeFilter

The list of label inclusion filters in the form of label "name-value" pairs. Currently only one label is supported: 'microsoft_metrics_include_label'. Label values are matched case-insensitively.

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Stream

List of streams that this data source will be sent to.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

PrometheusForwarderDataSource