chronosphere.Monitor
Explore with Pulumi AI
Create Monitor Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Monitor(name: string, args: MonitorArgs, opts?: CustomResourceOptions);
@overload
def Monitor(resource_name: str,
args: MonitorArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Monitor(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
query: Optional[MonitorQueryArgs] = None,
series_conditions: Optional[MonitorSeriesConditionsArgs] = None,
annotations: Optional[Mapping[str, str]] = None,
bucket_id: Optional[str] = None,
collection_id: Optional[str] = None,
interval: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
notification_policy_id: Optional[str] = None,
schedule: Optional[MonitorScheduleArgs] = None,
signal_grouping: Optional[MonitorSignalGroupingArgs] = None,
slug: Optional[str] = None)
func NewMonitor(ctx *Context, name string, args MonitorArgs, opts ...ResourceOption) (*Monitor, error)
public Monitor(string name, MonitorArgs args, CustomResourceOptions? opts = null)
public Monitor(String name, MonitorArgs args)
public Monitor(String name, MonitorArgs args, CustomResourceOptions options)
type: chronosphere:Monitor
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args MonitorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args MonitorArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args MonitorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MonitorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MonitorArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var monitorResource = new Pulumi.Monitor("monitorResource", new()
{
Name = "string",
Query = new Pulumi.Inputs.MonitorQueryArgs
{
GraphiteExpr = "string",
PrometheusExpr = "string",
},
SeriesConditions = new Pulumi.Inputs.MonitorSeriesConditionsArgs
{
Conditions = new[]
{
new Pulumi.Inputs.MonitorSeriesConditionsConditionArgs
{
Op = "string",
Severity = "string",
ResolveSustain = "string",
Sustain = "string",
Value = 0,
},
},
Overrides = new[]
{
new Pulumi.Inputs.MonitorSeriesConditionsOverrideArgs
{
Conditions = new[]
{
new Pulumi.Inputs.MonitorSeriesConditionsOverrideConditionArgs
{
Op = "string",
Severity = "string",
ResolveSustain = "string",
Sustain = "string",
Value = 0,
},
},
LabelMatchers = new[]
{
new Pulumi.Inputs.MonitorSeriesConditionsOverrideLabelMatcherArgs
{
Name = "string",
Type = "string",
Value = "string",
},
},
},
},
},
Annotations =
{
{ "string", "string" },
},
BucketId = "string",
CollectionId = "string",
Interval = "string",
Labels =
{
{ "string", "string" },
},
NotificationPolicyId = "string",
Schedule = new Pulumi.Inputs.MonitorScheduleArgs
{
Timezone = "string",
Ranges = new[]
{
new Pulumi.Inputs.MonitorScheduleRangeArgs
{
Day = "string",
End = "string",
Start = "string",
},
},
},
SignalGrouping = new Pulumi.Inputs.MonitorSignalGroupingArgs
{
LabelNames = new[]
{
"string",
},
SignalPerSeries = false,
},
Slug = "string",
});
example, err := chronosphere.NewMonitor(ctx, "monitorResource", &chronosphere.MonitorArgs{
Name: pulumi.String("string"),
Query: &chronosphere.MonitorQueryArgs{
GraphiteExpr: pulumi.String("string"),
PrometheusExpr: pulumi.String("string"),
},
SeriesConditions: &chronosphere.MonitorSeriesConditionsArgs{
Conditions: chronosphere.MonitorSeriesConditionsConditionArray{
&chronosphere.MonitorSeriesConditionsConditionArgs{
Op: pulumi.String("string"),
Severity: pulumi.String("string"),
ResolveSustain: pulumi.String("string"),
Sustain: pulumi.String("string"),
Value: pulumi.Float64(0),
},
},
Overrides: chronosphere.MonitorSeriesConditionsOverrideArray{
&chronosphere.MonitorSeriesConditionsOverrideArgs{
Conditions: chronosphere.MonitorSeriesConditionsOverrideConditionArray{
&chronosphere.MonitorSeriesConditionsOverrideConditionArgs{
Op: pulumi.String("string"),
Severity: pulumi.String("string"),
ResolveSustain: pulumi.String("string"),
Sustain: pulumi.String("string"),
Value: pulumi.Float64(0),
},
},
LabelMatchers: chronosphere.MonitorSeriesConditionsOverrideLabelMatcherArray{
&chronosphere.MonitorSeriesConditionsOverrideLabelMatcherArgs{
Name: pulumi.String("string"),
Type: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
},
},
Annotations: pulumi.StringMap{
"string": pulumi.String("string"),
},
BucketId: pulumi.String("string"),
CollectionId: pulumi.String("string"),
Interval: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
NotificationPolicyId: pulumi.String("string"),
Schedule: &chronosphere.MonitorScheduleArgs{
Timezone: pulumi.String("string"),
Ranges: chronosphere.MonitorScheduleRangeArray{
&chronosphere.MonitorScheduleRangeArgs{
Day: pulumi.String("string"),
End: pulumi.String("string"),
Start: pulumi.String("string"),
},
},
},
SignalGrouping: &chronosphere.MonitorSignalGroupingArgs{
LabelNames: pulumi.StringArray{
pulumi.String("string"),
},
SignalPerSeries: pulumi.Bool(false),
},
Slug: pulumi.String("string"),
})
var monitorResource = new Monitor("monitorResource", MonitorArgs.builder()
.name("string")
.query(MonitorQueryArgs.builder()
.graphiteExpr("string")
.prometheusExpr("string")
.build())
.seriesConditions(MonitorSeriesConditionsArgs.builder()
.conditions(MonitorSeriesConditionsConditionArgs.builder()
.op("string")
.severity("string")
.resolveSustain("string")
.sustain("string")
.value(0)
.build())
.overrides(MonitorSeriesConditionsOverrideArgs.builder()
.conditions(MonitorSeriesConditionsOverrideConditionArgs.builder()
.op("string")
.severity("string")
.resolveSustain("string")
.sustain("string")
.value(0)
.build())
.labelMatchers(MonitorSeriesConditionsOverrideLabelMatcherArgs.builder()
.name("string")
.type("string")
.value("string")
.build())
.build())
.build())
.annotations(Map.of("string", "string"))
.bucketId("string")
.collectionId("string")
.interval("string")
.labels(Map.of("string", "string"))
.notificationPolicyId("string")
.schedule(MonitorScheduleArgs.builder()
.timezone("string")
.ranges(MonitorScheduleRangeArgs.builder()
.day("string")
.end("string")
.start("string")
.build())
.build())
.signalGrouping(MonitorSignalGroupingArgs.builder()
.labelNames("string")
.signalPerSeries(false)
.build())
.slug("string")
.build());
monitor_resource = chronosphere.Monitor("monitorResource",
name="string",
query={
"graphite_expr": "string",
"prometheus_expr": "string",
},
series_conditions={
"conditions": [{
"op": "string",
"severity": "string",
"resolve_sustain": "string",
"sustain": "string",
"value": 0,
}],
"overrides": [{
"conditions": [{
"op": "string",
"severity": "string",
"resolve_sustain": "string",
"sustain": "string",
"value": 0,
}],
"label_matchers": [{
"name": "string",
"type": "string",
"value": "string",
}],
}],
},
annotations={
"string": "string",
},
bucket_id="string",
collection_id="string",
interval="string",
labels={
"string": "string",
},
notification_policy_id="string",
schedule={
"timezone": "string",
"ranges": [{
"day": "string",
"end": "string",
"start": "string",
}],
},
signal_grouping={
"label_names": ["string"],
"signal_per_series": False,
},
slug="string")
const monitorResource = new chronosphere.Monitor("monitorResource", {
name: "string",
query: {
graphiteExpr: "string",
prometheusExpr: "string",
},
seriesConditions: {
conditions: [{
op: "string",
severity: "string",
resolveSustain: "string",
sustain: "string",
value: 0,
}],
overrides: [{
conditions: [{
op: "string",
severity: "string",
resolveSustain: "string",
sustain: "string",
value: 0,
}],
labelMatchers: [{
name: "string",
type: "string",
value: "string",
}],
}],
},
annotations: {
string: "string",
},
bucketId: "string",
collectionId: "string",
interval: "string",
labels: {
string: "string",
},
notificationPolicyId: "string",
schedule: {
timezone: "string",
ranges: [{
day: "string",
end: "string",
start: "string",
}],
},
signalGrouping: {
labelNames: ["string"],
signalPerSeries: false,
},
slug: "string",
});
type: chronosphere:Monitor
properties:
annotations:
string: string
bucketId: string
collectionId: string
interval: string
labels:
string: string
name: string
notificationPolicyId: string
query:
graphiteExpr: string
prometheusExpr: string
schedule:
ranges:
- day: string
end: string
start: string
timezone: string
seriesConditions:
conditions:
- op: string
resolveSustain: string
severity: string
sustain: string
value: 0
overrides:
- conditions:
- op: string
resolveSustain: string
severity: string
sustain: string
value: 0
labelMatchers:
- name: string
type: string
value: string
signalGrouping:
labelNames:
- string
signalPerSeries: false
slug: string
Monitor Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Monitor resource accepts the following input properties:
- Name string
- Query
Chronosphere.
Pulumi. Inputs. Monitor Query - Series
Conditions Chronosphere.Pulumi. Inputs. Monitor Series Conditions - Annotations Dictionary<string, string>
- Bucket
Id string - Collection
Id string - Interval string
- Labels Dictionary<string, string>
- Notification
Policy stringId - Schedule
Chronosphere.
Pulumi. Inputs. Monitor Schedule - Signal
Grouping Chronosphere.Pulumi. Inputs. Monitor Signal Grouping - Slug string
- Name string
- Query
Monitor
Query Args - Series
Conditions MonitorSeries Conditions Args - Annotations map[string]string
- Bucket
Id string - Collection
Id string - Interval string
- Labels map[string]string
- Notification
Policy stringId - Schedule
Monitor
Schedule Args - Signal
Grouping MonitorSignal Grouping Args - Slug string
- name String
- query
Monitor
Query - series
Conditions MonitorSeries Conditions - annotations Map<String,String>
- bucket
Id String - collection
Id String - interval String
- labels Map<String,String>
- notification
Policy StringId - schedule
Monitor
Schedule - signal
Grouping MonitorSignal Grouping - slug String
- name string
- query
Monitor
Query - series
Conditions MonitorSeries Conditions - annotations {[key: string]: string}
- bucket
Id string - collection
Id string - interval string
- labels {[key: string]: string}
- notification
Policy stringId - schedule
Monitor
Schedule - signal
Grouping MonitorSignal Grouping - slug string
- name str
- query
Monitor
Query Args - series_
conditions MonitorSeries Conditions Args - annotations Mapping[str, str]
- bucket_
id str - collection_
id str - interval str
- labels Mapping[str, str]
- notification_
policy_ strid - schedule
Monitor
Schedule Args - signal_
grouping MonitorSignal Grouping Args - slug str
- name String
- query Property Map
- series
Conditions Property Map - annotations Map<String>
- bucket
Id String - collection
Id String - interval String
- labels Map<String>
- notification
Policy StringId - schedule Property Map
- signal
Grouping Property Map - slug String
Outputs
All input properties are implicitly available as output properties. Additionally, the Monitor 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 string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Monitor Resource
Get an existing Monitor 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?: MonitorState, opts?: CustomResourceOptions): Monitor
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
annotations: Optional[Mapping[str, str]] = None,
bucket_id: Optional[str] = None,
collection_id: Optional[str] = None,
interval: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
notification_policy_id: Optional[str] = None,
query: Optional[MonitorQueryArgs] = None,
schedule: Optional[MonitorScheduleArgs] = None,
series_conditions: Optional[MonitorSeriesConditionsArgs] = None,
signal_grouping: Optional[MonitorSignalGroupingArgs] = None,
slug: Optional[str] = None) -> Monitor
func GetMonitor(ctx *Context, name string, id IDInput, state *MonitorState, opts ...ResourceOption) (*Monitor, error)
public static Monitor Get(string name, Input<string> id, MonitorState? state, CustomResourceOptions? opts = null)
public static Monitor get(String name, Output<String> id, MonitorState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Annotations Dictionary<string, string>
- Bucket
Id string - Collection
Id string - Interval string
- Labels Dictionary<string, string>
- Name string
- Notification
Policy stringId - Query
Chronosphere.
Pulumi. Inputs. Monitor Query - Schedule
Chronosphere.
Pulumi. Inputs. Monitor Schedule - Series
Conditions Chronosphere.Pulumi. Inputs. Monitor Series Conditions - Signal
Grouping Chronosphere.Pulumi. Inputs. Monitor Signal Grouping - Slug string
- Annotations map[string]string
- Bucket
Id string - Collection
Id string - Interval string
- Labels map[string]string
- Name string
- Notification
Policy stringId - Query
Monitor
Query Args - Schedule
Monitor
Schedule Args - Series
Conditions MonitorSeries Conditions Args - Signal
Grouping MonitorSignal Grouping Args - Slug string
- annotations Map<String,String>
- bucket
Id String - collection
Id String - interval String
- labels Map<String,String>
- name String
- notification
Policy StringId - query
Monitor
Query - schedule
Monitor
Schedule - series
Conditions MonitorSeries Conditions - signal
Grouping MonitorSignal Grouping - slug String
- annotations {[key: string]: string}
- bucket
Id string - collection
Id string - interval string
- labels {[key: string]: string}
- name string
- notification
Policy stringId - query
Monitor
Query - schedule
Monitor
Schedule - series
Conditions MonitorSeries Conditions - signal
Grouping MonitorSignal Grouping - slug string
- annotations Mapping[str, str]
- bucket_
id str - collection_
id str - interval str
- labels Mapping[str, str]
- name str
- notification_
policy_ strid - query
Monitor
Query Args - schedule
Monitor
Schedule Args - series_
conditions MonitorSeries Conditions Args - signal_
grouping MonitorSignal Grouping Args - slug str
- annotations Map<String>
- bucket
Id String - collection
Id String - interval String
- labels Map<String>
- name String
- notification
Policy StringId - query Property Map
- schedule Property Map
- series
Conditions Property Map - signal
Grouping Property Map - slug String
Supporting Types
MonitorQuery, MonitorQueryArgs
- Graphite
Expr string - Prometheus
Expr string
- Graphite
Expr string - Prometheus
Expr string
- graphite
Expr String - prometheus
Expr String
- graphite
Expr string - prometheus
Expr string
- graphite_
expr str - prometheus_
expr str
- graphite
Expr String - prometheus
Expr String
MonitorSchedule, MonitorScheduleArgs
- timezone String
- ranges List<Property Map>
MonitorScheduleRange, MonitorScheduleRangeArgs
MonitorSeriesConditions, MonitorSeriesConditionsArgs
MonitorSeriesConditionsCondition, MonitorSeriesConditionsConditionArgs
- Op string
- Severity string
- Resolve
Sustain string - Sustain string
- Value double
- Op string
- Severity string
- Resolve
Sustain string - Sustain string
- Value float64
- op String
- severity String
- resolve
Sustain String - sustain String
- value Double
- op string
- severity string
- resolve
Sustain string - sustain string
- value number
- op str
- severity str
- resolve_
sustain str - sustain str
- value float
- op String
- severity String
- resolve
Sustain String - sustain String
- value Number
MonitorSeriesConditionsOverride, MonitorSeriesConditionsOverrideArgs
MonitorSeriesConditionsOverrideCondition, MonitorSeriesConditionsOverrideConditionArgs
- Op string
- Severity string
- Resolve
Sustain string - Sustain string
- Value double
- Op string
- Severity string
- Resolve
Sustain string - Sustain string
- Value float64
- op String
- severity String
- resolve
Sustain String - sustain String
- value Double
- op string
- severity string
- resolve
Sustain string - sustain string
- value number
- op str
- severity str
- resolve_
sustain str - sustain str
- value float
- op String
- severity String
- resolve
Sustain String - sustain String
- value Number
MonitorSeriesConditionsOverrideLabelMatcher, MonitorSeriesConditionsOverrideLabelMatcherArgs
MonitorSignalGrouping, MonitorSignalGroupingArgs
- Label
Names List<string> - Signal
Per boolSeries
- Label
Names []string - Signal
Per boolSeries
- label
Names List<String> - signal
Per BooleanSeries
- label
Names string[] - signal
Per booleanSeries
- label_
names Sequence[str] - signal_
per_ boolseries
- label
Names List<String> - signal
Per BooleanSeries
Package Details
- Repository
- chronosphere chronosphereio/pulumi-chronosphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
chronosphere
Terraform Provider.