grafana.MachineLearningOutlierDetector
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 MachineLearningOutlierDetector Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MachineLearningOutlierDetector(name: string, args: MachineLearningOutlierDetectorArgs, opts?: CustomResourceOptions);
@overload
def MachineLearningOutlierDetector(resource_name: str,
args: MachineLearningOutlierDetectorArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MachineLearningOutlierDetector(resource_name: str,
opts: Optional[ResourceOptions] = None,
algorithm: Optional[MachineLearningOutlierDetectorAlgorithmArgs] = None,
datasource_type: Optional[str] = None,
metric: Optional[str] = None,
query_params: Optional[Mapping[str, Any]] = None,
datasource_id: Optional[int] = None,
datasource_uid: Optional[str] = None,
description: Optional[str] = None,
interval: Optional[int] = None,
name: Optional[str] = None)
func NewMachineLearningOutlierDetector(ctx *Context, name string, args MachineLearningOutlierDetectorArgs, opts ...ResourceOption) (*MachineLearningOutlierDetector, error)
public MachineLearningOutlierDetector(string name, MachineLearningOutlierDetectorArgs args, CustomResourceOptions? opts = null)
public MachineLearningOutlierDetector(String name, MachineLearningOutlierDetectorArgs args)
public MachineLearningOutlierDetector(String name, MachineLearningOutlierDetectorArgs args, CustomResourceOptions options)
type: grafana:MachineLearningOutlierDetector
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 MachineLearningOutlierDetectorArgs
- 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 MachineLearningOutlierDetectorArgs
- 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 MachineLearningOutlierDetectorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MachineLearningOutlierDetectorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MachineLearningOutlierDetectorArgs
- 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 machineLearningOutlierDetectorResource = new Grafana.MachineLearningOutlierDetector("machineLearningOutlierDetectorResource", new()
{
Algorithm = new Grafana.Inputs.MachineLearningOutlierDetectorAlgorithmArgs
{
Name = "string",
Sensitivity = 0,
Config = new Grafana.Inputs.MachineLearningOutlierDetectorAlgorithmConfigArgs
{
Epsilon = 0,
},
},
DatasourceType = "string",
Metric = "string",
QueryParams =
{
{ "string", "any" },
},
DatasourceUid = "string",
Description = "string",
Interval = 0,
Name = "string",
});
example, err := grafana.NewMachineLearningOutlierDetector(ctx, "machineLearningOutlierDetectorResource", &grafana.MachineLearningOutlierDetectorArgs{
Algorithm: &grafana.MachineLearningOutlierDetectorAlgorithmArgs{
Name: pulumi.String("string"),
Sensitivity: pulumi.Float64(0),
Config: &grafana.MachineLearningOutlierDetectorAlgorithmConfigArgs{
Epsilon: pulumi.Float64(0),
},
},
DatasourceType: pulumi.String("string"),
Metric: pulumi.String("string"),
QueryParams: pulumi.Map{
"string": pulumi.Any("any"),
},
DatasourceUid: pulumi.String("string"),
Description: pulumi.String("string"),
Interval: pulumi.Int(0),
Name: pulumi.String("string"),
})
var machineLearningOutlierDetectorResource = new MachineLearningOutlierDetector("machineLearningOutlierDetectorResource", MachineLearningOutlierDetectorArgs.builder()
.algorithm(MachineLearningOutlierDetectorAlgorithmArgs.builder()
.name("string")
.sensitivity(0)
.config(MachineLearningOutlierDetectorAlgorithmConfigArgs.builder()
.epsilon(0)
.build())
.build())
.datasourceType("string")
.metric("string")
.queryParams(Map.of("string", "any"))
.datasourceUid("string")
.description("string")
.interval(0)
.name("string")
.build());
machine_learning_outlier_detector_resource = grafana.MachineLearningOutlierDetector("machineLearningOutlierDetectorResource",
algorithm=grafana.MachineLearningOutlierDetectorAlgorithmArgs(
name="string",
sensitivity=0,
config=grafana.MachineLearningOutlierDetectorAlgorithmConfigArgs(
epsilon=0,
),
),
datasource_type="string",
metric="string",
query_params={
"string": "any",
},
datasource_uid="string",
description="string",
interval=0,
name="string")
const machineLearningOutlierDetectorResource = new grafana.MachineLearningOutlierDetector("machineLearningOutlierDetectorResource", {
algorithm: {
name: "string",
sensitivity: 0,
config: {
epsilon: 0,
},
},
datasourceType: "string",
metric: "string",
queryParams: {
string: "any",
},
datasourceUid: "string",
description: "string",
interval: 0,
name: "string",
});
type: grafana:MachineLearningOutlierDetector
properties:
algorithm:
config:
epsilon: 0
name: string
sensitivity: 0
datasourceType: string
datasourceUid: string
description: string
interval: 0
metric: string
name: string
queryParams:
string: any
MachineLearningOutlierDetector Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The MachineLearningOutlierDetector resource accepts the following input properties:
- Algorithm
Pulumiverse.
Grafana. Inputs. Machine Learning 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.
- Metric string
- The metric used to query the outlier detector results.
- Query
Params Dictionary<string, object> - An object representing the query params to query Grafana with.
- Datasource
Id int - The id of the datasource to query.
- 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
. - Name string
- The name of the algorithm to use ('mad' or 'dbscan').
- Algorithm
Machine
Learning 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.
- Metric string
- The metric used to query the outlier detector results.
- Query
Params map[string]interface{} - An object representing the query params to query Grafana with.
- Datasource
Id int - The id of the datasource to query.
- 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
. - Name string
- The name of the algorithm to use ('mad' or 'dbscan').
- algorithm
Machine
Learning 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.
- metric String
- The metric used to query the outlier detector results.
- query
Params Map<String,Object> - An object representing the query params to query Grafana with.
- datasource
Id Integer - The id of the datasource to query.
- 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
. - name String
- The name of the algorithm to use ('mad' or 'dbscan').
- algorithm
Machine
Learning 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.
- metric string
- The metric used to query the outlier detector results.
- query
Params {[key: string]: any} - An object representing the query params to query Grafana with.
- datasource
Id number - The id of the datasource to query.
- 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
. - name string
- The name of the algorithm to use ('mad' or 'dbscan').
- algorithm
Machine
Learning 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.
- metric str
- The metric used to query the outlier detector results.
- query_
params Mapping[str, Any] - An object representing the query params to query Grafana with.
- datasource_
id int - The id of the datasource to query.
- 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
. - name str
- The name of the algorithm to use ('mad' or 'dbscan').
- 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.
- metric String
- The metric used to query the outlier detector results.
- query
Params Map<Any> - An object representing the query params to query Grafana with.
- datasource
Id Number - The id of the datasource to query.
- 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
. - name String
- The name of the algorithm to use ('mad' or 'dbscan').
Outputs
All input properties are implicitly available as output properties. Additionally, the MachineLearningOutlierDetector 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 MachineLearningOutlierDetector Resource
Get an existing MachineLearningOutlierDetector 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?: MachineLearningOutlierDetectorState, opts?: CustomResourceOptions): MachineLearningOutlierDetector
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
algorithm: Optional[MachineLearningOutlierDetectorAlgorithmArgs] = None,
datasource_id: Optional[int] = 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, Any]] = None) -> MachineLearningOutlierDetector
func GetMachineLearningOutlierDetector(ctx *Context, name string, id IDInput, state *MachineLearningOutlierDetectorState, opts ...ResourceOption) (*MachineLearningOutlierDetector, error)
public static MachineLearningOutlierDetector Get(string name, Input<string> id, MachineLearningOutlierDetectorState? state, CustomResourceOptions? opts = null)
public static MachineLearningOutlierDetector get(String name, Output<String> id, MachineLearningOutlierDetectorState 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. Inputs. Machine Learning Outlier Detector Algorithm - The algorithm to use and its configuration. See https://grafana.com/docs/grafana-cloud/machine-learning/outlier-detection/ for details.
- Datasource
Id int - The id of the datasource to query.
- 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 algorithm to use ('mad' or 'dbscan').
- Query
Params Dictionary<string, object> - An object representing the query params to query Grafana with.
- Algorithm
Machine
Learning 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
Id int - The id of the datasource to query.
- 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 algorithm to use ('mad' or 'dbscan').
- Query
Params map[string]interface{} - An object representing the query params to query Grafana with.
- algorithm
Machine
Learning Outlier Detector Algorithm - The algorithm to use and its configuration. See https://grafana.com/docs/grafana-cloud/machine-learning/outlier-detection/ for details.
- datasource
Id Integer - The id of the datasource to query.
- 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 algorithm to use ('mad' or 'dbscan').
- query
Params Map<String,Object> - An object representing the query params to query Grafana with.
- algorithm
Machine
Learning Outlier Detector Algorithm - The algorithm to use and its configuration. See https://grafana.com/docs/grafana-cloud/machine-learning/outlier-detection/ for details.
- datasource
Id number - The id of the datasource to query.
- 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 algorithm to use ('mad' or 'dbscan').
- query
Params {[key: string]: any} - An object representing the query params to query Grafana with.
- algorithm
Machine
Learning 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_
id int - The id of the datasource to query.
- 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 algorithm to use ('mad' or 'dbscan').
- query_
params Mapping[str, Any] - 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
Id Number - The id of the datasource to query.
- 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 algorithm to use ('mad' or 'dbscan').
- query
Params Map<Any> - An object representing the query params to query Grafana with.
Supporting Types
MachineLearningOutlierDetectorAlgorithm, MachineLearningOutlierDetectorAlgorithmArgs
- 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. Inputs. Machine Learning 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
Machine
Learning 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
Machine
Learning 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
Machine
Learning 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
Machine
Learning 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
MachineLearningOutlierDetectorAlgorithmConfig, MachineLearningOutlierDetectorAlgorithmConfigArgs
- 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:index/machineLearningOutlierDetector:MachineLearningOutlierDetector 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.