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
new DataSourceWindowsPerformanceCounter(name: string, args: DataSourceWindowsPerformanceCounterArgs, opts?: CustomResourceOptions);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);func NewDataSourceWindowsPerformanceCounter(ctx *Context, name string, args DataSourceWindowsPerformanceCounterArgs, opts ...ResourceOption) (*DataSourceWindowsPerformanceCounter, error)public DataSourceWindowsPerformanceCounter(string name, DataSourceWindowsPerformanceCounterArgs args, CustomResourceOptions? opts = null)- 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:
- Counter
Name string The friendly name of the performance counter.
- Instance
Name string 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 int The time of sample interval in seconds. Supports values between 10 and 2147483647.
- Object
Name string The object name of the Log Analytics Windows Performance Counter DataSource.
- Resource
Group stringName 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 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 string The friendly name of the performance counter.
- Instance
Name string 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 int The time of sample interval in seconds. Supports values between 10 and 2147483647.
- Object
Name string The object name of the Log Analytics Windows Performance Counter DataSource.
- Resource
Group stringName 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 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 string The friendly name of the performance counter.
- instance
Name string 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 number The time of sample interval in seconds. Supports values between 10 and 2147483647.
- object
Name string The object name of the Log Analytics Windows Performance Counter DataSource.
- resource
Group stringName 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 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_ strname 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:
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.
public static get(name: string, id: Input<ID>, state?: DataSourceWindowsPerformanceCounterState, opts?: CustomResourceOptions): DataSourceWindowsPerformanceCounterstatic 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)public static DataSourceWindowsPerformanceCounter Get(string name, Input<string> id, DataSourceWindowsPerformanceCounterState? state, CustomResourceOptions? opts = null)- 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:
- Counter
Name string The friendly name of the performance counter.
- Instance
Name string 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 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.
- Object
Name string The object name of the Log Analytics Windows Performance Counter DataSource.
- Resource
Group stringName 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 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 string The friendly name of the performance counter.
- Instance
Name string 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 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.
- Object
Name string The object name of the Log Analytics Windows Performance Counter DataSource.
- Resource
Group stringName 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 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 string The friendly name of the performance counter.
- instance
Name string 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 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.
- object
Name string The object name of the Log Analytics Windows Performance Counter DataSource.
- resource
Group stringName 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 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_ strname 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
azurermTerraform Provider.