Partilhar via


PerfCounterDataSource Class

  • java.lang.Object
    • com.azure.resourcemanager.monitor.models.PerfCounterDataSource

Implements

public final class PerfCounterDataSource
implements JsonSerializable<PerfCounterDataSource>

Definition of which performance counters will be collected and how they will be collected by this data collection rule. Collected from both Windows and Linux machines where the counter is present.

Constructor Summary

Constructor Description
PerfCounterDataSource()

Creates an instance of PerfCounterDataSource class.

Method Summary

Modifier and Type Method and Description
List<String> counterSpecifiers()

Get the counterSpecifiers property: A list of specifier names of the performance counters you want to collect.

static PerfCounterDataSource fromJson(JsonReader jsonReader)

Reads an instance of PerfCounterDataSource from the JsonReader.

String name()

Get the name property: A friendly name for the data source.

Integer samplingFrequencyInSeconds()

Get the samplingFrequencyInSeconds property: The number of seconds between consecutive counter measurements (samples).

List<KnownPerfCounterDataSourceStreams> streams()

Get the streams property: List of streams that this data source will be sent to.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

PerfCounterDataSource withCounterSpecifiers(List<String> counterSpecifiers)

Set the counterSpecifiers property: A list of specifier names of the performance counters you want to collect.

PerfCounterDataSource withName(String name)

Set the name property: A friendly name for the data source.

PerfCounterDataSource withSamplingFrequencyInSeconds(Integer samplingFrequencyInSeconds)

Set the samplingFrequencyInSeconds property: The number of seconds between consecutive counter measurements (samples).

PerfCounterDataSource withStreams(List<KnownPerfCounterDataSourceStreams> streams)

Set the streams property: List of streams that this data source will be sent to.

Methods inherited from java.lang.Object

Constructor Details

PerfCounterDataSource

public PerfCounterDataSource()

Creates an instance of PerfCounterDataSource class.

Method Details

counterSpecifiers

public List counterSpecifiers()

Get the counterSpecifiers property: A list of specifier names of the performance counters you want to collect. Use a wildcard (*) to collect a counter for all instances. To get a list of performance counters on Windows, run the command 'typeperf'.

Returns:

the counterSpecifiers value.

fromJson

public static PerfCounterDataSource fromJson(JsonReader jsonReader)

Reads an instance of PerfCounterDataSource from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of PerfCounterDataSource if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the PerfCounterDataSource.

name

public String name()

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

Returns:

the name value.

samplingFrequencyInSeconds

public Integer samplingFrequencyInSeconds()

Get the samplingFrequencyInSeconds property: The number of seconds between consecutive counter measurements (samples).

Returns:

the samplingFrequencyInSeconds value.

streams

public List streams()

Get the streams property: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to.

Returns:

the streams value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCounterSpecifiers

public PerfCounterDataSource withCounterSpecifiers(List counterSpecifiers)

Set the counterSpecifiers property: A list of specifier names of the performance counters you want to collect. Use a wildcard (*) to collect a counter for all instances. To get a list of performance counters on Windows, run the command 'typeperf'.

Parameters:

counterSpecifiers - the counterSpecifiers value to set.

Returns:

the PerfCounterDataSource object itself.

withName

public PerfCounterDataSource withName(String name)

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

Parameters:

name - the name value to set.

Returns:

the PerfCounterDataSource object itself.

withSamplingFrequencyInSeconds

public PerfCounterDataSource withSamplingFrequencyInSeconds(Integer samplingFrequencyInSeconds)

Set the samplingFrequencyInSeconds property: The number of seconds between consecutive counter measurements (samples).

Parameters:

samplingFrequencyInSeconds - the samplingFrequencyInSeconds value to set.

Returns:

the PerfCounterDataSource object itself.

withStreams

public PerfCounterDataSource withStreams(List streams)

Set the streams property: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to.

Parameters:

streams - the streams value to set.

Returns:

the PerfCounterDataSource object itself.

Applies to