-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: PC-12843 Add Terraform for Logic Monitor (#232)
Add Terraform for new integration with Logic Monitor Example main.tf ```terraform terraform { required_providers { nobl9 = { source = "nobl9.com/nobl9/nobl9" version = "0.26.0" } } } resource "nobl9_project" "project" { display_name = "LM-project Display" name = "lm-project" description = "Lorem ipsum project" } resource "nobl9_service" "service" { display_name = "LM-service Display" name = "lm-service" project = nobl9_project.project.name description = "Lorem ipsum service" label { key = "env" values = ["dev", "prod"] } label { key = "team" values = ["red"] } } resource "nobl9_agent" "agent" { name = "lm-agent" logic_monitor_config { account = "account_name" } project = nobl9_project.project.name agent_type = "logic_monitor" release_channel = "beta" query_delay { unit = "Minute" value = 6 } } resource "nobl9_direct_logic_monitor" "direct" { name = "lm-direct" project = nobl9_project.project.name description = "Lorem ipsum direct" account = "account_name" account_id = "secret" access_key = "secret" release_channel = "beta" query_delay { unit = "Minute" value = 6 } } resource "nobl9_slo" "slo" { display_name = "LM-slo Display" name = "lm-slo" project = nobl9_project.project.name service = nobl9_service.service.name label { key = "team" values = ["green","sapphire"] } label { key = "env" values = ["dev", "staging", "prod"] } budgeting_method = "Occurrences" objective { display_name = "obj1" name = "tf-objective-1" target = 0.7 value = 1 op = "lt" raw_metric { query { logic_monitor { query_type = "device_metrics" device_data_source_instance_id = "775430648" graph_id = "11354" line = "AVERAGE" } } } } time_window { count = 10 is_rolling = true unit = "Minute" } indicator { name = nobl9_direct_logic_monitor.direct.name project = nobl9_project.project.name kind = "Direct" } } ``` --------- Co-authored-by: Mateusz Hawrus <[email protected]> Co-authored-by: paulina-n9 <[email protected]>
- Loading branch information
1 parent
74a369a
commit 20c8437
Showing
16 changed files
with
465 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
page_title: "nobl9_direct_logic_monitor Resource - terraform-provider-nobl9" | ||
description: |- | ||
Logic Monitor Direct | Nobl9 Documentation https://docs.nobl9.com/Sources/logic-monitor#logic-monitor-direct | ||
--- | ||
|
||
# nobl9_direct_logic_monitor (Resource) | ||
|
||
LogicMonitor is a SaaS-based monitoring platform designed for automated monitoring of IT systems. It centralizes monitoring by providing a unified view of various IT components, including networks, cloud environments, servers, and applications. Nobl9 integration with LogicMonitor allows you to create SLOs on LogicMonitor DataPoints based on a threshold (raw) or ratio (count) metrics. | ||
|
||
For more information, refer to [Logic Monitor Direct | Nobl9 Documentation](https://docs.nobl9.com/Sources/logic-monitor#logic-monitor-direct) | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "nobl9_direct_logic_monitor" "logic_monitor" { | ||
name = "logic-monitor" | ||
project = "logic-monitor" | ||
description = "desc" | ||
account = "account_name" | ||
account_id = "secret" | ||
access_key = "secret" | ||
log_collection_enabled = true | ||
release_channel = "beta" | ||
query_delay { | ||
unit = "Minute" | ||
value = 6 | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `account` (String) Account name. | ||
- `name` (String) Unique name of the resource, must conform to the naming convention from [DNS RFC1123](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). | ||
- `project` (String) Name of the Nobl9 project the resource sits in, must conform to the naming convention from [DNS RFC1123](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). | ||
|
||
### Optional | ||
|
||
- `access_key` (String, Sensitive) [required] | Logic Monitor Application access key. | ||
- `account_id` (String) [required] | Logic Monitor Application account ID. | ||
- `description` (String) Optional description of the resource. Here, you can add details about who is responsible for the integration (team/owner) or the purpose of creating it. | ||
- `display_name` (String) User-friendly display name of the resource. | ||
- `log_collection_enabled` (Boolean) [Logs documentation](https://docs.nobl9.com/features/slo-troubleshooting/event-logs) | ||
- `query_delay` (Block Set, Max: 1) [Query delay configuration documentation](https://docs.nobl9.com/features/query-delay). Computed if not provided. (see [below for nested schema](#nestedblock--query_delay)) | ||
- `release_channel` (String) Release channel of the created data source [stable/beta] | ||
- `source_of` (List of String, Deprecated) This value indicated whether the field was a source of metrics and/or services. 'source_of' is deprecated and not used anywhere; however, it's kept for backward compatibility. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `status` (String) The status of the created direct. | ||
|
||
<a id="nestedblock--query_delay"></a> | ||
### Nested Schema for `query_delay` | ||
|
||
Required: | ||
|
||
- `unit` (String) Must be one of Minute or Second. | ||
- `value` (Number) Must be an integer greater than or equal to 0. | ||
|
||
## Nobl9 Official Documentation | ||
|
||
https://docs.nobl9.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
resource "nobl9_direct_logic_monitor" "logic_monitor" { | ||
name = "logic-monitor" | ||
project = "logic-monitor" | ||
description = "desc" | ||
account = "account_name" | ||
account_id = "secret" | ||
access_key = "secret" | ||
log_collection_enabled = true | ||
release_channel = "beta" | ||
query_delay { | ||
unit = "Minute" | ||
value = 6 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.