grafana.machineLearning.OutlierDetector
Explore with Pulumi AI
An outlier detector monitors the results of a query and reports when its values are outside normal bands.
The normal band is configured by choice of algorithm, its sensitivity and other configuration.
Visit https://grafana.com/docs/grafana-cloud/machine-learning/outlier-detection/ for more details.
Create OutlierDetector Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OutlierDetector(name: string, args: OutlierDetectorArgs, opts?: CustomResourceOptions);
@overload
def OutlierDetector(resource_name: str,
args: OutlierDetectorArgs,
opts: Optional[ResourceOptions] = None)
@overload
def OutlierDetector(resource_name: str,
opts: Optional[ResourceOptions] = None,
algorithm: Optional[_machinelearning.OutlierDetectorAlgorithmArgs] = None,
datasource_type: Optional[str] = None,
datasource_uid: Optional[str] = None,
metric: Optional[str] = None,
query_params: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
interval: Optional[int] = None,
name: Optional[str] = None)
func NewOutlierDetector(ctx *Context, name string, args OutlierDetectorArgs, opts ...ResourceOption) (*OutlierDetector, error)
public OutlierDetector(string name, OutlierDetectorArgs args, CustomResourceOptions? opts = null)
public OutlierDetector(String name, OutlierDetectorArgs args)
public OutlierDetector(String name, OutlierDetectorArgs args, CustomResourceOptions options)
type: grafana:machineLearning:OutlierDetector
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 OutlierDetectorArgs
- 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 OutlierDetectorArgs
- 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 OutlierDetectorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OutlierDetectorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OutlierDetectorArgs
- 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 outlierDetectorResource = new Grafana.MachineLearning.OutlierDetector("outlierDetectorResource", new()
{
Algorithm = new Grafana.MachineLearning.Inputs.OutlierDetectorAlgorithmArgs
{
Name = "string",
Sensitivity = 0,
Config = new Grafana.MachineLearning.Inputs.OutlierDetectorAlgorithmConfigArgs
{
Epsilon = 0,
},
},
DatasourceType = "string",
DatasourceUid = "string",
Metric = "string",
QueryParams =
{
{ "string", "string" },
},
Description = "string",
Interval = 0,
Name = "string",
});
example, err := machineLearning.NewOutlierDetector(ctx, "outlierDetectorResource", &machineLearning.OutlierDetectorArgs{
Algorithm: &machinelearning.OutlierDetectorAlgorithmArgs{
Name: pulumi.String("string"),
Sensitivity: pulumi.Float64(0),
Config: &machinelearning.OutlierDetectorAlgorithmConfigArgs{
Epsilon: pulumi.Float64(0),
},
},
DatasourceType: pulumi.String("string"),
DatasourceUid: pulumi.String("string"),
Metric: pulumi.String("string"),
QueryParams: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
Interval: pulumi.Int(0),
Name: pulumi.String("string"),
})
var outlierDetectorResource = new OutlierDetector("outlierDetectorResource", OutlierDetectorArgs.builder()
.algorithm(OutlierDetectorAlgorithmArgs.builder()
.name("string")
.sensitivity(0)
.config(OutlierDetectorAlgorithmConfigArgs.builder()
.epsilon(0)
.build())
.build())
.datasourceType("string")
.datasourceUid("string")
.metric("string")
.queryParams(Map.of("string", "string"))
.description("string")
.interval(0)
.name("string")
.build());
outlier_detector_resource = grafana.machine_learning.OutlierDetector("outlierDetectorResource",
algorithm={
"name": "string",
"sensitivity": 0,
"config": {
"epsilon": 0,
},
},
datasource_type="string",
datasource_uid="string",
metric="string",
query_params={
"string": "string",
},
description="string",
interval=0,
name="string")
const outlierDetectorResource = new grafana.machinelearning.OutlierDetector("outlierDetectorResource", {
algorithm: {
name: "string",
sensitivity: 0,
config: {
epsilon: 0,
},
},
datasourceType: "string",
datasourceUid: "string",
metric: "string",
queryParams: {
string: "string",
},
description: "string",
interval: 0,
name: "string",
});
type: grafana:machineLearning:OutlierDetector
properties:
algorithm:
config:
epsilon: 0
name: string
sensitivity: 0
datasourceType: string
datasourceUid: string
description: string
interval: 0
metric: string
name: string
queryParams:
string: string
OutlierDetector 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 OutlierDetector resource accepts the following input properties:
- Algorithm
Pulumiverse.
Grafana. Machine Learning. Inputs. Outlier Detector Algorithm - The algorithm to use and its configuration. See https://grafana.com/docs/grafana-cloud/machine-learning/outlier-detection/ for details.
- Datasource
Type string - The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
- Datasource
Uid string - The uid of the datasource to query.
- Metric string
- The metric used to query the outlier detector results.
- Query
Params Dictionary<string, string> - An object representing the query params to query Grafana with.
- Description string
- A description of the outlier detector.
- Interval int
- The data interval in seconds to monitor. Defaults to
300
. - Name string
- The name of the outlier detector.
- Algorithm
Outlier
Detector Algorithm Args - The algorithm to use and its configuration. See https://grafana.com/docs/grafana-cloud/machine-learning/outlier-detection/ for details.
- Datasource
Type string - The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
- Datasource
Uid string - The uid of the datasource to query.
- Metric string
- The metric used to query the outlier detector results.
- Query
Params map[string]string - An object representing the query params to query Grafana with.
- Description string
- A description of the outlier detector.
- Interval int
- The data interval in seconds to monitor. Defaults to
300
. - Name string
- The name of the outlier detector.
- algorithm
Outlier
Detector Algorithm - The algorithm to use and its configuration. See https://grafana.com/docs/grafana-cloud/machine-learning/outlier-detection/ for details.
- datasource
Type String - The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
- datasource
Uid String - The uid of the datasource to query.
- metric String
- The metric used to query the outlier detector results.
- query
Params Map<String,String> - An object representing the query params to query Grafana with.
- description String
- A description of the outlier detector.
- interval Integer
- The data interval in seconds to monitor. Defaults to
300
. - name String
- The name of the outlier detector.
- algorithm
Outlier
Detector Algorithm - The algorithm to use and its configuration. See https://grafana.com/docs/grafana-cloud/machine-learning/outlier-detection/ for details.
- datasource
Type string - The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
- datasource
Uid string - The uid of the datasource to query.
- metric string
- The metric used to query the outlier detector results.
- query
Params {[key: string]: string} - An object representing the query params to query Grafana with.
- description string
- A description of the outlier detector.
- interval number
- The data interval in seconds to monitor. Defaults to
300
. - name string
- The name of the outlier detector.
- algorithm
machinelearning.
Outlier Detector Algorithm Args - The algorithm to use and its configuration. See https://grafana.com/docs/grafana-cloud/machine-learning/outlier-detection/ for details.
- datasource_
type str - The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
- datasource_
uid str - The uid of the datasource to query.
- metric str
- The metric used to query the outlier detector results.
- query_
params Mapping[str, str] - An object representing the query params to query Grafana with.
- description str
- A description of the outlier detector.
- interval int
- The data interval in seconds to monitor. Defaults to
300
. - name str
- The name of the outlier detector.
- algorithm Property Map
- The algorithm to use and its configuration. See https://grafana.com/docs/grafana-cloud/machine-learning/outlier-detection/ for details.
- datasource
Type String - The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
- datasource
Uid String - The uid of the datasource to query.
- metric String
- The metric used to query the outlier detector results.
- query
Params Map<String> - An object representing the query params to query Grafana with.
- description String
- A description of the outlier detector.
- interval Number
- The data interval in seconds to monitor. Defaults to
300
. - name String
- The name of the outlier detector.
Outputs
All input properties are implicitly available as output properties. Additionally, the OutlierDetector 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 OutlierDetector Resource
Get an existing OutlierDetector 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?: OutlierDetectorState, opts?: CustomResourceOptions): OutlierDetector
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
algorithm: Optional[_machinelearning.OutlierDetectorAlgorithmArgs] = None,
datasource_type: Optional[str] = None,
datasource_uid: Optional[str] = None,
description: Optional[str] = None,
interval: Optional[int] = None,
metric: Optional[str] = None,
name: Optional[str] = None,
query_params: Optional[Mapping[str, str]] = None) -> OutlierDetector
func GetOutlierDetector(ctx *Context, name string, id IDInput, state *OutlierDetectorState, opts ...ResourceOption) (*OutlierDetector, error)
public static OutlierDetector Get(string name, Input<string> id, OutlierDetectorState? state, CustomResourceOptions? opts = null)
public static OutlierDetector get(String name, Output<String> id, OutlierDetectorState 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.
- Algorithm
Pulumiverse.
Grafana. Machine Learning. Inputs. Outlier Detector Algorithm - The algorithm to use and its configuration. See https://grafana.com/docs/grafana-cloud/machine-learning/outlier-detection/ for details.
- Datasource
Type string - The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
- Datasource
Uid string - The uid of the datasource to query.
- Description string
- A description of the outlier detector.
- Interval int
- The data interval in seconds to monitor. Defaults to
300
. - Metric string
- The metric used to query the outlier detector results.
- Name string
- The name of the outlier detector.
- Query
Params Dictionary<string, string> - An object representing the query params to query Grafana with.
- Algorithm
Outlier
Detector Algorithm Args - The algorithm to use and its configuration. See https://grafana.com/docs/grafana-cloud/machine-learning/outlier-detection/ for details.
- Datasource
Type string - The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
- Datasource
Uid string - The uid of the datasource to query.
- Description string
- A description of the outlier detector.
- Interval int
- The data interval in seconds to monitor. Defaults to
300
. - Metric string
- The metric used to query the outlier detector results.
- Name string
- The name of the outlier detector.
- Query
Params map[string]string - An object representing the query params to query Grafana with.
- algorithm
Outlier
Detector Algorithm - The algorithm to use and its configuration. See https://grafana.com/docs/grafana-cloud/machine-learning/outlier-detection/ for details.
- datasource
Type String - The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
- datasource
Uid String - The uid of the datasource to query.
- description String
- A description of the outlier detector.
- interval Integer
- The data interval in seconds to monitor. Defaults to
300
. - metric String
- The metric used to query the outlier detector results.
- name String
- The name of the outlier detector.
- query
Params Map<String,String> - An object representing the query params to query Grafana with.
- algorithm
Outlier
Detector Algorithm - The algorithm to use and its configuration. See https://grafana.com/docs/grafana-cloud/machine-learning/outlier-detection/ for details.
- datasource
Type string - The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
- datasource
Uid string - The uid of the datasource to query.
- description string
- A description of the outlier detector.
- interval number
- The data interval in seconds to monitor. Defaults to
300
. - metric string
- The metric used to query the outlier detector results.
- name string
- The name of the outlier detector.
- query
Params {[key: string]: string} - An object representing the query params to query Grafana with.
- algorithm
machinelearning.
Outlier Detector Algorithm Args - The algorithm to use and its configuration. See https://grafana.com/docs/grafana-cloud/machine-learning/outlier-detection/ for details.
- datasource_
type str - The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
- datasource_
uid str - The uid of the datasource to query.
- description str
- A description of the outlier detector.
- interval int
- The data interval in seconds to monitor. Defaults to
300
. - metric str
- The metric used to query the outlier detector results.
- name str
- The name of the outlier detector.
- query_
params Mapping[str, str] - An object representing the query params to query Grafana with.
- algorithm Property Map
- The algorithm to use and its configuration. See https://grafana.com/docs/grafana-cloud/machine-learning/outlier-detection/ for details.
- datasource
Type String - The type of datasource being queried. Currently allowed values are prometheus, graphite, loki, postgres, and datadog.
- datasource
Uid String - The uid of the datasource to query.
- description String
- A description of the outlier detector.
- interval Number
- The data interval in seconds to monitor. Defaults to
300
. - metric String
- The metric used to query the outlier detector results.
- name String
- The name of the outlier detector.
- query
Params Map<String> - An object representing the query params to query Grafana with.
Supporting Types
OutlierDetectorAlgorithm, OutlierDetectorAlgorithmArgs
- Name string
- The name of the algorithm to use ('mad' or 'dbscan').
- Sensitivity double
- Specify the sensitivity of the detector (in range [0,1]).
- Config
Pulumiverse.
Grafana. Machine Learning. Inputs. Outlier Detector Algorithm Config - For DBSCAN only, specify the configuration map
- Name string
- The name of the algorithm to use ('mad' or 'dbscan').
- Sensitivity float64
- Specify the sensitivity of the detector (in range [0,1]).
- Config
Outlier
Detector Algorithm Config - For DBSCAN only, specify the configuration map
- name String
- The name of the algorithm to use ('mad' or 'dbscan').
- sensitivity Double
- Specify the sensitivity of the detector (in range [0,1]).
- config
Outlier
Detector Algorithm Config - For DBSCAN only, specify the configuration map
- name string
- The name of the algorithm to use ('mad' or 'dbscan').
- sensitivity number
- Specify the sensitivity of the detector (in range [0,1]).
- config
Outlier
Detector Algorithm Config - For DBSCAN only, specify the configuration map
- name str
- The name of the algorithm to use ('mad' or 'dbscan').
- sensitivity float
- Specify the sensitivity of the detector (in range [0,1]).
- config
machinelearning.
Outlier Detector Algorithm Config - For DBSCAN only, specify the configuration map
- name String
- The name of the algorithm to use ('mad' or 'dbscan').
- sensitivity Number
- Specify the sensitivity of the detector (in range [0,1]).
- config Property Map
- For DBSCAN only, specify the configuration map
OutlierDetectorAlgorithmConfig, OutlierDetectorAlgorithmConfigArgs
- Epsilon double
- Specify the epsilon parameter (positive float)
- Epsilon float64
- Specify the epsilon parameter (positive float)
- epsilon Double
- Specify the epsilon parameter (positive float)
- epsilon number
- Specify the epsilon parameter (positive float)
- epsilon float
- Specify the epsilon parameter (positive float)
- epsilon Number
- Specify the epsilon parameter (positive float)
Import
$ pulumi import grafana:machineLearning/outlierDetector:OutlierDetector name "{{ id }}"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- grafana pulumiverse/pulumi-grafana
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
grafana
Terraform Provider.