DataSourceWindowsPerformanceCounter

Manages a Log Analytics (formally Operational Insights) Windows Performance Counter DataSource.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
        {
            Location = "West Europe",
        });
        var exampleAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("exampleAnalyticsWorkspace", new Azure.OperationalInsights.AnalyticsWorkspaceArgs
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            Sku = "PerGB2018",
        });
        var exampleDataSourceWindowsPerformanceCounter = new Azure.LogAnalytics.DataSourceWindowsPerformanceCounter("exampleDataSourceWindowsPerformanceCounter", new Azure.LogAnalytics.DataSourceWindowsPerformanceCounterArgs
        {
            ResourceGroupName = exampleResourceGroup.Name,
            WorkspaceName = exampleAnalyticsWorkspace.Name,
            ObjectName = "CPU",
            InstanceName = "*",
            CounterName = "CPU",
            IntervalSeconds = 10,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/loganalytics"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/operationalinsights"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
            Location: pulumi.String("West Europe"),
        })
        if err != nil {
            return err
        }
        exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "exampleAnalyticsWorkspace", &operationalinsights.AnalyticsWorkspaceArgs{
            Location:          exampleResourceGroup.Location,
            ResourceGroupName: exampleResourceGroup.Name,
            Sku:               pulumi.String("PerGB2018"),
        })
        if err != nil {
            return err
        }
        _, err = loganalytics.NewDataSourceWindowsPerformanceCounter(ctx, "exampleDataSourceWindowsPerformanceCounter", &loganalytics.DataSourceWindowsPerformanceCounterArgs{
            ResourceGroupName: exampleResourceGroup.Name,
            WorkspaceName:     exampleAnalyticsWorkspace.Name,
            ObjectName:        pulumi.String("CPU"),
            InstanceName:      pulumi.String("*"),
            CounterName:       pulumi.String("CPU"),
            IntervalSeconds:   pulumi.Int(10),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("exampleAnalyticsWorkspace",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku="PerGB2018")
example_data_source_windows_performance_counter = azure.loganalytics.DataSourceWindowsPerformanceCounter("exampleDataSourceWindowsPerformanceCounter",
    resource_group_name=example_resource_group.name,
    workspace_name=example_analytics_workspace.name,
    object_name="CPU",
    instance_name="*",
    counter_name="CPU",
    interval_seconds=10)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("exampleAnalyticsWorkspace", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    sku: "PerGB2018",
});
const exampleDataSourceWindowsPerformanceCounter = new azure.loganalytics.DataSourceWindowsPerformanceCounter("exampleDataSourceWindowsPerformanceCounter", {
    resourceGroupName: exampleResourceGroup.name,
    workspaceName: exampleAnalyticsWorkspace.name,
    objectName: "CPU",
    instanceName: "*",
    counterName: "CPU",
    intervalSeconds: 10,
});

Create a DataSourceWindowsPerformanceCounter Resource

def DataSourceWindowsPerformanceCounter(resource_name, opts=None, counter_name=None, instance_name=None, interval_seconds=None, name=None, object_name=None, resource_group_name=None, workspace_name=None, __props__=None);
name string
The unique name of the resource.
args DataSourceWindowsPerformanceCounterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DataSourceWindowsPerformanceCounterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DataSourceWindowsPerformanceCounterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

DataSourceWindowsPerformanceCounter Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The DataSourceWindowsPerformanceCounter resource accepts the following input properties:

CounterName string

The friendly name of the performance counter.

InstanceName string

The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a * will apply to all instances.

IntervalSeconds int

The time of sample interval in seconds. Supports values between 10 and 2147483647.

ObjectName string

The object name of the Log Analytics Windows Performance Counter DataSource.

ResourceGroupName string

The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

WorkspaceName string

The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

Name string

The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

CounterName string

The friendly name of the performance counter.

InstanceName string

The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a * will apply to all instances.

IntervalSeconds int

The time of sample interval in seconds. Supports values between 10 and 2147483647.

ObjectName string

The object name of the Log Analytics Windows Performance Counter DataSource.

ResourceGroupName string

The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

WorkspaceName string

The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

Name string

The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

counterName string

The friendly name of the performance counter.

instanceName string

The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a * will apply to all instances.

intervalSeconds number

The time of sample interval in seconds. Supports values between 10 and 2147483647.

objectName string

The object name of the Log Analytics Windows Performance Counter DataSource.

resourceGroupName string

The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

workspaceName string

The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

name string

The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

counter_name str

The friendly name of the performance counter.

instance_name str

The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a * will apply to all instances.

interval_seconds float

The time of sample interval in seconds. Supports values between 10 and 2147483647.

object_name str

The object name of the Log Analytics Windows Performance Counter DataSource.

resource_group_name str

The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

workspace_name str

The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

name str

The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the DataSourceWindowsPerformanceCounter resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing DataSourceWindowsPerformanceCounter Resource

Get an existing DataSourceWindowsPerformanceCounter resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

static get(resource_name, id, opts=None, counter_name=None, instance_name=None, interval_seconds=None, name=None, object_name=None, resource_group_name=None, workspace_name=None, __props__=None);
func GetDataSourceWindowsPerformanceCounter(ctx *Context, name string, id IDInput, state *DataSourceWindowsPerformanceCounterState, opts ...ResourceOption) (*DataSourceWindowsPerformanceCounter, error)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

CounterName string

The friendly name of the performance counter.

InstanceName string

The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a * will apply to all instances.

IntervalSeconds int

The time of sample interval in seconds. Supports values between 10 and 2147483647.

Name string

The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

ObjectName string

The object name of the Log Analytics Windows Performance Counter DataSource.

ResourceGroupName string

The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

WorkspaceName string

The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

CounterName string

The friendly name of the performance counter.

InstanceName string

The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a * will apply to all instances.

IntervalSeconds int

The time of sample interval in seconds. Supports values between 10 and 2147483647.

Name string

The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

ObjectName string

The object name of the Log Analytics Windows Performance Counter DataSource.

ResourceGroupName string

The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

WorkspaceName string

The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

counterName string

The friendly name of the performance counter.

instanceName string

The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a * will apply to all instances.

intervalSeconds number

The time of sample interval in seconds. Supports values between 10 and 2147483647.

name string

The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

objectName string

The object name of the Log Analytics Windows Performance Counter DataSource.

resourceGroupName string

The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

workspaceName string

The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

counter_name str

The friendly name of the performance counter.

instance_name str

The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a * will apply to all instances.

interval_seconds float

The time of sample interval in seconds. Supports values between 10 and 2147483647.

name str

The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

object_name str

The object name of the Log Analytics Windows Performance Counter DataSource.

resource_group_name str

The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

workspace_name str

The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.