Class PerfCounterDataSource
java.lang.Object
com.azure.resourcemanager.monitor.models.PerfCounterDataSource
- All Implemented Interfaces:
com.azure.json.JsonSerializable<PerfCounterDataSource>
public final class PerfCounterDataSource
extends Object
implements com.azure.json.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the counterSpecifiers property: A list of specifier names of the performance counters you want to collect.static PerfCounterDataSource
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of PerfCounterDataSource from the JsonReader.name()
Get the name property: A friendly name for the data source.Get the samplingFrequencyInSeconds property: The number of seconds between consecutive counter measurements (samples).streams()
Get the streams property: List of streams that this data source will be sent to.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withCounterSpecifiers
(List<String> counterSpecifiers) Set the counterSpecifiers property: A list of specifier names of the performance counters you want to collect.Set the name property: A friendly name for the data source.withSamplingFrequencyInSeconds
(Integer samplingFrequencyInSeconds) Set the samplingFrequencyInSeconds property: The number of seconds between consecutive counter measurements (samples).withStreams
(List<KnownPerfCounterDataSourceStreams> streams) Set the streams property: List of streams that this data source will be sent to.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
PerfCounterDataSource
public PerfCounterDataSource()Creates an instance of PerfCounterDataSource class.
-
-
Method Details
-
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.
-
withStreams
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.
-
samplingFrequencyInSeconds
Get the samplingFrequencyInSeconds property: The number of seconds between consecutive counter measurements (samples).- Returns:
- the samplingFrequencyInSeconds value.
-
withSamplingFrequencyInSeconds
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.
-
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.
-
withCounterSpecifiers
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.
-
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.
-
withName
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.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<PerfCounterDataSource>
- Throws:
IOException
-
fromJson
public static PerfCounterDataSource fromJson(com.azure.json.JsonReader jsonReader) throws IOException 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.
-