Skip to content

Commit

Permalink
Edits from Support team feedback (#8)
Browse files Browse the repository at this point in the history
This PR is for the edits to the index.md file, per feedback from Support team.

Ref: LOG-7733
Semver: Patch

Co-authored-by: Tana Berry <[email protected]>
  • Loading branch information
Tana M Berry and Tana Berry authored Oct 29, 2020
1 parent 794eb96 commit 4f90dbc
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 28 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

[![CircleCI](https://circleci.com/gh/logdna/terraform-provider-logdna/tree/master.svg?style=svg)](https://app.circleci.com/pipelines/github/logdna/terraform-provider-logdna)
[![Coverage Status](https://coveralls.io/repos/github/logdna/terraform-provider-logdna/badge.svg)](https://coveralls.io/github/logdna/terraform-provider-logdna)

🚧 In public beta 🚧
[![Public Beta](https://img.shields.io/badge/-Public%20Beta-404346?style=flat)](#)

[LogDNA](https://logdna.com) is a centralized log management platform. The LogDNA Provider allows organizations to manage Views and Alerts programmatically via Terraform.

Expand Down Expand Up @@ -44,10 +43,10 @@ resource "logdna_view" "my_view" {
hello = "test3"
test = "test2"
}
bodytemplate = {
bodytemplate = jsonencode({
hello = "test1"
test = "test2"
}
})
immediate = "false"
method = "post"
url = "https://yourwebhook/endpoint"
Expand Down
11 changes: 5 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# LogDNA Provider

🚧 In public beta 🚧
[![Public Beta](https://img.shields.io/badge/-Public%20Beta-404346?style=flat)](#)

[LogDNA](https://logdna.com) is a centralized log management platform. The LogDNA Provider allows organizations to manage Views and Alerts programmatically via Terraform.

Expand All @@ -10,12 +10,12 @@
# Configure the LogDNA Provider
provider "logdna" {
servicekey = "xxxxxxxxxxxxxxxxxxxxxxxx"
url = "https://api.logdna.com" # (Optional) LogDNA Region Instance, needed for IBM-based instances
url = "https://api.logdna.com" # (Optional) specify a LogDNA Region
}
resource "logdna_view" "http500" {
name = "HTTP 500s"
query = "request:500"
query = "response:500"
email_channel {
emails = ["[email protected]"] # Email address to send alerts to
operator = "presence" # Trigger on the presence of lines
Expand All @@ -31,14 +31,13 @@ Before using Terraform for creating resources in LogDNA, review the following no
- Verify Terraform is [installed](https://learn.hashicorp.com/tutorials/terraform/install-cli). The minimum supported version is 0.12.0 and can be checked by running `terraform version`.
- Have the service key for your Organization available. To obtain the service key for your LogDNA Organization, go to the LogDNA dashboard and navigate to **Settings > Organization > API Keys** or follow this link [here](https://app.logdna.com/manage/api-keys).
- Authentication is handled via the `servicekey` parameter and can be set in the provider configuration.
- Be aware that the underlying LogDNA Configuration API has a rate limit of 50 requests at a time; therefore, when using the LogDNA Terraform provider, there is also a limit of 50 resource operations at a time.
- Be aware that the underlying LogDNA Configuration API has a rate limit of 50 requests per minute; therefore, when using the LogDNA Terraform provider, there is also a limit of 50 resource operations per minute.
- If you do not provide a specific base URL in the provider configuration, the base url defaults to `https://api.logdna.com`.
- If you want to create an Alert that uses PagerDuty to notify you, you will need to provide LogDNA with the [PagerDuty API key](https://support.pagerduty.com/docs/generating-api-keys#events-api-keys).
- If you want to create an Alert that uses PagerDuty to notify you, you will need to provide LogDNA with the [PagerDuty API key](https://support.pagerduty.com/docs/generating-api-keys#events-api-keys). To ensure that the LogDNA Dashboard properly displays the PagerDuty alert notification channel, we recommend that you first link the PagerDuty service to LogDNA via the [Dashboard UI](https://docs.logdna.com/docs/pagerduty-alert-integration), before using the Configuration API to create a PagerDuty Alert. However, not doing so doesn't in any way prevent the use of the Configuration API to create Alerts that use PagerDuty.

## Argument Reference

The following arguments are supported:

- `servicekey`: _(Required)_ LogDNA Account Service Key. This can be generated or retrieved from Settings > Organization > API Keys. Type _string_
- `url`: _(Optional)_ The LogDNA region URL. If you’re configuring an IBM Log Analysis with LogDNA or IBM Cloud Activity Tracker with LogDNA you’ll need to ensure `url` is set to the [right endpoint depending on the IBM region](https://cloud.ibm.com/docs/Log-Analysis-with-LogDNA?topic=Log-Analysis-with-LogDNA-endpoints#endpoints_api). Type _string_ (**_Default: api.logdna.com_**)

36 changes: 18 additions & 18 deletions docs/resources/logdna_view.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Manages [LogDNA Views](https://docs.logdna.com/docs/views) as well as [View-spec
```hcl
provider "logdna" {
servicekey = "xxxxxxxxxxxxxxxxxxxxxxxx"
url = "https://api.logdna.com" # (Optional) LogDNA Region Instance, needed for IBM-based instances
url = "https://api.logdna.com" # (Optional) specify a LogDNA Region
}
resource "logdna_view" "my_view" {
Expand All @@ -21,7 +21,7 @@ resource "logdna_view" "my_view" {
```hcl
provider "logdna" {
servicekey = "xxxxxxxxxxxxxxxxxxxxxxxx"
url = "https://api.logdna.com" # (Optional) LogDNA Region Instance, needed for IBM-based instances
url = "https://api.logdna.com" # (Optional) specify a LogDNA Region
}
resource "logdna_view" "my_view" {
Expand Down Expand Up @@ -51,9 +51,9 @@ resource "logdna_view" "my_view" {
}
webhook_channel {
bodytemplate = {
bodytemplate = jsonencode({
message = "Alerts from {{name}}"
}
})
headers = {
"Authentication" = "auth_header_value"
"HeaderTwo" = "ValueTwo"
Expand All @@ -72,7 +72,7 @@ resource "logdna_view" "my_view" {

The following arguments are supported:

_Note:_ At least one of the following properties: `apps`, `hosts`, `levels`, `query`, `tags` must be specified to create a View. Unless otherwise noted, all field values are case in-sensitive.
_Note:_ A `name` and at least one of the following properties: `apps`, `hosts`, `levels`, `query`, `tags` must be specified to create a View. Unless otherwise noted, all field values are case in-sensitive.
- `apps`: _(Optional)_ Array of names of apps (each app is of type _string_) to filter the View by
- `categories`: _(Optional)_ Array of existing category names (each category is of type _string_) this View should be nested under. _Note: If the category does not exist, the View will by default be created in uncategorized_
- `hosts`: _(Optional)_ Array of names of hosts (each host is of type _string_) to filter the View by
Expand All @@ -86,22 +86,22 @@ _Note:_ At least one of the following properties: `apps`, `hosts`, `levels`, `qu
`email_channel` supports the following arguments:

- `emails`: _(Required)_ An array of email addresses (each email is of type _string_) to notify in the Alert
- `immediate`: _(Optional)_ Whether the Alert will trigger immediately after the trigger limit is reached, type _string_ (**Default: "false"**)
- `operator`: _(Optional)_ Whether the Alert will trigger on the presence or absence of logs, type _string_ (**Default: "presence"**)
- `terminal`: _(Optional)_ Whether the Alert will trigger after the `triggerinterval` if the Alert condition is met (e.g., send an Alert after 30s), type _string_
- `immediate`: _(Optional)_ Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are `true` and `false`, type _string_ (**Default: "false"**)
- `operator`: _(Optional)_ Whether the Alert will trigger on the presence or absence of logs. Valid options are `presence` and `absence`, type _string_ (**Default: "presence"**)
- `terminal`: _(Optional)_ Whether the Alert will trigger after the `triggerinterval` if the Alert condition is met (e.g., send an Alert after 30s). Valid options are `true` and `false`, type _string_
- `timezone`: _(Optional)_ Which time zone the log timestamps will be formatted in. Timezones are represented as [database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), type _string_
- `triggerinterval`: _(Optional)_ Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid values are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid values are: 15m, 30m, 1h, 6h, 12h, and 24h. Type _string_ (**Defaults: "30" for presence; "15m" for absence**)
- `triggerinterval`: _(Optional)_ Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: `30`, `1m`, `5m`, `15m`, `30m`, `1h`, `6h`, `12h`, and `24h`. For absence Alerts, valid options are: `15m`, `30m`, `1h`, `6h`, `12h`, and `24h`. Type _string_ (**Defaults: "30" for presence; "15m" for absence**)
- `triggerlimit`: _(Required)_ Number of lines before the Alert is triggered. (eg. Setting a value of `10` for an `absence` Alert would alert you if `10` lines were not seen in the `triggerinterval`), type _integer_

### pagerduty_channel

`pagerduty_channel` supports the following arguments:

- `immediate`: _(Optional)_ Whether the Alert will trigger immediately after the trigger limit is reached, type _string_ (**Default: "false"**)
- `immediate`: _(Optional)_ Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are `true` and `false`, type _string_ (**Default: "false"**)
- `key`: _(Required)_ PagerDuty service key, type _string_
- `operator`: _(Optional)_ Whether the Alert will trigger on the presence or absence of logs, type _string_ (**Default: "presence"**)
- `terminal`: _(Optional)_ Whether the Alert will trigger after the `triggerinterval` if the Alert condition is met (e.g., send an Alert after 30s), type _string_
- `triggerinterval`: _(Optional)_ Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid values are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid values are: 15m, 30m, 1h, 6h, 12h, and 24h. Type _string_ (**Defaults: "30" for presence; "15m" for absence**)
- `operator`: _(Optional)_ Whether the Alert will trigger on the presence or absence of logs. Valid options are `presence` and `absence`, type _string_ (**Default: "presence"**)
- `terminal`: _(Optional)_ Whether the Alert will trigger after the `triggerinterval` if the Alert condition is met (e.g., send an Alert after 30s). Valid options are `true` and `false`, type _string_
- `triggerinterval`: _(Optional)_ Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: `30`, `1m`, `5m`, `15m`, `30m`, `1h`, `6h`, `12h`, and `24h`. For absence Alerts, valid options are: `15m`, `30m`, `1h`, `6h`, `12h`, and `24h`. Type _string_ (**Defaults: "30" for presence; "15m" for absence**)
- `triggerlimit`: _(Required)_ Number of lines before the Alert is triggered. (eg. Setting a value of `10` for an `absence` Alert would alert you if `10` lines were not seen in the `triggerinterval`), type _integer_

### webhook_channel
Expand All @@ -110,11 +110,11 @@ _Note:_ At least one of the following properties: `apps`, `hosts`, `levels`, `qu

- `bodytemplate`: _(Optional)_ JSON formatted string for the body of the webhook. We recommend using [`jsonencode()`](https://www.terraform.io/docs/configuration/functions/jsonencode.html) to easily convert a Terraform map into a JSON string. Type _string_
- `headers`: _(Optional)_ Key-value pair for webhook request headers and header values, type Map of _strings_
- `immediate`: _(Optional)_ Whether the Alert will trigger immediately after the trigger limit is reached, type _string_ (**Default: "false"**)
- `method`: _(Optional)_ Method used for the webhook request, type _string_ (**Default: "POST"**)
- `operator`: _(Optional)_ Whether the Alert will trigger on the presence or absence of logs, type _string_. Two possible values: "absence" and "presence" (**Default: "presence"**)
- `terminal`: _(Optional)_ Whether the Alert will trigger after the `triggerinterval` if the Alert condition is met (e.g., send an Alert after 30s), type _string_
- `triggerinterval`: _(Optional)_ Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid values are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid values are: 15m, 30m, 1h, 6h, 12h, and 24h. Type _string_ (**Defaults: "30" for presence; "15m" for absence**)
- `immediate`: _(Optional)_ Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are `true` and `false`, type _string_ (**Default: "false"**)
- `method`: _(Optional)_ Method used for the webhook request. Valid options are: `post`, `put`, `patch`, `get`, `delete`. Type _string_ (**Default: "post"**)
- `operator`: _(Optional)_ Whether the Alert will trigger on the presence or absence of logs. Valid options are `presence` and `absence`, type _string_ (**Default: "presence"**)
- `terminal`: _(Optional)_ Whether the Alert will trigger after the `triggerinterval` if the Alert condition is met (e.g., send an Alert after 30s). Valid options are `true` and `false`, type _string_
- `triggerinterval`: _(Optional)_ Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: `30`, `1m`, `5m`, `15m`, `30m`, `1h`, `6h`, `12h`, and `24h`. For absence Alerts, valid options are: `15m`, `30m`, `1h`, `6h`, `12h`, and `24h`. Type _string_ (**Defaults: "30" for presence; "15m" for absence**)
- `triggerlimit`: _(Required)_ Number of lines before the Alert is triggered. (eg. Setting a value of `10` for an `absence` Alert would alert you if `10` lines were not seen in the `triggerinterval`), type _integer_
- `url`: _(Required)_ URL of the webhook, type _string_

0 comments on commit 4f90dbc

Please sign in to comment.