Namespace Pulumi.Gcp.Monitoring
Classes
AlertPolicy
A description of the conditions under which some aspect of your system is considered to be "unhealthy" and the ways to notify people or services about this state.
To get more information about AlertPolicy, see:
- API documentation
- How-to Guides
- Official Documentation
Example Usage - Monitoring Alert Policy Basic
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var alertPolicy = new Gcp.Monitoring.AlertPolicy("alertPolicy", new Gcp.Monitoring.AlertPolicyArgs
{
Combiner = "OR",
Conditions =
{
new Gcp.Monitoring.Inputs.AlertPolicyConditionArgs
{
ConditionThreshold = new Gcp.Monitoring.Inputs.AlertPolicyConditionConditionThresholdArgs
{
Aggregations =
{
new Gcp.Monitoring.Inputs.AlertPolicyConditionConditionThresholdAggregationArgs
{
AlignmentPeriod = "60s",
PerSeriesAligner = "ALIGN_RATE",
},
},
Comparison = "COMPARISON_GT",
Duration = "60s",
Filter = "metric.type=\"compute.googleapis.com/instance/disk/write_bytes_count\" AND resource.type=\"gce_instance\"",
},
DisplayName = "test condition",
},
},
DisplayName = "My Alert Policy",
UserLabels =
{
{ "foo", "bar" },
},
});
}
}
AlertPolicyArgs
AlertPolicyState
CustomService
A Service is a discrete, autonomous, and network-accessible unit, designed to solve an individual concern (Wikipedia). In Cloud Monitoring, a Service acts as the root resource under which operational aspects of the service are accessible
To get more information about Service, see:
- API documentation
- How-to Guides
- Service Monitoring
- Monitoring API Documentation
Example Usage - Monitoring Service Custom
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var custom = new Gcp.Monitoring.CustomService("custom", new Gcp.Monitoring.CustomServiceArgs
{
DisplayName = "My Custom Service custom-srv",
ServiceId = "custom-srv",
Telemetry = new Gcp.Monitoring.Inputs.CustomServiceTelemetryArgs
{
ResourceName = "//product.googleapis.com/foo/foo/services/test",
},
});
}
}
CustomServiceArgs
CustomServiceState
Dashboard
A Google Stackdriver dashboard. Dashboards define the content and layout of pages in the Stackdriver web application.
To get more information about Dashboards, see:
- API documentation
- How-to Guides
- Official Documentation
Example Usage - Monitoring Dashboard Basic
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var dashboard = new Gcp.Monitoring.Dashboard("dashboard", new Gcp.Monitoring.DashboardArgs
{
DashboardJson = @"{
""displayName"": ""Demo Dashboard"",
""gridLayout"": {
""widgets"": [
{
""blank"": {}
}
]
}
}
",
});
}
}
Example Usage - Monitoring Dashboard GridLayout
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var dashboard = new Gcp.Monitoring.Dashboard("dashboard", new Gcp.Monitoring.DashboardArgs
{
DashboardJson = @"{
""displayName"": ""Grid Layout Example"",
""gridLayout"": {
""columns"": ""2"",
""widgets"": [
{
""title"": ""Widget 1"",
""xyChart"": {
""dataSets"": [{
""timeSeriesQuery"": {
""timeSeriesFilter"": {
""filter"": ""metric.type=\""agent.googleapis.com/nginx/connections/accepted_count\"""",
""aggregation"": {
""perSeriesAligner"": ""ALIGN_RATE""
}
},
""unitOverride"": ""1""
},
""plotType"": ""LINE""
}],
""timeshiftDuration"": ""0s"",
""yAxis"": {
""label"": ""y1Axis"",
""scale"": ""LINEAR""
}
}
},
{
""text"": {
""content"": ""Widget 2"",
""format"": ""MARKDOWN""
}
},
{
""title"": ""Widget 3"",
""xyChart"": {
""dataSets"": [{
""timeSeriesQuery"": {
""timeSeriesFilter"": {
""filter"": ""metric.type=\""agent.googleapis.com/nginx/connections/accepted_count\"""",
""aggregation"": {
""perSeriesAligner"": ""ALIGN_RATE""
}
},
""unitOverride"": ""1""
},
""plotType"": ""STACKED_BAR""
}],
""timeshiftDuration"": ""0s"",
""yAxis"": {
""label"": ""y1Axis"",
""scale"": ""LINEAR""
}
}
}
]
}
}
",
});
}
}
DashboardArgs
DashboardState
GetAppEngineService
GetAppEngineServiceArgs
GetAppEngineServiceResult
GetNotificationChannel
GetNotificationChannelArgs
GetNotificationChannelResult
GetSecretVersion
GetSecretVersionArgs
GetSecretVersionResult
GetUptimeCheckIPs
GetUptimeCheckIPsResult
Group
The description of a dynamic collection of monitored resources. Each group has a filter that is matched against monitored resources and their associated metadata. If a group's filter matches an available monitored resource, then that resource is a member of that group.
To get more information about Group, see:
- API documentation
- How-to Guides
- Official Documentation
Example Usage - Monitoring Group Basic
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var basic = new Gcp.Monitoring.Group("basic", new Gcp.Monitoring.GroupArgs
{
DisplayName = "tf-test MonitoringGroup",
Filter = "resource.metadata.region=\"europe-west2\"",
});
}
}
Example Usage - Monitoring Group Subgroup
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var parent = new Gcp.Monitoring.Group("parent", new Gcp.Monitoring.GroupArgs
{
DisplayName = "tf-test MonitoringParentGroup",
Filter = "resource.metadata.region=\"europe-west2\"",
});
var subgroup = new Gcp.Monitoring.Group("subgroup", new Gcp.Monitoring.GroupArgs
{
DisplayName = "tf-test MonitoringSubGroup",
Filter = "resource.metadata.region=\"europe-west2\"",
ParentName = parent.Name,
});
}
}
GroupArgs
GroupState
NotificationChannel
A NotificationChannel is a medium through which an alert is delivered when a policy violation is detected. Examples of channels include email, SMS, and third-party messaging applications. Fields containing sensitive information like authentication tokens or contact info are only partially populated on retrieval.
Notification Channels are designed to be flexible and are made up of a supported type
and labels to configure that channel. Each type has specific labels that need to be
present for that channel to be correctly configured. The labels that are required to be
present for one channel type are often different than those required for another.
Due to these loose constraints it's often best to set up a channel through the UI
and import it to the provider when setting up a brand new channel type to determine which
labels are required.
A list of supported channels per project the list endpoint can be
accessed programmatically or through the api explorer at https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.notificationChannelDescriptors/list .
This provides the channel type and all of the required labels that must be passed.
To get more information about NotificationChannel, see:
Example Usage - Notification Channel Basic
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var basic = new Gcp.Monitoring.NotificationChannel("basic", new Gcp.Monitoring.NotificationChannelArgs
{
DisplayName = "Test Notification Channel",
Labels =
{
{ "email_address", "fake_email@blahblah.com" },
},
Type = "email",
});
}
}
Example Usage - Notification Channel Sensitive
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var @default = new Gcp.Monitoring.NotificationChannel("default", new Gcp.Monitoring.NotificationChannelArgs
{
DisplayName = "Test Slack Channel",
Labels =
{
{ "channel_name", "#foobar" },
},
SensitiveLabels = new Gcp.Monitoring.Inputs.NotificationChannelSensitiveLabelsArgs
{
AuthToken = "one",
},
Type = "slack",
});
}
}
NotificationChannelArgs
NotificationChannelState
Slo
A Service-Level Objective (SLO) describes the level of desired good service. It consists of a service-level indicator (SLI), a performance goal, and a period over which the objective is to be evaluated against that goal. The SLO can use SLIs defined in a number of different manners. Typical SLOs might include "99% of requests in each rolling week have latency below 200 milliseconds" or "99.5% of requests in each calendar month return successfully."
To get more information about Slo, see:
- API documentation
- How-to Guides
- Service Monitoring
- Monitoring API Documentation
SloArgs
SloState
UptimeCheckConfig
This message configures which resources and services to monitor for availability.
To get more information about UptimeCheckConfig, see:
- API documentation
- How-to Guides
- Official Documentation
Warning: All arguments including
http_check.auth_info.passwordwill be stored in the raw state as plain-text. Read more about secrets in state.
Example Usage - Uptime Check Config Http
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var http = new Gcp.Monitoring.UptimeCheckConfig("http", new Gcp.Monitoring.UptimeCheckConfigArgs
{
ContentMatchers =
{
new Gcp.Monitoring.Inputs.UptimeCheckConfigContentMatcherArgs
{
Content = "example",
},
},
DisplayName = "http-uptime-check",
HttpCheck = new Gcp.Monitoring.Inputs.UptimeCheckConfigHttpCheckArgs
{
Path = "/some-path",
Port = "8010",
},
MonitoredResource = new Gcp.Monitoring.Inputs.UptimeCheckConfigMonitoredResourceArgs
{
Labels =
{
{ "host", "192.168.1.1" },
{ "project_id", "my-project-name" },
},
Type = "uptime_url",
},
Timeout = "60s",
});
}
}
Example Usage - Uptime Check Config Https
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var https = new Gcp.Monitoring.UptimeCheckConfig("https", new Gcp.Monitoring.UptimeCheckConfigArgs
{
ContentMatchers =
{
new Gcp.Monitoring.Inputs.UptimeCheckConfigContentMatcherArgs
{
Content = "example",
},
},
DisplayName = "https-uptime-check",
HttpCheck = new Gcp.Monitoring.Inputs.UptimeCheckConfigHttpCheckArgs
{
Path = "/some-path",
Port = "443",
UseSsl = true,
ValidateSsl = true,
},
MonitoredResource = new Gcp.Monitoring.Inputs.UptimeCheckConfigMonitoredResourceArgs
{
Labels =
{
{ "host", "192.168.1.1" },
{ "project_id", "my-project-name" },
},
Type = "uptime_url",
},
Timeout = "60s",
});
}
}