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 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

      public Integer samplingFrequencyInSeconds()
      Get the samplingFrequencyInSeconds property: The number of seconds between consecutive counter measurements (samples).
      Returns:
      the samplingFrequencyInSeconds value.
    • 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.
    • counterSpecifiers

      public List<String> 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

      public PerfCounterDataSource withCounterSpecifiers(List<String> 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.
    • 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.
    • 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.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.