diff --git a/content/influxdb/cloud/api-guide/client-libraries/browserjs.md b/content/influxdb/cloud/api-guide/client-libraries/browserjs.md index 71a8d988a..0eeccbeba 100644 --- a/content/influxdb/cloud/api-guide/client-libraries/browserjs.md +++ b/content/influxdb/cloud/api-guide/client-libraries/browserjs.md @@ -20,4 +20,4 @@ related: - /influxdb/cloud/api-guide/client-libraries/nodejs/query/ --- -{{% duplicate-oss %}} +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/_index.md b/content/influxdb/cloud/monitor-alert/_index.md index 11e9b6130..227efcd31 100644 --- a/content/influxdb/cloud/monitor-alert/_index.md +++ b/content/influxdb/cloud/monitor-alert/_index.md @@ -14,25 +14,4 @@ influxdb/cloud/tags: [monitor, alert, checks, notification, endpoints] Monitor your time series data and send alerts by creating checks, notification rules, and notification endpoints. Or use [community templates to monitor](/influxdb/cloud/monitor-alert/templates/) supported environments. -## Overview - -1. A [check](/influxdb/cloud/reference/glossary/#check) in InfluxDB queries data and assigns a status with a `_level` based on specific conditions. -2. InfluxDB stores the output of a check in the `statuses` measurement in the `_monitoring` system bucket. -3. [Notification rules](/influxdb/cloud/reference/glossary/#notification-rule) check data in the `statuses` - measurement and, based on conditions set in the notification rule, send a message - to a [notification endpoint](/influxdb/cloud/reference/glossary/#notification-endpoint). -4. InfluxDB stores notifications in the `notifications` measurement in the `_monitoring` system bucket. - -## Create an alert - -To get started, do the following: - -1. [Create checks](/influxdb/cloud/monitor-alert/checks/create/) to monitor data and assign a status. -2. [Add notification endpoints](/influxdb/cloud/monitor-alert/notification-endpoints/create/) - to send notifications to third parties. -3. [Create notification rules](/influxdb/cloud/monitor-alert/notification-rules/create) to check - statuses and send notifications to your notifications endpoints. - -## Manage your monitoring and alerting pipeline - -{{< children >}} +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/checks/create.md b/content/influxdb/cloud/monitor-alert/checks/create.md index ef7541206..31e9362fc 100644 --- a/content/influxdb/cloud/monitor-alert/checks/create.md +++ b/content/influxdb/cloud/monitor-alert/checks/create.md @@ -12,141 +12,4 @@ related: - /influxdb/cloud/monitor-alert/notification-endpoints/ --- -Create a check in the InfluxDB user interface (UI). -Checks query data and apply a status to each point based on specified conditions. - -## Parts of a check -A check consists of two parts – a query and check configuration. - -#### Check query -- Specifies the dataset to monitor. -- May include tags to narrow results. - -#### Check configuration -- Defines check properties, including the check interval and status message. -- Evaluates specified conditions and applies a status (if applicable) to each data point: - - `crit` - - `warn` - - `info` - - `ok` -- Stores status in the `_level` column. - -## Check types -There are two types of checks – a threshold check and a deadman check. - -#### Threshold check -A threshold check assigns a status based on a value being above, below, -inside, or outside of defined thresholds. - -#### Deadman check -A deadman check assigns a status to data when a series or group doesn't report -in a specified amount of time. - -## Create a check in the InfluxDB UI -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Click **{{< icon "plus" >}} Create** and select the [type of check](#check-types) to create. -3. Click **Name this check** in the top left corner and provide a unique name for the check. - -#### Configure the check query -1. Select the **bucket**, **measurement**, **field** and **tag sets** to query. -2. If creating a threshold check, select an **aggregate function**. - Aggregate functions aggregate data between the specified check intervals and - return a single value for the check to process. - - In the **Aggregate functions** column, select an interval from the interval drop-down list - (for example, "Every 5 minutes") and an aggregate function from the list of functions. - -3. Click **Submit** to run the query and preview the results. - To see the raw query results, click the **{{< icon "toggle" >}} View Raw Data** toggle. - -#### Configure the check -1. Click **2. Configure Check** near the top of the window. -2. In the **Properties** column, configure the following: - - ##### Schedule Every - Select the interval to run the check (for example, "Every 5 minutes"). - This interval matches the aggregate function interval for the check query. - _Changing the interval here will update the aggregate function interval._ - - ##### Offset - Delay the execution of a task to account for any late data. - Offset queries do not change the queried time range. - - {{% note %}}Your offset must be shorter than your [check interval](#schedule-every). - {{% /note %}} - - ##### Tags - Add custom tags to the query output. - Each custom tag appends a new column to each row in the query output. - The column label is the tag key and the column value is the tag value. - - Use custom tags to associate additional metadata with the check. - Common metadata tags across different checks lets you easily group and organize checks. - You can also use custom tags in [notification rules](/influxdb/cloud/monitor-alert/notification-rules/create/). - -3. In the **Status Message Template** column, enter the status message template for the check. - Use [Flux string interpolation](/{{< latest "flux" >}}/data-types/basic/string/#interpolate-strings) - to populate the message with data from the query. - - {{% note %}} -#### Flux only interpolates string values -Flux currently interpolates only string values. -Use the [string() function](/influxdb/cloud/reference/flux/stdlib/built-in/transformations/type-conversions/string/) -to convert non-string values to strings. - -```js -count = 12 -"I currently have ${string(v: count)} cats." -``` - {{% /note %}} - - Check data is represented as a record, `r`. - Access specific column values using dot notation: `r.columnName`. - - Use data from the following columns: - - - columns included in the query output - - [custom tags](#tags) added to the query output - - `_check_id` - - `_check_name` - - `_level` - - `_source_measurement` - - `_type` - - ###### Example status message template - ``` - From ${r._check_name}: - ${r._field} is ${r._level}. - Its value is ${string(v: r.field_name)}. - ``` - - When a check generates a status, it stores the message in the `_message` column. - -4. Define check conditions that assign statuses to points. - Condition options depend on your check type. - - ##### Configure a threshold check - 1. In the **Thresholds** column, click the status name (CRIT, WARN, INFO, or OK) - to define conditions for that specific status. - 2. From the **When value** drop-down list, select a threshold: is above, is below, - is inside of, is outside of. - 3. Enter a value or values for the threshold. - You can also use the threshold sliders in the data visualization to define threshold values. - - ##### Configure a deadman check - 1. In the **Deadman** column, enter a duration for the deadman check in the **for** field. - For example, `90s`, `5m`, `2h30m`, etc. - 2. Use the **set status to** drop-down list to select a status to set on a dead series. - 3. In the **And stop checking after** field, enter the time to stop monitoring the series. - For example, `30m`, `2h`, `3h15m`, etc. - -5. Click the green **{{< icon "check" >}}** in the top right corner to save the check. - -## Clone a check -Create a new check by cloning an existing check. - -1. In the **Checks** column, hover over the check you want to clone. -2. Click the **{{< icon "clone" >}}** icon, then **Clone**. +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/checks/delete.md b/content/influxdb/cloud/monitor-alert/checks/delete.md index 4715e1d49..6688b5370 100644 --- a/content/influxdb/cloud/monitor-alert/checks/delete.md +++ b/content/influxdb/cloud/monitor-alert/checks/delete.md @@ -12,23 +12,4 @@ related: - /influxdb/cloud/monitor-alert/notification-endpoints/ --- -If you no longer need a check, use the InfluxDB user interface (UI) to delete it. - -{{% warn %}} -Deleting a check cannot be undone. -{{% /warn %}} - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Hover over the check you want to delete, click the **{{< icon "delete" >}}** - icon, and then **Delete**. - -After a check is deleted, all statuses generated by the check remain in the `_monitoring` -bucket until the retention period for the bucket expires. - -{{% note %}} -You can also [disable a check](/influxdb/cloud/monitor-alert/checks/update/#enable-or-disable-a-check) -without having to delete it. -{{% /note %}} +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/checks/update.md b/content/influxdb/cloud/monitor-alert/checks/update.md index 68f8711a3..ba9f62f30 100644 --- a/content/influxdb/cloud/monitor-alert/checks/update.md +++ b/content/influxdb/cloud/monitor-alert/checks/update.md @@ -12,49 +12,4 @@ related: - /influxdb/cloud/monitor-alert/notification-endpoints/ --- -Update checks in the InfluxDB user interface (UI). -Common updates include: - -- [Update check queries and logic](#update-check-queries-and-logic) -- [Enable or disable a check](#enable-or-disable-a-check) -- [Rename a check](#rename-a-check) -- [Add or update a check description](#add-or-update-a-check-description) -- [Add a label to a check](#add-a-label-to-a-check) - -To update checks, select **Alerts** in the navigation menu on the left. - -{{< nav-icon "alerts" >}} - - -## Update check queries and logic -1. Click the name of the check you want to update. The check builder appears. -2. To edit the check query, click **1. Define Query** at the top of the check builder window. -3. To edit the check logic, click **2. Configure Check** at the top of the check builder window. - -_For details about using the check builder, see [Create checks](/influxdb/cloud/monitor-alert/checks/create/)._ - -## Enable or disable a check -Click the {{< icon "toggle" >}} toggle next to a check to enable or disable it. - -## Rename a check -1. Hover over the name of the check you want to update. -2. Click the **{{< icon "edit" >}}** icon that appears next to the check name. -2. Enter a new name and click out of the name field or press enter to save. - -_You can also rename a check in the [check builder](#update-check-queries-and-logic)._ - -## Add or update a check description -1. Hover over the check description you want to update. -2. Click the **{{< icon "edit" >}}** icon that appears next to the description. -2. Enter a new description and click out of the name field or press enter to save. - -## Add a label to a check -1. Click **Add a label** next to the check you want to add a label to. - The **Add Labels** box opens. -2. To add an existing label, select the label from the list. -3. To create and add a new label: - - In the search field, enter the name of the new label. The **Create Label** box opens. - - In the **Description** field, enter an optional description for the label. - - Select a color for the label. - - Click **Create Label**. -4. To remove a label, hover over the label under to a rule and click **{{< icon "x" >}}**. +{{< duplicate-oss >}} \ No newline at end of file diff --git a/content/influxdb/cloud/monitor-alert/checks/view.md b/content/influxdb/cloud/monitor-alert/checks/view.md index 3ceaac464..cc678a791 100644 --- a/content/influxdb/cloud/monitor-alert/checks/view.md +++ b/content/influxdb/cloud/monitor-alert/checks/view.md @@ -12,32 +12,4 @@ related: - /influxdb/cloud/monitor-alert/notification-endpoints/ --- -View check details and statuses and notifications generated by checks in the InfluxDB user interface (UI). - -- [View a list of all checks](#view-a-list-of-all-checks) -- [View check details](#view-check-details) -- [View statuses generated by a check](#view-statuses-generated-by-a-check) -- [View notifications triggered by a check](#view-notifications-triggered-by-a-check) - -To view checks, click **Alerts** in navigation menu on the left. - -{{< nav-icon "alerts" >}} - -## View a list of all checks -The **Checks** section of the Alerts landing page displays all existing checks. - -## View check details -Click the name of the check you want to view. -The check builder appears. -Here you can view the check query and logic. - -## View statuses generated by a check -1. Hover over the check and click the **{{< icon "view" >}}** icon. -2. Click **View History**. - The Statuses History page displays statuses generated by the selected check. - -## View notifications triggered by a check -1. Hover over the check, click the **{{< icon "view" >}}** - icon, then **View History**. -2. In the top left corner, click **Notifications**. - The Notifications History page displays notifications initiated by the selected check. +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/custom-checks.md b/content/influxdb/cloud/monitor-alert/custom-checks.md index 42acf4e80..1f58ab02d 100644 --- a/content/influxdb/cloud/monitor-alert/custom-checks.md +++ b/content/influxdb/cloud/monitor-alert/custom-checks.md @@ -7,96 +7,7 @@ menu: influxdb_cloud: parent: Monitor & alert weight: 201 -v2.0/tags: [alerts, checks, tasks, Flux] +influxdb/cloud/tags: [alerts, checks, tasks, Flux] --- -In the UI, you can create two kinds of [checks](/influxdb/cloud/reference/glossary/#check): -[`threshold`](/influxdb/cloud/monitor-alert/checks/create/#threshold-check) and -[`deadman`](/influxdb/cloud/monitor-alert/checks/create/#deadman-check). - -Using a Flux task, you can create a custom check that provides a couple advantages: - -- Customize and transform the data you would like to use for the check. -- Set up custom criteria for your alert (other than `threshold` and `deadman`). - -## Create a task - -1. In the InfluxDB UI, select **Tasks** in the navigation menu on the left. - - {{< nav-icon "tasks" >}} - -2. Click **{{< icon "plus" >}} Create Task**, and then select **New Task**. -3. In the **Name** field, enter a descriptive name, - and then enter how often to run the task in the **Every** field (for example, `10m`). - For more detail, such as using cron syntax or including an offset, see [Task configuration options](/influxdb/cloud/process-data/task-options/). -4. Enter the Flux script for your custom check, including the [`monitor.check`](/influxdb/cloud/reference/flux/stdlib/monitor/check/) function. - -{{% note %}} -Use the the API endpoint `/checks/{checkID}/query` to see the Flux code for a check built in the UI. -This can be useful for constructing custom checks. -{{% /note %}} - -### Example: Monitor failed tasks - -The script below is fairly complex, and can be used as a framework for similar tasks. -It does the following: - -- Import the necessary `influxdata/influxdb/monitor` package, and other packages for data processing. -- Query the `_tasks` bucket to retrieve all statuses generated by your check. -- Set the `_level` to alert on, for example, `crit`, `warn`, `info`, or `ok`. -- Create a `check` object that specifies an ID, name, and type for the check. -- Define the `ok` and `crit` statuses. -- Execute the `monitor` function on the `check` using the `task_data`. - -#### Example alert task script - -```js -import "strings" -import "regexp" -import "influxdata/influxdb/monitor" -import "influxdata/influxdb/v1" - -option task = {name: "Failed Tasks Check", every: 1h, offset: 4m} - -task_data = from(bucket: "_tasks") - |> range(start: -task.every) - |> filter(fn: (r) => - (r["_measurement"] == "runs")) - |> filter(fn: (r) => - (r["_field"] == "logs")) - |> map(fn: (r) => ({ r with name: strings.split(v: regexp.findString(r: /option task = \{([^\}]+)/, v: r._value), t: "\\\\\\\"")[1] })) - |> drop(columns: ["_value", "_start", "_stop"]) - |> group(columns: ["name", "taskID", "status", "_measurement"]) - |> map(fn: (r) => - ({r with _value: if r.status == "failed" then 1 else 0})) - |> last() -check = { - _check_id: "0000000000000001", // 16 characters, alphanumeric - _check_name: "Failed Tasks Check", // string - _type: "custom", // can also use "threshold" or "deadman" - tags: {}, -} -ok = (r) => - (r["logs"] == 0) -crit = (r) => - (r["logs"] == 1) -messageFn = (r) => - ("The task: ${r.taskID} - ${r.name} has a status of ${r.status}") - -task_data - |> v1["fieldsAsCols"]() - |> monitor["check"]( - data: check, - messageFn: messageFn, - ok: ok, - crit: crit, - ) -``` - -{{% note %}} -Creating a custom check does not send a notification email. -For information on how to create notification emails, see -[Create notification endpoints](/influxdb/cloud/monitor-alert/notification-endpoints/create), -[Create notification rules](/influxdb/cloud/monitor-alert/notification-rules/create), -and [Send alert email](/influxdb/cloud/monitor-alert/send-email/) -{{% /note %}} +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/notification-endpoints/create.md b/content/influxdb/cloud/monitor-alert/notification-endpoints/create.md index 9f1afe0bc..74e648000 100644 --- a/content/influxdb/cloud/monitor-alert/notification-endpoints/create.md +++ b/content/influxdb/cloud/monitor-alert/notification-endpoints/create.md @@ -12,38 +12,4 @@ related: - /influxdb/cloud/monitor-alert/notification-rules/ --- -To send notifications about changes in your data, start by creating a notification endpoint to a third party service. After creating notification endpoints, [create notification rules](/influxdb/cloud/monitor-alert/notification-rules/create) to send alerts to third party services on [check statuses](/influxdb/cloud/monitor-alert/checks/create). - -## Create a notification endpoint in the UI - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Endpoints** near to top of the page. -3. Click **{{< icon "plus" >}} Create**. -4. From the **Destination** drop-down list, select a destination endpoint to send notifications. - The following endpoints are available for the InfluxDB Cloud Free Plan and Usage-based Plan: - - | Endpoint | Free Plan | Usage-based Plan | - |:-------- |:-------------------: |:----------------------------:| - | **Slack** | **{{< icon "check" >}}** | **{{< icon "check" >}}** | - | **PagerDuty** | | **{{< icon "check" >}}** | - | **HTTP** | | **{{< icon "check" >}}** | - -5. In the **Name** and **Description** fields, enter a name and description for the endpoint. -6. Enter enter information to connect to the endpoint: - - - For HTTP, enter the **URL** to send the notification. Select the **auth method** to use: **None** for no authentication. To authenticate with a username and password, select **Basic** and then enter credentials in the **Username** and **Password** fields. To authenticate with a token, select **Bearer**, and then enter the API token in the **Token** field. - - - For Slack, create an [Incoming WebHook](https://api.slack.com/incoming-webhooks#posting_with_webhooks) in Slack, and then enter your webHook URL in the **Slack Incoming WebHook URL** field. - - - For PagerDuty: - - [Create a new service](https://support.pagerduty.com/docs/services-and-integrations#section-create-a-new-service), [add an Events API V2 integration for your service](https://support.pagerduty.com/docs/services-and-integrations#section-add-integrations-to-an-existing-service), and then enter the PagerDuty integration key for your new service in the **Routing Key** field. - - The **Client URL** provides a useful link in your PagerDuty notification. Enter any URL that you'd like to use to investigate issues. This URL is sent as the `client_url` property in the PagerDuty trigger event. By default, the **Client URL** is set to your Monitoring & Alerting History page, and the following included in the PagerDuty trigger event: - - ```json - "client_url": "https://cloud2.influxdata.com/orgs//alert-history" - ``` - -6. Click **Create Notification Endpoint**. +{{< duplicate-oss >}} \ No newline at end of file diff --git a/content/influxdb/cloud/monitor-alert/notification-endpoints/delete.md b/content/influxdb/cloud/monitor-alert/notification-endpoints/delete.md index 1b9ca92aa..ad16d9cc7 100644 --- a/content/influxdb/cloud/monitor-alert/notification-endpoints/delete.md +++ b/content/influxdb/cloud/monitor-alert/notification-endpoints/delete.md @@ -12,15 +12,4 @@ related: - /influxdb/cloud/monitor-alert/notification-rules/ --- -If notifications are no longer sent to an endpoint, complete the steps below to delete the endpoint, and then [update notification rules](/influxdb/cloud/monitor-alert/notification-rules/update) with a new notification endpoint as needed. - -## Delete a notification endpoint in the UI - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Endpoints** near to top of the page. - find the rule you want to delete. -3. Hover over the endpoint you want to delete and click the **{{< icon "trash" >}}** icon. -4. Click **Delete** to confirm. +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/notification-endpoints/update.md b/content/influxdb/cloud/monitor-alert/notification-endpoints/update.md index 71b562507..4cbef2187 100644 --- a/content/influxdb/cloud/monitor-alert/notification-endpoints/update.md +++ b/content/influxdb/cloud/monitor-alert/notification-endpoints/update.md @@ -12,55 +12,4 @@ related: - /influxdb/cloud/monitor-alert/notification-rules/ --- -To update the notification endpoint details, complete the procedures below as needed. To update the notification endpoint selected for a notification rule, see [update notification rules](/influxdb/cloud/monitor-alert/notification-rules/update/). - -## Add a label to notification endpoint - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Endpoints** near to top of the page. -3. Click **{{< icon "add-label" >}} Add a label** next to the endpoint you want to add a label to. - The **Add Labels** box opens. -4. To add an existing label, select the label from the list. -5. To create and add a new label: - - - In the search field, enter the name of the new label. The **Create Label** box opens. - - In the **Description** field, enter an optional description for the label. - - Select a color for the label. - - Click **Create Label**. - -6. To remove a label, hover over the label under an endpoint and click X. - - -## Disable notification endpoint - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Endpoints** near to top of the page. -3. Click the {{< icon "toggle" >}} toggle to disable the notification endpoint. - -## Update the name or description for notification endpoint - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Endpoints** near to top of the page. -3. Hover over the name or description of the endpoint and click the pencil icon - (**{{< icon "edit" >}}**) to edit the field. -4. Click outside of the field to save your changes. - -## Change endpoint details - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Endpoints** near to top of the page. -3. Click the endpoint to update. -4. Update details as needed, and then click **Edit Notification Endpoint**. - For details about each field, see [Create notification endpoints](/influxdb/cloud/monitor-alert/notification-endpoints/create/). +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/notification-endpoints/view.md b/content/influxdb/cloud/monitor-alert/notification-endpoints/view.md index 9196bbeed..dea960bc8 100644 --- a/content/influxdb/cloud/monitor-alert/notification-endpoints/view.md +++ b/content/influxdb/cloud/monitor-alert/notification-endpoints/view.md @@ -13,39 +13,4 @@ related: - /influxdb/cloud/monitor-alert/notification-rules/ --- -View notification endpoint details and history in the InfluxDB user interface (UI). - -- [View notification endpoints](#view-notification-endpoints) -- [View notification endpoint details](#view-notification-endpoint-details) -- [View history notification endpoint history](#view-notification-endpoint-history), including statues and notifications sent to the endpoint - -## View notification endpoints - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Endpoints** near to top of the page. - -## View notification endpoint details - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Endpoints** near to top of the page. -3. Click the name of the notification endpoint you want to view. -4. View the notification endpoint destination, name, and information to connect to the endpoint. - -## View notification endpoint history - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Endpoints** near to top of the page. -3. Hover over the notification endpoint, click the **{{< icon "view" >}}** icon, then **View History**. - The Check Statuses History page displays: - - - Statuses generated for the selected notification endpoint - - Notifications sent to the selected notification endpoint +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/notification-rules/create.md b/content/influxdb/cloud/monitor-alert/notification-rules/create.md index bc3fd7ead..f1323057d 100644 --- a/content/influxdb/cloud/monitor-alert/notification-rules/create.md +++ b/content/influxdb/cloud/monitor-alert/notification-rules/create.md @@ -11,34 +11,4 @@ related: - /influxdb/cloud/monitor-alert/notification-endpoints/ --- -Once you've set up checks and notification endpoints, create notification rules to alert you. -_For details, see [Manage checks](/influxdb/cloud/monitor-alert/checks/) and -[Manage notification endpoints](/influxdb/cloud/monitor-alert/notification-endpoints/)._ - -## Create a new notification rule in the UI - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Rules** near to top of the page. -3. Click **{{< icon "plus" >}} Create**. -4. Complete the **About** section: - 1. In the **Name** field, enter a name for the notification rule. - 2. In the **Schedule Every** field, enter how frequently the rule should run. - 3. In the **Offset** field, enter an offset time. For example, if a task runs on the hour, a 10m offset delays the task to 10 minutes after the hour. Time ranges defined in the task are relative to the specified execution time. -5. In the **Conditions** section, build a condition using a combination of status and tag keys. - - Next to **When status is equal to**, select a status from the drop-down field. - - Next to **AND When**, enter one or more tag key-value pairs to filter by. -6. In the **Message** section, select an endpoint to notify. -7. Click **Create Notification Rule**. - -## Clone an existing notification rule in the UI - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Rules** near to top of the page. -3. Hover over the rule you want to clone and click the **{{< icon "clone" >}}** icon and select **Clone**. - The cloned rule appears. +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/notification-rules/delete.md b/content/influxdb/cloud/monitor-alert/notification-rules/delete.md index 163b137f1..e44e5ae58 100644 --- a/content/influxdb/cloud/monitor-alert/notification-rules/delete.md +++ b/content/influxdb/cloud/monitor-alert/notification-rules/delete.md @@ -11,12 +11,4 @@ related: - /influxdb/cloud/monitor-alert/notification-endpoints/ --- -## Delete a notification rule in the UI - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Rules** near to top of the page. -3. Hover over the rule you want to delete and click the **{{< icon "trash" >}}** icon. -4. Click **Delete** to confirm. +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/notification-rules/update.md b/content/influxdb/cloud/monitor-alert/notification-rules/update.md index da322963b..057091adf 100644 --- a/content/influxdb/cloud/monitor-alert/notification-rules/update.md +++ b/content/influxdb/cloud/monitor-alert/notification-rules/update.md @@ -11,40 +11,4 @@ related: - /influxdb/cloud/monitor-alert/notification-endpoints/ --- -## Add a label to notification rules - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Rules** near to top of the page. -3. Click **{{< icon "add-label" >}} Add a label** next to the rule you want to add a label to. - The **Add Labels** box opens. -4. To add an existing label, select the label from the list. -5. To create and add a new label: - - In the search field, enter the name of the new label. The **Create Label** box opens. - - In the **Description** field, enter an optional description for the label. - - Select a color for the label. - - Click **Create Label**. -6. To remove a label, hover over the label under to a rule and click **{{< icon "x" >}}**. - - -## Disable notification rules - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Rules** near to top of the page. -3. Click the {{< icon "toggle" >}} toggle to disable the notification rule. - -## Update the name or description for notification rules - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Rules** near to top of the page. -3. Hover over the name or description of a rule and click the pencil icon - (**{{< icon "edit" >}}**) to edit the field. -4. Click outside of the field to save your changes. +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/notification-rules/view.md b/content/influxdb/cloud/monitor-alert/notification-rules/view.md index 0dcea29ce..cea864f3d 100644 --- a/content/influxdb/cloud/monitor-alert/notification-rules/view.md +++ b/content/influxdb/cloud/monitor-alert/notification-rules/view.md @@ -11,35 +11,4 @@ related: - /influxdb/cloud/monitor-alert/notification-endpoints/ --- -View notification rule details and statuses and notifications generated by notification rules in the InfluxDB user interface (UI). - -- [View a list of all notification rules](#view-a-list-of-all-notification-rules) -- [View notification rule details](#view-notification-rule-details) -- [View statuses generated by a check](#view-statuses-generated-by-a-notification-rule) -- [View notifications triggered by a notification rule](#view-notifications-triggered-by-a-notification-rule) - -**To view notification rules:** - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Rules** near to top of the page. - -## View a list of all notification rules -The **Notification Rules** section of the Alerts landing page displays all existing checks. - -## View notification rule details -Click the name of the check you want to view. -The check builder appears. -Here you can view the check query and logic. - -## View statuses generated by a notification rule -Hover over the check, click the **{{< icon "view" >}}** icon, and then **View History**. -The Statuses History page displays statuses generated by the selected check. - -## View notifications triggered by a notification rule -1. Hover over the notification rule, click the **{{< icon "view" >}}** - icon, and then **View History**. -2. In the top left corner, click **Notifications**. - The Notifications History page displays notifications initiated by the selected notification rule. +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/templates/infrastructure/aws.md b/content/influxdb/cloud/monitor-alert/templates/infrastructure/aws.md index 840faf69c..5e68fda54 100644 --- a/content/influxdb/cloud/monitor-alert/templates/infrastructure/aws.md +++ b/content/influxdb/cloud/monitor-alert/templates/infrastructure/aws.md @@ -9,49 +9,4 @@ menu: weight: 201 --- -Use the [AWS CloudWatch Monitoring template](https://github.com/influxdata/community-templates/tree/master/aws_cloudwatch) to monitor data from [Amazon Web Services (AWS)](https://aws.amazon.com/), [Amazon Elastic Compute Cloud (EC2)](https://aws.amazon.com/ec2/), and [Amazon Elastic Load Balancing (ELB)](https://aws.amazon.com/elasticloadbalancing/) with the [AWS CloudWatch Service](https://aws.amazon.com/cloudwatch/). - -The AWS CloudWatch Monitoring template includes the following: - -- two [dashboards](/influxdb/cloud/reference/glossary/#dashboard): - - **AWS CloudWatch NLB (Network Load Balancers) Monitoring**: Displays data from the `cloudwatch_aws_network_elb measurement` - - **AWS CloudWatch Instance Monitoring**: Displays data from the `cloudwatch_aws_ec2` measurement -- two [buckets](/influxdb/cloud/reference/glossary/#bucket): `kubernetes` and `cloudwatch` -- two labels: `inputs.cloudwatch`, `AWS` -- one variable: `v.bucket` -- one [Telegraf configuration](/influxdb/cloud/telegraf-configs/): [AWS CloudWatch input plugin](/{{< latest "telegraf" >}}/plugins//#cloudwatch) - -## Apply the template - -1. Use the [`influx` CLI](/influxdb/cloud/reference/cli/influx/) to run the following command: - - ```sh - influx apply -f https://raw.githubusercontent.com/influxdata/community-templates/master/aws_cloudwatch/aws_cloudwatch.yml - ``` - For more information, see [influx apply](/influxdb/cloud/reference/cli/influx/apply/). -2. [Install Telegraf](/{{< latest "telegraf" >}}/introduction/installation/) on a server with network access to both the CloudWatch API and [InfluxDB v2 API](/influxdb/cloud/reference/api/). -3. In your Telegraf configuration file (`telegraf.conf`), find the following example `influxdb_v2` output plugins, and then **replace** the `urls` to specify the servers to monitor: - - ```sh - ## k8s - [[outputs.influxdb_v2]] - urls = ["http://influxdb.monitoring:9999"] - organization = "InfluxData" - bucket = "kubernetes" - token = "secret-token" - - ## cloudv2 sample - [[outputs.influxdb_v2]] - urls = ["$INFLUX_HOST"] - token = "$INFLUX_TOKEN" - organization = "$INFLUX_ORG" - bucket = “cloudwatch" - ``` -4. [Start Telegraf](/influxdb/cloud/write-data/no-code/use-telegraf/auto-config/#start-telegraf). - -## View the incoming data - -1. In the InfluxDB user interface (UI), select **Boards** (**Dashboards**). - - {{< nav-icon "dashboards" >}} -2. Open your AWS dashboards, and then set the `v.bucket` variable to specify the bucket to query data from (`kubernetes` or `cloudwatch`). +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/templates/infrastructure/docker.md b/content/influxdb/cloud/monitor-alert/templates/infrastructure/docker.md index 98be54b9f..a95abacfe 100644 --- a/content/influxdb/cloud/monitor-alert/templates/infrastructure/docker.md +++ b/content/influxdb/cloud/monitor-alert/templates/infrastructure/docker.md @@ -9,46 +9,4 @@ menu: weight: 202 --- -Use the [Docker Monitoring template](https://github.com/influxdata/community-templates/tree/master/docker) to monitor your Docker containers. First, [apply the template](#apply-the-template), and then [view incoming data](#view-incoming-data). -This template uses the [Docker input plugin](/{{< latest "telegraf" >}}/plugins//#docker) to collect metrics stored in InfluxDB and display these metrics in a dashboard. - -The Docker Monitoring template includes the following: - -- one [dashboard](/influxdb/cloud/reference/glossary/#dashboard): **Docker** -- one [bucket](/influxdb/cloud/reference/glossary/#bucket): `docker, 7d retention` -- labels: Docker input plugin labels -- one [Telegraf configuration](/influxdb/cloud/telegraf-configs/): Docker input plugin -- one variable: `bucket` -- four [checks](/influxdb/cloud/reference/glossary/#check): `Container cpu`, `mem`, `disk`, `non-zero exit` -- one [notification endpoint](/influxdb/cloud/reference/glossary/#notification-endpoint): `Http Post` -- one [notification rule](/influxdb/cloud/reference/glossary/#notification-rule): `Crit Alert` - -For more information about how checks, notification endpoints, and notifications rules work together, see [monitor data and send alerts](/influxdb/cloud/monitor-alert/). - -## Apply the template - -1. Use the [`influx` CLI](/influxdb/cloud/reference/cli/influx/) to run the following command: - - ```sh - influx apply -f https://raw.githubusercontent.com/influxdata/community-templates/master/docker/docker.yml - ``` - For more information, see [influx apply](/influxdb/cloud/reference/cli/influx/apply/). - - > **Note:** Ensure your `influx` CLI is configured with your account credentials and that configuration is active. For more information, see [influx config](/influxdb/cloud/reference/cli/influx/config/). - -2. [Install Telegraf](/{{< latest "telegraf" >}}/introduction/installation/) on a server with network access to both the Docker containers and [InfluxDB v2 API](/influxdb/cloud/reference/api/). -3. In your [Telegraf configuration file (`telegraf.conf`)](/influxdb/cloud/telegraf-configs/), do the following: - - Depending on how you run Docker, you may need to customize the [Docker input plugin](/{{< latest "telegraf" >}}/plugins//#docker) configuration, for example, you may need to specify the `endpoint` value. - - Set the following environment variables: - - INFLUX_TOKEN: Token must have permissions to read Telegraf configurations and write data to the `telegraf` bucket. See how to [view tokens](/influxdb/cloud/security/tokens/view-tokens/). - - INFLUX_ORG: Name of your organization. See how to [view your organization](/influxdb/cloud/organizations/view-orgs/). - - INFLUX_HOST: Your InfluxDB host URL, for example, localhost, a remote instance, or InfluxDB Cloud. - -4. [Start Telegraf](/influxdb/cloud/write-data/no-code/use-telegraf/auto-config/#start-telegraf). - -## View incoming data - -1. In the InfluxDB user interface (UI), select **Boards** (**Dashboards**). - - {{< nav-icon "dashboards" >}} -2. Open the **Docker** dashboard to start monitoring. +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/templates/infrastructure/raspberry-pi.md b/content/influxdb/cloud/monitor-alert/templates/infrastructure/raspberry-pi.md index 2e2942cbd..dfb9495db 100644 --- a/content/influxdb/cloud/monitor-alert/templates/infrastructure/raspberry-pi.md +++ b/content/influxdb/cloud/monitor-alert/templates/infrastructure/raspberry-pi.md @@ -9,48 +9,4 @@ menu: weight: 201 --- -Use the [Raspberry Pi Monitoring template](https://github.com/influxdata/community-templates/tree/master/raspberry-pi) to monitor your Raspberry Pi 4 or 400 Linux system. - -The Raspberry Pi template includes the following: - -- one [bucket](/influxdb/cloud/reference/glossary/#bucket): `rasp-pi` (7d retention) -- labels: `raspberry-pi` + Telegraf plugin labels - - [Diskio input plugin](/{{< latest "telegraf" >}}/plugins//#diskio) - - [Mem input plugin](/{{< latest "telegraf" >}}/plugins//#mem) - - [Net input plugin](/{{< latest "telegraf" >}}/plugins//#net) - - [Processes input plugin](/{{< latest "telegraf" >}}/plugins//#processes) - - [Swap input plugin](/{{< latest "telegraf" >}}/plugins//#swap) - - [System input plugin](/{{< latest "telegraf" >}}/plugins//#system) -- one [Telegraf configuration](/influxdb/cloud/telegraf-configs/) -- one [dashboard](/influxdb/cloud/reference/glossary/#dashboard): Raspberry Pi System -- two variables: `bucket` and `linux_host` - -## Apply the template - -1. Use the [`influx` CLI](/influxdb/cloud/reference/cli/influx/) to run the following command: - - ```sh - influx apply -f https://raw.githubusercontent.com/influxdata/community-templates/master/raspberry-pi/raspberry-pi-system.yml - ``` - For more information, see [influx apply](/influxdb/cloud/reference/cli/influx/apply/). -2. [Install Telegraf](/{{< latest "telegraf" >}}/introduction/installation/) on your Raspberry Pi and ensure your Raspberry Pi has network access to the [InfluxDB Cloud API](/influxdb/cloud/reference/api/). -3. Add the following environment variables to your Telegraf environment: - - - `INFLUX_HOST`: Your [InfluxDB Cloud region URL](/influxdb/cloud/reference/regions/) - - `INFLUX_TOKEN`: Your InfluxDB Cloud [API token](/influxdb/cloud/security/tokens/) - - `INFLUX_ORG`: Your InfluxDB Cloud organization name. - - ```sh - export INFLUX_HOST=https://cloud2.influxdata.com - export INFLUX_TOKEN=mY5uP3rS3cr3T70keN - export INFLUX_ORG=example-org - ``` - -4. [Start Telegraf](/influxdb/cloud/write-data/no-code/use-telegraf/auto-config/#start-telegraf). - -## View the incoming data - -1. In the InfluxDB user interface (UI), select **Boards** (**Dashboards**). - - {{< nav-icon "dashboards" >}} -2. Click the Raspberry Pi System link to open your dashboard, then select `rasp-pi` as your bucket and select your linux_host. +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/templates/infrastructure/vshpere.md b/content/influxdb/cloud/monitor-alert/templates/infrastructure/vshpere.md index 8b00022fd..6f41de317 100644 --- a/content/influxdb/cloud/monitor-alert/templates/infrastructure/vshpere.md +++ b/content/influxdb/cloud/monitor-alert/templates/infrastructure/vshpere.md @@ -9,47 +9,4 @@ menu: weight: 206 --- -Use the [vSphere Dashboard for InfluxDB v2 template](https://github.com/influxdata/community-templates/tree/master/vsphere) to monitor your vSphere host. First, [apply the template](#apply-the-template), and then [view incoming data](#view-incoming-data). -This template uses the [Docker input plugin](/{{< latest "telegraf" >}}/plugins//#docker) to collect metrics stored in InfluxDB and display these metrics in a dashboard. - -The Docker Monitoring template includes the following: - -- one [dashboard](/influxdb/cloud/reference/glossary/#dashboard): **vsphere** -- one [bucket](/influxdb/cloud/reference/glossary/#bucket): `vsphere` -- label: vsphere -- one [Telegraf configuration](/influxdb/cloud/telegraf-configs/): InfluxDB v2 output plugin, vSphere input plugin -- one variable: `bucket` - -## Apply the template - -1. Use the [`influx` CLI](/influxdb/cloud/reference/cli/influx/) to run the following command: - - ```sh - influx apply -f https://raw.githubusercontent.com/influxdata/community-templates/master/vsphere/vsphere.yml - ``` - For more information, see [influx apply](/influxdb/cloud/reference/cli/influx/apply/). - - > **Note:** Ensure your `influx` CLI is configured with your account credentials and that configuration is active. For more information, see [influx config](/influxdb/cloud/reference/cli/influx/config/). - -2. [Install Telegraf](/{{< latest "telegraf" >}}/introduction/installation/) on a server with network access to both the vSphere host and [InfluxDB v2 API](/influxdb/cloud/reference/api/). -3. In your [Telegraf configuration file (`telegraf.conf`)](/influxdb/cloud/telegraf-configs/), do the following: - - Set the following environment variables: - - INFLUX_TOKEN: Token must have permissions to read Telegraf configurations and write data to the `telegraf` bucket. See how to [view tokens](/influxdb/cloud/security/tokens/view-tokens/). - - INFLUX_ORG: Name of your organization. See how to [view your organization](/influxdb/cloud/organizations/view-orgs/). - - INFLUX_HOST: Your InfluxDB host URL, for example, localhost, a remote instance, or InfluxDB Cloud. - - INFLUX_BUCKET: Bucket to store data in. To use the bucket included, you must export the variable: `export INFLUX_BUCKET=vsphere` -4. - Set the host address to the vSphere and provide the `username` and `password` as variables: - ```sh - vcenters = [ "https://$VSPHERE_HOST/sdk" ] - username = "$vsphere-user" - password = "$vsphere-password" - ``` - -4. [Start Telegraf](/influxdb/cloud/write-data/no-code/use-telegraf/auto-config/#start-telegraf). - -## View incoming data - -1. In the InfluxDB user interface (UI), select **Boards** (**Dashboards**). - - {{< nav-icon "dashboards" >}} -2. Open the **vsphere** dashboard to start monitoring. +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/templates/infrastructure/windows.md b/content/influxdb/cloud/monitor-alert/templates/infrastructure/windows.md index 457e57101..6a7251322 100644 --- a/content/influxdb/cloud/monitor-alert/templates/infrastructure/windows.md +++ b/content/influxdb/cloud/monitor-alert/templates/infrastructure/windows.md @@ -9,44 +9,4 @@ menu: weight: 207 --- -Use the [Windows System Monitoring template](https://github.com/influxdata/community-templates/tree/master/windows_system) to monitor your Windows system. First, [apply the template](#apply-the-template), and then [view incoming data](#view-incoming-data). - -The Windows System Monitoring template includes the following: - -- one [dashboard](/influxdb/cloud/reference/glossary/#dashboard): **Windows System** -- one [bucket](/influxdb/cloud/reference/glossary/#bucket): `telegraf`, 7d retention -- label: `Windows System Template`, Telegraf plugin labels: `outputs.influxdb_v2` -- one [Telegraf configuration](/influxdb/cloud/telegraf-configs/): InfluxDB v2 output plugin, Windows Performance Counters input plugin -- two variables: `bucket`, `windows_host` - -## Apply the template - -1. Use the [`influx` CLI](/influxdb/cloud/reference/cli/influx/) to run the following command: - - ```sh - influx apply -f https://raw.githubusercontent.com/influxdata/community-templates/master/windows_system/windows_system.yml - ``` - For more information, see [influx apply](/influxdb/cloud/reference/cli/influx/apply/). - - > **Note:** Ensure your `influx` CLI is configured with your account credentials and that configuration is active. For more information, see [influx config](/influxdb/cloud/reference/cli/influx/config/). - -2. [Install Telegraf](/{{< latest "telegraf" >}}/introduction/installation/) on a server with network access to both the Windows system and [InfluxDB v2 API](/influxdb/cloud/reference/api/). -3. In your [Telegraf configuration file (`telegraf.conf`)](/influxdb/cloud/telegraf-configs/), do the following: - - Set the following environment variables: - - INFLUX_TOKEN: Token must have permissions to read Telegraf configurations and write data to the `telegraf` bucket. See how to [view tokens](/influxdb/cloud/security/tokens/view-tokens/). - - INFLUX_ORG: Name of your organization. See how to [view your organization](/influxdb/cloud/organizations/view-orgs/). - - INFLUX_URL: Your InfluxDB host URL, for example, localhost, a remote instance, or InfluxDB Cloud. - -4. [Start Telegraf](/influxdb/cloud/write-data/no-code/use-telegraf/auto-config/#start-telegraf). -5. To monitor multiple Windows systems, repeat steps 1-4 for each system. - -## View incoming data - -1. In the InfluxDB user interface (UI), select **Boards** (**Dashboards**). - - {{< nav-icon "dashboards" >}} -2. Open the **Windows System** dashboard to start monitoring. - - {{% note %}} - If you're monitoring multiple Windows machines, switch between them using the `windows_host` filter at the top of the dashboard. - {{% /note %}} +{{< duplicate-oss >}} diff --git a/content/influxdb/cloud/monitor-alert/templates/networks/haproxy.md b/content/influxdb/cloud/monitor-alert/templates/networks/haproxy.md index afed4dd08..d58675ca7 100644 --- a/content/influxdb/cloud/monitor-alert/templates/networks/haproxy.md +++ b/content/influxdb/cloud/monitor-alert/templates/networks/haproxy.md @@ -9,40 +9,4 @@ menu: weight: 201 --- -Use the [HAProxy for InfluxDB v2 template](https://github.com/influxdata/community-templates/tree/master/haproxy) to monitor your HAProxy instances. First, [apply the template](#apply-the-template), and then [view incoming data](#view-incoming-data). -This template uses the [HAProxy input plugin](/{{< latest "telegraf" >}}/plugins//#haproxy) to collect metrics stored in an HAProxy instance and display these metrics in a dashboard. - -The HAProxy for InfluxDB v2 template includes the following: - -- one [dashboard](/influxdb/cloud/reference/glossary/#dashboard): **HAProxy** -- one [bucket](/influxdb/cloud/reference/glossary/#bucket): `haproxy` -- label: `haproxy` -- one [Telegraf configuration](/influxdb/cloud/telegraf-configs/): HAProxy input plugin, InfluxDB v2 output plugin -- one variable: `bucket` - -## Apply the template - -1. Use the [`influx` CLI](/influxdb/cloud/reference/cli/influx/) to run the following command: - - ```sh - influx apply -f https://raw.githubusercontent.com/influxdata/community-templates/master/haproxy/haproxy.yml - ``` - For more information, see [influx apply](/influxdb/cloud/reference/cli/influx/apply/). - - > **Note:** Ensure your `influx` CLI is configured with your account credentials and that configuration is active. For more information, see [influx config](/influxdb/cloud/reference/cli/influx/config/). - -2. [Install Telegraf](/{{< latest "telegraf" >}}/introduction/installation/) on a server with network access to both the HAProxy instances and [InfluxDB v2 API](/influxdb/cloud/reference/api/). -3. In your [Telegraf configuration file (`telegraf.conf`)](/influxdb/cloud/telegraf-configs/), do the following: - - Set the following environment variables: - - INFLUX_TOKEN: Token must have permissions to read Telegraf configurations and write data to the `haproxy` bucket. See how to [view tokens](/influxdb/cloud/security/tokens/view-tokens/). - - INFLUX_ORG: Name of your organization. See how to [view your organization](/influxdb/cloud/organizations/view-orgs/). - - INFLUX_HOST: Your InfluxDB host URL, for example, localhost, a remote instance, or InfluxDB Cloud. - -4. [Start Telegraf](/influxdb/cloud/write-data/no-code/use-telegraf/auto-config/#start-telegraf). - -## View incoming data - -1. In the InfluxDB user interface (UI), select **Boards** (**Dashboards**). - - {{< nav-icon "dashboards" >}} -2. Open the **HAProxy** dashboard to start monitoring. +{{< duplicate-oss >}} diff --git a/content/influxdb/v2.1/influxdb-templates/monitor.md b/content/influxdb/v2.1/influxdb-templates/monitor.md deleted file mode 100644 index e1fff69d1..000000000 --- a/content/influxdb/v2.1/influxdb-templates/monitor.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -title: Monitor InfluxDB OSS using a template -description: > - Monitor your InfluxDB OSS instance using InfluxDB Cloud and - a pre-built InfluxDB template. -menu: - influxdb_2_1: - parent: Monitor with templates - name: Monitor InfluxDB OSS -weight: 102 -influxdb/v2.1/tags: [templates, monitor] -related: - - /influxdb/v2.1/reference/cli/influx/apply/ - - /influxdb/v2.1/reference/cli/influx/template/ ---- - -Use [InfluxDB Cloud](/influxdb/cloud/), the [InfluxDB Open Source (OSS) Metrics template](https://github.com/influxdata/community-templates/tree/master/influxdb2_oss_metrics), and Telegraf to monitor one or more InfluxDB OSS instances. - -Do the following: - -1. [Review requirements](#review-requirements) -2. [Install the InfluxDB OSS Monitoring template](#install-the-influxdb-oss-monitoring-template) -3. [Set up InfluxDB OSS for monitoring](#set-up-influxdb-oss-for-monitoring) -4. [Set up Telegraf](#set-up-telegraf) -5. [View the Monitoring dashboard](#view-the-monitoring-dashboard) -6. (Optional) [Alert when metrics stop reporting](#alert-when-metrics-stop-reporting) -7. (Optional) [Create a notification endpoint and rule](#create-a-notification-endpoint-and-rule) - -## Review requirements - -Before you begin, make sure you have access to the following: - - - InfluxDB Cloud account ([sign up for free here](https://cloud2.influxdata.com/signup)) - - Command line access to a machine [running InfluxDB OSS 2.x](/influxdb/v2.1/install/) and permissions to install Telegraf on this machine - - Internet connectivity from the machine running InfluxDB OSS 2.x and Telegraf to InfluxDB Cloud - - Sufficient resource availability to install the template. InfluxDB Cloud Free Plan accounts include [resource limits](/influxdb/cloud/account-management/pricing-plans/#resource-limits/influxdb/cloud/account-management/pricing-plans/#resource-limits) - -## Install the InfluxDB OSS Monitoring template - -The InfluxDB OSS Monitoring template includes a Telegraf configuration that sends InfluxDB OSS metrics to an InfluxDB endpoint and a dashboard that visualizes the metrics. - -1. [Log into your InfluxDB Cloud account](https://cloud2.influxdata.com/), go to **Settings > Templates**, and enter the following template URL: - - ``` - https://raw.githubusercontent.com/influxdata/community-templates/master/influxdb2_oss_metrics/influxdb2_oss_metrics.yml - ``` - -2. Click **Lookup Template**, and then click **Install Template**. InfluxDB Cloud imports the template, which includes the following resources: - - Dashboard `InfluxDB OSS Metrics` - - Telegraf configuration `scrape-influxdb-oss-telegraf` - - Bucket `oss_metrics` - - Check `InfluxDB OSS Deadman` - - Labels `influxdb2` and `prometheus` - -## Set up InfluxDB OSS for monitoring - -By default, InfluxDB OSS 2.x has a `/metrics` endpoint available, which exports Prometheus-style system metrics. - -1. Make sure the `/metrics` endpoint is [enabled](/{{< latest "influxdb" >}}/reference/config-options/#metrics-disabled). If you've changed the default settings to disable the `/metrics` endpoint, [re-enable these settings](/{{< latest "influxdb" >}}/reference/config-options/#metrics-disabled). -2. Navigate to the `/metrics` endpoint of your InfluxDB OSS instance to view the InfluxDB OSS system metrics in your browser: - - ``` - http://localhost:8086/metrics - ``` - - Or use `curl` to fetch metrics: - - ```sh - curl http://localhost:8086/metrics - # HELP boltdb_reads_total Total number of boltdb reads - # TYPE boltdb_reads_total counter - boltdb_reads_total 41 - # HELP boltdb_writes_total Total number of boltdb writes - # TYPE boltdb_writes_total counter - boltdb_writes_total 28 - # HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles. - ... - ``` -3. Verify the [Telegraf](/{{< latest "telegraf" >}}/) agent has network access to the `/metrics` endpoint for each monitored InfluxDB OSS instance. - -4. Add your **InfluxDB Cloud** account information (URL and organization) to your Telegraf configuration by doing the following: - 1. Go to **Load Data > Telegraf** [in your InfluxDB Cloud account](https://cloud2.influxdata.com/), and click **InfluxDB Output Plugin**. - 2. Copy the URL, token, organization, and bucket, close the window, and then click **Scrape InfluxDB OSS Metrics**. - 3. Replace `URL`, `token', `organization`, and `bucket` under `outputs.influxdb_v2` with your InfluxDB Cloud account information. Alternatively, store this information in your environment variables and include the environment variables in your configuration. - - {{% note %}} -To ensure the InfluxDB OSS monitoring dashboard can display the recorded metrics, set the destination bucket name to `oss_metrics` in your `telegraf.conf`. - {{% /note %}} - - 4. Add the [Prometheus input plugin](https://github.com/influxdata/telegraf/blob/release-1.19/plugins/inputs/prometheus/README.md) to your `telegraf.conf`. Specify your your InfluxDB OSS URL(s) in the `urls` parameter. For example: - - {{< keep-url >}} - ```toml - [[inputs.prometheus]] - urls = ["http://localhost:8086/metrics"] - ``` - - If you're using unique URLs or have security set up for your `/metrics` endpoint, configure those options here and save the updated configuration. - - For more information about customizing Telegraf, see [Configure Telegraf](/{{< latest "telegraf" >}}/administration/configuration/#global-tags). -5. Click **Save Changes**. - -## Set up Telegraf - -Set up Telegraf to scrape metrics from InfluxDB OSS to send to your InfluxDB Cloud account. - -On each InfluxDB OSS instance you want to monitor, do the following: - -1. Go to **Load Data > Telegraf** [in your InfluxDB Cloud account](https://cloud2.influxdata.com/). -2. Click **Setup Instructions** under **Scrape InfluxDB OSS Metrics**. -3. Complete the Telegraf Setup instructions. - - {{% note %}} -For your API token, generate a new token or use an existing All Access token. If you run Telegraf as a service, edit your init script to set the environment variable and ensure its available to the service. - {{% /note %}} - -Telegraf runs quietly in the background (no immediate output appears), and Telegraf begins pushing metrics to your InfluxDB Cloud account. - -## View the Monitoring dashboard - -To see your data in real time, view the Monitoring dashboard. - -1. Select **Boards** (**Dashboards**) in your **InfluxDB Cloud** account. - - {{< nav-icon "dashboards" >}} - -2. Click **InfluxDB OSS Metrics**. Metrics appear in your dashboard. -3. Customize your monitoring dashboard as needed. For example, send an alert in the following cases: - - Users create a new task or bucket - - You're testing machine limits - - [Metrics stop reporting](#alert-when-metrics-stop-reporting) - -## Alert when metrics stop reporting - -The Monitoring template includes a [deadman check](/influxdb/cloud/monitor-alert/checks/create/#deadman-check) to verify metrics are reported at regular intervals. - -To alert when data stops flowing from InfluxDB OSS instances to your InfluxDB Cloud account, do the following: - -1. [Customize the deadman check](#customize-the-deadman-check) to identify the fields you want to monitor. -2. [Create a notification endpoint and rule](#create-a-notification-endpoint-and-rule) to receive notifications when your deadman check is triggered. - -### Customize the deadman check - -1. To view the deadman check, click **Alerts** in the navigation bar of your **InfluxDB Cloud** account. - - {{< nav-icon "alerts" >}} - - {{< img-hd src="/img/influxdb/2-0-monitor-oss-deadman.png" />}} -2. Choose a InfluxDB OSS field or create a new OSS field for your deadman alert: - 1. Click **{{< icon "plus" >}} Create** and select **Deadman Check** in the dropown menu. - 2. Define your query with at least one field. - 3. Click **Submit** and **Configure Check**. - When metrics stop reporting, you'll receive an alert. -3. Start under **Schedule Every**, set the amount of time to check for data. -4. Set the amount of time to wait before switching to a critical alert. -5. Save the Check and click on **View History** of the Check under the gear icon to verify it is running. - -## Create a notification endpoint and rule - -To receive a notification message when your deadman check is triggered, create a [notification endpoint](#create-a-notification-endpoint) and [rule](#create-a-notification-rule). - -### Create a notification endpoint - -InfluxData supports different endpoints: Slack, PagerDuty, and HTTP. Slack is free for all users, while PagerDuty and HTTP are exclusive to the Usage-Based Plan. - -#### Send a notification to Slack - -1. Create a [Slack Webhooks](https://api.slack.com/messaging/webhooks). -2. Go to **Alerts > Notification Endpoint** and click **{{< icon "plus" >}} Create**, and enter a name and description for your Slack endpoint. -3. Enter your Slack Webhook under **Incoming Webhook URL** and click **Create Notification Endpoint**. - -#### Send a notification to PagerDuty or HTTP - -Send a notification to PagerDuty or HTTP endpoints (other webhooks) by [upgrading your InfluxDB Cloud account](/influxdb/cloud/account-management/billing/#upgrade-to-usage-based-plan). - -### Create a notification rule - -[Create a notification rule](/influxdb/cloud/monitor-alert/notification-rules/create/) to set rules for when to send a deadman alert message to your notification endpoint. - -1. Go to **Alerts > Notification Rules** and click **{{< icon "plus" >}} Create**. -2. Fill out the **About** and **Conditions** section then click **Create Notification Rule**. diff --git a/content/influxdb/v2.1/monitor-alert/checks/create.md b/content/influxdb/v2.1/monitor-alert/checks/create.md index fa2fc808a..149a01597 100644 --- a/content/influxdb/v2.1/monitor-alert/checks/create.md +++ b/content/influxdb/v2.1/monitor-alert/checks/create.md @@ -32,7 +32,10 @@ A check consists of two parts – a query and check configuration. - Stores status in the `_level` column. ## Check types -There are two types of checks – a threshold check and a deadman check. +There are two types of checks: + +- [threshold](#threshold-check) +- [deadman](#deadman-check) #### Threshold check A threshold check assigns a status based on a value being above, below, @@ -42,13 +45,16 @@ inside, or outside of defined thresholds. A deadman check assigns a status to data when a series or group doesn't report in a specified amount of time. -## Create a check in the InfluxDB UI -1. In the navigation menu on the left, select **Alerts**. +## Create a check +1. In the navigation menu on the left, select **Alerts > Alerts**. {{< nav-icon "alerts" >}} -2. Click **{{< icon "plus" >}} Create** and select the [type of check](#check-types) to create. -3. Click **Name this check** in the top left corner and provide a unique name for the check. +2. Click **{{< caps >}}{{< icon "plus" >}} Create{{< /caps >}}** and select the [type of check](#check-types) to create. +3. Click **Name this check** in the top left corner and provide a unique name for the check, and then do the following: + - [Configure the check query](#configure-the-check-query) + - [Configure the check](#configure-the-check) +4. _(Optional)_ In the **Name this check** field at the top, enter a unique name for the check. #### Configure the check query 1. Select the **bucket**, **measurement**, **field** and **tag sets** to query. @@ -58,13 +64,12 @@ in a specified amount of time. In the **Aggregate functions** column, select an interval from the interval drop-down list (for example, "Every 5 minutes") and an aggregate function from the list of functions. - -3. Click **Submit** to run the query and preview the results. - To see the raw query results, click the **{{< icon "toggle" >}} View Raw Data** toggle. +3. Click **{{< caps >}}Submit{{< /caps >}}** to run the query and preview the results. + To see the raw query results, click the **View Raw Data {{< icon "toggle" >}}** toggle. #### Configure the check -1. Click **2. Configure Check** near the top of the window. -2. In the **Properties** column, configure the following: +1. Click **{{< caps >}}2. Configure Check{{< /caps >}}** near the top of the window. +2. In the **{{< caps >}}Properties{{< /caps >}}** column, configure the following: ##### Schedule Every Select the interval to run the check (for example, "Every 5 minutes"). @@ -87,22 +92,11 @@ in a specified amount of time. Common metadata tags across different checks lets you easily group and organize checks. You can also use custom tags in [notification rules](/influxdb/v2.1/monitor-alert/notification-rules/create/). -3. In the **Status Message Template** column, enter the status message template for the check. +3. In the **{{< caps >}}Status Message Template{{< /caps >}}** column, enter + the status message template for the check. Use [Flux string interpolation](/{{< latest "flux" >}}/spec/string-interpolation/) to populate the message with data from the query. - {{% note %}} -#### Flux only interpolates string values -Flux currently interpolates only string values. -Use the [string() function](/{{< latest "flux" >}}/stdlib/universe/string/) -to convert non-string values to strings. - -```js -count = 12 -"I currently have ${string(v: count)} cats." -``` - {{% /note %}} - Check data is represented as a record, `r`. Access specific column values using dot notation: `r.columnName`. @@ -129,7 +123,7 @@ count = 12 Condition options depend on your check type. ##### Configure a threshold check - 1. In the **Thresholds** column, click the status name (CRIT, WARN, INFO, or OK) + 1. In the **{{< caps >}}Thresholds{{< /caps >}}** column, click the status name (CRIT, WARN, INFO, or OK) to define conditions for that specific status. 2. From the **When value** drop-down list, select a threshold: is above, is below, is inside of, is outside of. @@ -137,7 +131,7 @@ count = 12 You can also use the threshold sliders in the data visualization to define threshold values. ##### Configure a deadman check - 1. In the **Deadman** column, enter a duration for the deadman check in the **for** field. + 1. In the **{{< caps >}}Deadman{{< /caps >}}** column, enter a duration for the deadman check in the **for** field. For example, `90s`, `5m`, `2h30m`, etc. 2. Use the **set status to** drop-down list to select a status to set on a dead series. 3. In the **And stop checking after** field, enter the time to stop monitoring the series. @@ -148,5 +142,9 @@ count = 12 ## Clone a check Create a new check by cloning an existing check. -1. In the **Checks** column, hover over the check you want to clone. -2. Click the **{{< icon "clone" >}}** icon, then **Clone**. +1. Go to **Alerts > Alerts** in the navigation on the left. + + {{< nav-icon "alerts" >}} + +2. Click the **{{< icon "gear" >}}** icon next to the check you want to clone + and then click **Clone**. diff --git a/content/influxdb/v2.1/monitor-alert/checks/delete.md b/content/influxdb/v2.1/monitor-alert/checks/delete.md index a682afd4f..9dcf4ca7b 100644 --- a/content/influxdb/v2.1/monitor-alert/checks/delete.md +++ b/content/influxdb/v2.1/monitor-alert/checks/delete.md @@ -18,12 +18,11 @@ If you no longer need a check, use the InfluxDB user interface (UI) to delete it Deleting a check cannot be undone. {{% /warn %}} -1. In the navigation menu on the left, select **Alerts**. +1. In the navigation menu on the left, select **Alerts > Alerts**. {{< nav-icon "alerts" >}} -2. Hover over the check you want to delete, click the **{{< icon "delete" >}}** - icon, and then **Delete**. +2. Click the **{{< icon "delete" >}}** icon, and then click **{{< caps >}}Confirm{{< /caps >}}**. After a check is deleted, all statuses generated by the check remain in the `_monitoring` bucket until the retention period for the bucket expires. diff --git a/content/influxdb/v2.1/monitor-alert/checks/update.md b/content/influxdb/v2.1/monitor-alert/checks/update.md index a62a8d020..10d45904a 100644 --- a/content/influxdb/v2.1/monitor-alert/checks/update.md +++ b/content/influxdb/v2.1/monitor-alert/checks/update.md @@ -21,15 +21,15 @@ Common updates include: - [Add or update a check description](#add-or-update-a-check-description) - [Add a label to a check](#add-a-label-to-a-check) -To update checks, select **Alerts** in the navigation menu on the left. +To update checks, select **Alerts > Alerts** in the navigation menu on the left. {{< nav-icon "alerts" >}} ## Update check queries and logic 1. Click the name of the check you want to update. The check builder appears. -2. To edit the check query, click **1. Define Query** at the top of the check builder window. -3. To edit the check logic, click **2. Configure Check** at the top of the check builder window. +2. To edit the check query, click **{{< caps >}}1. Define Query{{< /caps >}}** at the top of the check builder window. +3. To edit the check logic, click **{{< caps >}}2. Configure Check{{< /caps >}}** at the top of the check builder window. _For details about using the check builder, see [Create checks](/influxdb/v2.1/monitor-alert/checks/create/)._ @@ -49,12 +49,12 @@ _You can also rename a check in the [check builder](#update-check-queries-and-lo 2. Enter a new description and click out of the name field or press enter to save. ## Add a label to a check -1. Click **Add a label** next to the check you want to add a label to. - The **Add Labels** box opens. +1. Click **{{< icon "add-label" >}} Add a label** next to the check you want to add a label to. + The **Add Labels** box appears. 2. To add an existing label, select the label from the list. 3. To create and add a new label: - In the search field, enter the name of the new label. The **Create Label** box opens. - In the **Description** field, enter an optional description for the label. - Select a color for the label. - - Click **Create Label**. -4. To remove a label, hover over the label under to a rule and click **{{< icon "x" >}}**. + - Click **{{< caps >}}Create Label{{< /caps >}}**. +4. To remove a label, click **{{< icon "x" >}}** on the label. diff --git a/content/influxdb/v2.1/monitor-alert/checks/view.md b/content/influxdb/v2.1/monitor-alert/checks/view.md index 8b826845e..df5cbb676 100644 --- a/content/influxdb/v2.1/monitor-alert/checks/view.md +++ b/content/influxdb/v2.1/monitor-alert/checks/view.md @@ -19,12 +19,12 @@ View check details and statuses and notifications generated by checks in the Inf - [View statuses generated by a check](#view-statuses-generated-by-a-check) - [View notifications triggered by a check](#view-notifications-triggered-by-a-check) -To view checks, click **Alerts** in navigation menu on the left. +To view checks, click **Alerts > Alerts** in navigation menu on the left. {{< nav-icon "alerts" >}} ## View a list of all checks -The **Checks** section of the Alerts landing page displays all existing checks. +The **{{< caps >}}Checks{{< /caps >}}** section of the Alerts landing page displays all existing checks. ## View check details Click the name of the check you want to view. @@ -32,12 +32,6 @@ The check builder appears. Here you can view the check query and logic. ## View statuses generated by a check -1. Hover over the check and click the **{{< icon "view" >}}** icon. +1. Click the **{{< icon "view" >}}** icon on the check. 2. Click **View History**. The Statuses History page displays statuses generated by the selected check. - -## View notifications triggered by a check -1. Hover over the check, click the **{{< icon "view" >}}** - icon, then **View History**. -2. In the top left corner, click **Notifications**. - The Notifications History page displays notifications initiated by the selected check. diff --git a/content/influxdb/v2.1/monitor-alert/custom-checks.md b/content/influxdb/v2.1/monitor-alert/custom-checks.md index 39f92cffb..cd3285896 100644 --- a/content/influxdb/v2.1/monitor-alert/custom-checks.md +++ b/content/influxdb/v2.1/monitor-alert/custom-checks.md @@ -25,14 +25,15 @@ Using a Flux task, you can create a custom check that provides a couple advantag {{< nav-icon "tasks" >}} -2. Click **{{< icon "plus" >}} Create Task**, and then select **New Task**. +2. Click **{{< caps >}}{{< icon "plus" >}} Create Task{{< /caps >}}**. 3. In the **Name** field, enter a descriptive name, and then enter how often to run the task in the **Every** field (for example, `10m`). For more detail, such as using cron syntax or including an offset, see [Task configuration options](/influxdb/v2.1/process-data/task-options/). 4. Enter the Flux script for your custom check, including the [`monitor.check`](/{{< latest "flux" >}}/stdlib/influxdata/influxdb/monitor/check/) function. {{% note %}} -Use the the API endpoint `/checks/{checkID}/query` to see the Flux code for a check built in the UI. +Use the [`/api/v2/checks/{checkID}/query` API endpoint](/influxdb/v2.1/api/#operation/DeleteDashboardsIDOwnersID) +to see the Flux code for a check built in the UI. This can be useful for constructing custom checks. {{% /note %}} @@ -59,38 +60,36 @@ import "influxdata/influxdb/schema" option task = {name: "Failed Tasks Check", every: 1h, offset: 4m} task_data = from(bucket: "_tasks") - |> range(start: -task.every) - |> filter(fn: (r) => - (r["_measurement"] == "runs")) - |> filter(fn: (r) => - (r["_field"] == "logs")) - |> map(fn: (r) => ({ r with name: strings.split(v: regexp.findString(r: /option task = \{([^\}]+)/, v: r._value), t: "\\\\\\\"")[1] })) - |> drop(columns: ["_value", "_start", "_stop"]) - |> group(columns: ["name", "taskID", "status", "_measurement"]) - |> map(fn: (r) => - ({r with _value: if r.status == "failed" then 1 else 0})) - |> last() + |> range(start: -task.every) + |> filter(fn: (r) => r["_measurement"] == "runs") + |> filter(fn: (r) => r["_field"] == "logs") + |> map(fn: (r) => ({r with name: strings.split(v: regexp.findString(r: /option task = \{([^\}]+)/, v: r._value), t: "\\\\\\\"")[1]})) + |> drop(columns: ["_value", "_start", "_stop"]) + |> group(columns: ["name", "taskID", "status", "_measurement"]) + |> map(fn: (r) => ({r with _value: if r.status == "failed" then 1 else 0})) + |> last() + check = { - _check_id: "0000000000000001", // 16 characters, alphanumeric - _check_name: "Failed Tasks Check", // string - _type: "custom", // can also use "threshold" or "deadman" - tags: {}, + // 16 characters, alphanumeric + _check_id: "0000000000000001", + // Name string + _check_name: "Failed Tasks Check", + // Check type (threshold, deadman, or custom) + _type: "custom", + tags: {}, } -ok = (r) => - (r["logs"] == 0) -crit = (r) => - (r["logs"] == 1) -messageFn = (r) => - ("The task: ${r.taskID} - ${r.name} has a status of ${r.status}") +ok = (r) => r["logs"] == 0 +crit = (r) => r["logs"] == 1 +messageFn = (r) => "The task: ${r.taskID} - ${r.name} has a status of ${r.status}" task_data - |> schema["fieldsAsCols"]() - |> monitor["check"]( - data: check, - messageFn: messageFn, - ok: ok, - crit: crit, - ) + |> schema["fieldsAsCols"]() + |> monitor["check"]( + data: check, + messageFn: messageFn, + ok: ok, + crit: crit, + ) ``` {{% note %}} diff --git a/content/influxdb/v2.1/monitor-alert/notification-endpoints/create.md b/content/influxdb/v2.1/monitor-alert/notification-endpoints/create.md index 236f6fdec..7216e3f31 100644 --- a/content/influxdb/v2.1/monitor-alert/notification-endpoints/create.md +++ b/content/influxdb/v2.1/monitor-alert/notification-endpoints/create.md @@ -14,28 +14,54 @@ related: To send notifications about changes in your data, start by creating a notification endpoint to a third-party service. After creating notification endpoints, [create notification rules](/influxdb/v2.1/monitor-alert/notification-rules/create) to send alerts to third-party services on [check statuses](/influxdb/v2.1/monitor-alert/checks/create). -## Create a notification endpoint in the UI +{{% cloud-only %}} -1. In the navigation menu on the left, select **Alerts**. +#### Endpoints available in InfluxDB Cloud +The following endpoints are available for the InfluxDB Cloud Free Plan and Usage-based Plan: + +| Endpoint | Free Plan | Usage-based Plan | +|:-------- |:-------------------: |:----------------------------:| +| **Slack** | **{{< icon "check" >}}** | **{{< icon "check" >}}** | +| **PagerDuty** | | **{{< icon "check" >}}** | +| **HTTP** | | **{{< icon "check" >}}** | + +{{% /cloud-only %}} + +## Create a notification endpoint + +1. In the navigation menu on the left, select **Alerts > Alerts**. {{< nav-icon "alerts" >}} -2. Select **Notification Endpoints** near to top of the page. -3. Click **{{< icon "plus" >}} Create**. -4. From the **Destination** drop-down list, select a destination endpoint to send notifications +2. Select **{{< caps >}}Notification Endpoints{{< /caps >}}**. +3. Click **{{< caps >}}{{< icon "plus" >}} Create{{< /caps >}}**. +4. From the **Destination** drop-down list, select a destination endpoint to send notifications to. + {{% cloud-only %}}_See [available endpoints](#endpoints-available-in-influxdb-cloud)._{{% /cloud-only %}} 5. In the **Name** and **Description** fields, enter a name and description for the endpoint. 6. Enter information to connect to the endpoint: - - For HTTP, enter the **URL** to send the notification. Select the **auth method** to use: **None** for no authentication. To authenticate with a username and password, select **Basic** and then enter credentials in the **Username** and **Password** fields. To authenticate with an API token, select **Bearer**, and then enter the API token in the **Token** field. + - **For HTTP**, enter the **URL** to send the notification. + Select the **auth method** to use: **None** for no authentication. + To authenticate with a username and password, select **Basic** and then + enter credentials in the **Username** and **Password** fields. + To authenticate with an API token, select **Bearer**, and then enter the + API token in the **Token** field. - - **For Slack**, create an [Incoming WebHook](https://api.slack.com/incoming-webhooks#posting_with_webhooks) in Slack, and then enter your webHook URL in the **Slack Incoming WebHook URL** field. + - **For Slack**, create an [Incoming WebHook](https://api.slack.com/incoming-webhooks#posting_with_webhooks) + in Slack, and then enter your webHook URL in the **Slack Incoming WebHook URL** field. - **For PagerDuty**: - - [Create a new service](https://support.pagerduty.com/docs/services-and-integrations#section-create-a-new-service), [add an integration for your service](https://support.pagerduty.com/docs/services-and-integrations#section-add-integrations-to-an-existing-service), and then enter the PagerDuty integration key for your new service in the **Routing Key** field. - - The **Client URL** provides a useful link in your PagerDuty notification. Enter any URL that you'd like to use to investigate issues. This URL is sent as the `client_url` property in the PagerDuty trigger event. By default, the **Client URL** is set to your Monitoring & Alerting History page, and the following included in the PagerDuty trigger event: + - [Create a new service](https://support.pagerduty.com/docs/services-and-integrations#section-create-a-new-service), + [add an integration for your service](https://support.pagerduty.com/docs/services-and-integrations#section-add-integrations-to-an-existing-service), + and then enter the PagerDuty integration key for your new service in the **Routing Key** field. + - The **Client URL** provides a useful link in your PagerDuty notification. + Enter any URL that you'd like to use to investigate issues. + This URL is sent as the `client_url` property in the PagerDuty trigger event. + By default, the **Client URL** is set to your Monitoring & Alerting History + page, and the following included in the PagerDuty trigger event: ```json "client_url": "http://localhost:8086/orgs//alert-history" ``` -6. Click **Create Notification Endpoint**. +6. Click **{{< caps >}}Create Notification Endpoint{{< /caps >}}**. diff --git a/content/influxdb/v2.1/monitor-alert/notification-endpoints/delete.md b/content/influxdb/v2.1/monitor-alert/notification-endpoints/delete.md index 29fbe5fff..4db7567b7 100644 --- a/content/influxdb/v2.1/monitor-alert/notification-endpoints/delete.md +++ b/content/influxdb/v2.1/monitor-alert/notification-endpoints/delete.md @@ -12,15 +12,17 @@ related: - /influxdb/v2.1/monitor-alert/notification-rules/ --- -If notifications are no longer sent to an endpoint, complete the steps below to delete the endpoint, and then [update notification rules](/influxdb/v2.1/monitor-alert/notification-rules/update) with a new notification endpoint as needed. +If notifications are no longer sent to an endpoint, complete the steps below to +delete the endpoint, and then [update notification rules](/influxdb/v2.1/monitor-alert/notification-rules/update) +with a new notification endpoint as needed. -## Delete a notification endpoint in the UI +## Delete a notification endpoint -1. In the navigation menu on the left, select **Alerts**. +1. In the navigation menu on the left, select **Alerts > Alerts**. {{< nav-icon "alerts" >}} -2. Select **Notification Endpoints** near to top of the page. - find the rule you want to delete. -3. Hover over the endpoint you want to delete and click the **{{< icon "trash" >}}** icon. -4. Click **Delete** to confirm. +2. Select **{{< caps >}}Notification Endpoints{{< /caps >}}** and find the rule + you want to delete. +3. Click the **{{< icon "trash" >}}** icon on the notification you want to delete + and then click **{{< caps >}}Confirm{{< /caps >}}**. diff --git a/content/influxdb/v2.1/monitor-alert/notification-endpoints/update.md b/content/influxdb/v2.1/monitor-alert/notification-endpoints/update.md index 2ff6e165a..f2a1d4884 100644 --- a/content/influxdb/v2.1/monitor-alert/notification-endpoints/update.md +++ b/content/influxdb/v2.1/monitor-alert/notification-endpoints/update.md @@ -12,55 +12,44 @@ related: - /influxdb/v2.1/monitor-alert/notification-rules/ --- -To update the notification endpoint details, complete the procedures below as needed. To update the notification endpoint selected for a notification rule, see [update notification rules](/influxdb/v2.1/monitor-alert/notification-rules/update/). +Complete the following steps to update notification endpoint details. +To update the notification endpoint selected for a notification rule, see [update notification rules](/influxdb/v2.1/monitor-alert/notification-rules/update/). -## Add a label to notification endpoint +**To update a notification endpoint** -1. In the navigation menu on the left, select **Alerts**. +1. In the navigation menu on the left, select **Alerts > Alerts**. {{< nav-icon "alerts" >}} -2. Select **Notification Endpoints** near to top of the page. -3. Click **{{< icon "add-label" >}} Add a label** next to the endpoint you want to add a label to. - The **Add Labels** box opens. -4. To add an existing label, select the label from the list. -5. To create and add a new label: +2. Select **{{< caps >}}Notification Endpoints{{< /caps >}}** and then do the following as needed: - - In the search field, enter the name of the new label. The **Create Label** box opens. - - In the **Description** field, enter an optional description for the label. - - Select a color for the label. - - Click **Create Label**. - -6. To remove a label, hover over the label under an endpoint and click X. - - -## Disable notification endpoint - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Endpoints** near to top of the page. -3. Click the {{< icon "toggle" >}} toggle to disable the notification endpoint. + - [Update the name or description for notification endpoint](#update-the-name-or-description-for-notification-endpoint) + - [Change endpoint details](#change-endpoint-details) + - [Disable notification endpoint](#disable-notification-endpoint) + - [Add a label to notification endpoint](#add-a-label-to-notification-endpoint) ## Update the name or description for notification endpoint - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Endpoints** near to top of the page. -3. Hover over the name or description of the endpoint and click the pencil icon +1. Hover over the name or description of the endpoint and click the pencil icon (**{{< icon "edit" >}}**) to edit the field. -4. Click outside of the field to save your changes. +2. Click outside of the field to save your changes. ## Change endpoint details - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Endpoints** near to top of the page. -3. Click the endpoint to update. -4. Update details as needed, and then click **Edit Notification Endpoint**. +1. Click the name of the endpoint to update. +2. Update details as needed, and then click **Edit Notification Endpoint**. For details about each field, see [Create notification endpoints](/influxdb/v2.1/monitor-alert/notification-endpoints/create/). + +## Disable notification endpoint +Click the {{< icon "toggle" >}} toggle to disable the notification endpoint. + +## Add a label to notification endpoint +1. Click **{{< icon "add-label" >}} Add a label** next to the endpoint you want to add a label to. + The **Add Labels** box opens. +2. To add an existing label, select the label from the list. +3. To create and add a new label: + + - In the search field, enter the name of the new label. The **Create Label** box opens. + - In the **Description** field, enter an optional description for the label. + - Select a color for the label. + - Click **{{< caps >}}Create Label{{< /caps >}}**. + +4. To remove a label, click **{{< icon "x" >}}** on the label. diff --git a/content/influxdb/v2.1/monitor-alert/notification-endpoints/view.md b/content/influxdb/v2.1/monitor-alert/notification-endpoints/view.md index 687c85640..5698de3f5 100644 --- a/content/influxdb/v2.1/monitor-alert/notification-endpoints/view.md +++ b/content/influxdb/v2.1/monitor-alert/notification-endpoints/view.md @@ -15,37 +15,26 @@ related: View notification endpoint details and history in the InfluxDB user interface (UI). -- [View notification endpoints](#view-notification-endpoints) -- [View notification endpoint details](#view-notification-endpoint-details) -- [View history notification endpoint history](#view-notification-endpoint-history), including statues and notifications sent to the endpoint - -## View notification endpoints 1. In the navigation menu on the left, select **Alerts**. {{< nav-icon "alerts" >}} -2. Select **Notification Endpoints** near to top of the page. +2. Select **{{< caps >}}Notification Endpoints{{< /caps >}}**. + + - [View notification endpoint details](#view-notification-endpoint-details) + - [View history notification endpoint history](#view-notification-endpoint-history), including statues and notifications sent to the endpoint ## View notification endpoint details +On the notification endpoints page: -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Endpoints** near to top of the page. -3. Click the name of the notification endpoint you want to view. -4. View the notification endpoint destination, name, and information to connect to the endpoint. +1. Click the name of the notification endpoint you want to view. +2. View the notification endpoint destination, name, and information to connect to the endpoint. ## View notification endpoint history +On the notification endpoints page, click the **{{< icon "gear" >}}** icon, +and then click **View History**. +The Check Statuses History page displays: -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Endpoints** near to top of the page. -3. Hover over the notification endpoint, click the **{{< icon "view" >}}** icon, then **View History**. - The Check Statuses History page displays: - - - Statuses generated for the selected notification endpoint - - Notifications sent to the selected notification endpoint +- Statuses generated for the selected notification endpoint +- Notifications sent to the selected notification endpoint diff --git a/content/influxdb/v2.1/monitor-alert/notification-rules/create.md b/content/influxdb/v2.1/monitor-alert/notification-rules/create.md index bc94e8dc5..bf96a26a1 100644 --- a/content/influxdb/v2.1/monitor-alert/notification-rules/create.md +++ b/content/influxdb/v2.1/monitor-alert/notification-rules/create.md @@ -15,30 +15,30 @@ Once you've set up checks and notification endpoints, create notification rules _For details, see [Manage checks](/influxdb/v2.1/monitor-alert/checks/) and [Manage notification endpoints](/influxdb/v2.1/monitor-alert/notification-endpoints/)._ -## Create a new notification rule in the UI -1. In the navigation menu on the left, select **Alerts**. +1. In the navigation menu on the left, select **Alerts > Alerts**. {{< nav-icon "alerts" >}} -2. Select **Notification Rules** near to top of the page. -3. Click **{{< icon "plus" >}} Create**. -4. Complete the **About** section: +2. Select **{{< caps >}}Notification Rules{{< /caps >}}** near to top of the page. + + - [Create a new notification rule in the UI](#create-a-new-notification-rule-in-the-ui) + - [Clone an existing notification rule in the UI](#clone-an-existing-notification-rule-in-the-ui) + +## Create a new notification rule + +1. On the notification rules page, click **{{< caps >}}{{< icon "plus" >}} Create{{< /caps >}}**. +2. Complete the **About** section: 1. In the **Name** field, enter a name for the notification rule. 2. In the **Schedule Every** field, enter how frequently the rule should run. 3. In the **Offset** field, enter an offset time. For example,if a task runs on the hour, a 10m offset delays the task to 10 minutes after the hour. Time ranges defined in the task are relative to the specified execution time. -5. In the **Conditions** section, build a condition using a combination of status and tag keys. - - Next to **When status is equal to**, select a status from the drop-down field. - - Next to **AND When**, enter one or more tag key-value pairs to filter by. -6. In the **Message** section, select an endpoint to notify. -7. Click **Create Notification Rule**. +3. In the **Conditions** section, build a condition using a combination of status and tag keys. + - Next to **When status is equal to**, select a status from the drop-down field. + - Next to **AND When**, enter one or more tag key-value pairs to filter by. +4. In the **Message** section, select an endpoint to notify. +5. Click **{{< caps >}}Create Notification Rule{{< /caps >}}**. -## Clone an existing notification rule in the UI +## Clone an existing notification rule -1. 1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Rules** near to top of the page. -3. Hover over the rule you want to clone and click the **{{< icon "clone" >}}** icon and select **Clone**. - The cloned rule appears. +On the notification rules page, click the **{{< icon "gear" >}}** icon and select **Clone**. +The cloned rule appears. diff --git a/content/influxdb/v2.1/monitor-alert/notification-rules/delete.md b/content/influxdb/v2.1/monitor-alert/notification-rules/delete.md index e6dd0a572..13011e319 100644 --- a/content/influxdb/v2.1/monitor-alert/notification-rules/delete.md +++ b/content/influxdb/v2.1/monitor-alert/notification-rules/delete.md @@ -11,12 +11,14 @@ related: - /influxdb/v2.1/monitor-alert/notification-endpoints/ --- -## Delete a notification rule in the UI +If you no longer need to receive an alert, delete the associated notification rule. -1. In the navigation menu on the left, select **Alerts**. +## Delete a notification rule + +1. In the navigation menu on the left, select **Alerts > Alerts**. {{< nav-icon "alerts" >}} -2. Select **Notification Rules** near to top of the page. -3. Hover over the rule you want to delete and click the **{{< icon "trash" >}}** icon. -4. Click **Delete** to confirm. +2. Select **{{< caps >}}Notification Rules{{< /caps >}}** near to top of the page. +3. Click the **{{< icon "trash" >}}** icon on the notification rule you want to delete. +4. Click **{{< caps >}}Confirm{{< /caps >}}**. diff --git a/content/influxdb/v2.1/monitor-alert/notification-rules/update.md b/content/influxdb/v2.1/monitor-alert/notification-rules/update.md index 87b1abf77..ffa0e10e8 100644 --- a/content/influxdb/v2.1/monitor-alert/notification-rules/update.md +++ b/content/influxdb/v2.1/monitor-alert/notification-rules/update.md @@ -11,40 +11,40 @@ related: - /influxdb/v2.1/monitor-alert/notification-endpoints/ --- -## Add a label to notification rules +Update notification rules to update the notification message or change the schedule or conditions. -1. In the navigation menu on the left, select **Alerts**. + +1. In the navigation menu on the left, select **Alerts > Alerts**. {{< nav-icon "alerts" >}} -2. Select **Notification Rules** near to top of the page. -3. Click **{{< icon "add-label" >}} Add a label** next to the rule you want to add a label to. +2. Select **{{< caps >}}Notification Rules{{< /caps >}}** near to top of the page. + +- [Update the name or description for notification rules](#update-the-name-or-description-for-notification-rules) +- [Enable or disable notification rules](#enable-or-disable-notification-rules) +- [Add a label to notification rules](#add-a-label-to-notification-rules) + +## Update the name or description for notification rules +On the Notification Rules page: + +1. Hover over the name or description of a rule and click the pencil icon + (**{{< icon "edit" >}}**) to edit the field. +2. Click outside of the field to save your changes. + +## Enable or disable notification rules +On the notification rules page, click the {{< icon "toggle" >}} toggle to +enable or disable the notification rule. + +## Add a label to notification rules +On the notification rules page: + +1. Click **{{< icon "add-label" >}} Add a label** + next to the rule you want to add a label to. The **Add Labels** box opens. -4. To add an existing label, select the label from the list. -5. To create and add a new label: +2. To add an existing label, select the label from the list. +3. To create and add a new label: - In the search field, enter the name of the new label. The **Create Label** box opens. - In the **Description** field, enter an optional description for the label. - Select a color for the label. - - Click **Create Label**. -6. To remove a label, hover over the label under to a rule and click **{{< icon "x" >}}**. - - -## Disable notification rules - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Rules** near to top of the page. -3. Click the {{< icon "toggle" >}} toggle to disable the notification rule. - -## Update the name or description for notification rules - -1. In the navigation menu on the left, select **Alerts**. - - {{< nav-icon "alerts" >}} - -2. Select **Notification Rules** near to top of the page. -3. Hover over the name or description of a rule and click the pencil icon - (**{{< icon "edit" >}}**) to edit the field. -4. Click outside of the field to save your changes. + - Click **{{< caps >}}Create Label{{< /caps >}}**. +4. To remove a label, click **{{< icon "x" >}}** on the label. diff --git a/content/influxdb/v2.1/monitor-alert/notification-rules/view.md b/content/influxdb/v2.1/monitor-alert/notification-rules/view.md index c29447662..4228e5df5 100644 --- a/content/influxdb/v2.1/monitor-alert/notification-rules/view.md +++ b/content/influxdb/v2.1/monitor-alert/notification-rules/view.md @@ -24,10 +24,10 @@ View notification rule details and statuses and notifications generated by notif {{< nav-icon "alerts" >}} -2. Select **Notification Rules** near to top of the page. +2. Select **{{< caps >}}Notification Rules{{< /caps >}}** near to top of the page. ## View a list of all notification rules -The **Notification Rules** section of the Alerts landing page displays all existing checks. +The **{{< caps >}}Notification Rules{{< /caps >}}** section of the Alerts landing page displays all existing checks. ## View notification rule details Click the name of the check you want to view. @@ -35,11 +35,10 @@ The check builder appears. Here you can view the check query and logic. ## View statuses generated by a notification rule -Hover over the check, click the **{{< icon "view" >}}** icon, and then **View History**. +Click the **{{< icon "gear" >}}** icon on the notification rule, and then **View History**. The Statuses History page displays statuses generated by the selected check. ## View notifications triggered by a notification rule -1. Hover over the notification rule, click the **{{< icon "view" >}}** - icon, and then **View History**. -2. In the top left corner, click **Notifications**. +1. Click the **{{< icon "gear" >}}** icon on the notification rule, and then **View History**. +2. In the top left corner, click **{{< caps >}}Notifications{{< /caps >}}**. The Notifications History page displays notifications initiated by the selected notification rule. diff --git a/content/influxdb/v2.1/monitor-alert/send-email.md b/content/influxdb/v2.1/monitor-alert/send-email.md index bc7427e54..788995ee6 100644 --- a/content/influxdb/v2.1/monitor-alert/send-email.md +++ b/content/influxdb/v2.1/monitor-alert/send-email.md @@ -27,21 +27,25 @@ Send an alert email using a third-party service, such as [SendGrid](https://send ### Create an alert email task -1. In the InfluxDB UI, select **Tasks** in the navigation menu on the left. +1. In the InfluxDB UI, select **Tasks** in the navigation menu on the left. {{< nav-icon "tasks" >}} -2. Click **{{< icon "plus" >}} Create Task**, and then select **New Task**. -3. In the **Name** field, enter a descriptive name, for example, **Send alert email**, and then enter how often to run the task in the **Every** field, for example, `10m`. For more detail, such as using cron syntax or including an offset, see [Task configuration options](/influxdb/v2.1/process-data/task-options/). +2. Click **{{< caps >}}{{< icon "plus" >}} Create Task{{< /caps >}}**. +3. In the **Name** field, enter a descriptive name, for example, **Send alert email**, + and then enter how often to run the task in the **Every** field, for example, `10m`. + For more detail, such as using cron syntax or including an offset, see [Task configuration options](/influxdb/v2.1/process-data/task-options/). -4. In the right panel, enter the following detail in your **task script** (see [examples below](#examples)): - - Import the [Flux HTTP package](/{{< latest "flux" >}}/stdlib/http/). - - (Optional) Store your API key as a secret for reuse. First, [add your API key as a secret](/influxdb/v2.1/security/secrets/manage-secrets/add/), and then import the [Flux InfluxDB Secrets package](/{{< latest "flux" >}}/stdlib/influxdata/influxdb/secrets/). - - Query the `statuses` measurement in the `_monitoring` bucket to retrieve all statuses generated by your check. - - Set the time range to monitor; use the same interval that the task is scheduled to run. For example, `range (start: -task.every)`. - - Set the `_level` to alert on, for example, `crit`, `warn`, `info`, or `ok`. - - Use the `map()` function to evaluate the criteria to send an alert using `http.post()`. - - Specify your email service `url` (endpoint), include applicable request `headers`, and verify your request `data` format follows the format specified for your email service. +4. In the right panel, enter the following detail in your **task script** (see [examples below](#examples)): + - Import the [Flux HTTP package](/{{< latest "flux" >}}/stdlib/http/). + - (Optional) Store your API key as a secret for reuse. + First, [add your API key as a secret](/influxdb/v2.1/security/secrets/manage-secrets/add/), + and then import the [Flux InfluxDB Secrets package](/{{< latest "flux" >}}/stdlib/influxdata/influxdb/secrets/). + - Query the `statuses` measurement in the `_monitoring` bucket to retrieve all statuses generated by your check. + - Set the time range to monitor; use the same interval that the task is scheduled to run. For example, `range (start: -task.every)`. + - Set the `_level` to alert on, for example, `crit`, `warn`, `info`, or `ok`. + - Use the `map()` function to evaluate the criteria to send an alert using `http.post()`. + - Specify your email service `url` (endpoint), include applicable request `headers`, and verify your request `data` format follows the format specified for your email service. #### Examples diff --git a/content/influxdb/v2.1/monitor-alert/templates/infrastructure/aws.md b/content/influxdb/v2.1/monitor-alert/templates/infrastructure/aws.md index fd4432091..fc8346839 100644 --- a/content/influxdb/v2.1/monitor-alert/templates/infrastructure/aws.md +++ b/content/influxdb/v2.1/monitor-alert/templates/infrastructure/aws.md @@ -51,7 +51,9 @@ The AWS CloudWatch Monitoring template includes the following: ## View the incoming data -1. In the InfluxDB user interface (UI), select **Boards** (**Dashboards**). +1. In the InfluxDB user interface (UI), select **Dashboards** in the left navigation. {{< nav-icon "dashboards" >}} -2. Open your AWS dashboards, and then set the `v.bucket` variable to specify the bucket to query data from (`kubernetes` or `cloudwatch`). + +2. Open your AWS dashboards, and then set the `v.bucket` variable to specify the + bucket to query data from (`kubernetes` or `cloudwatch`). diff --git a/content/influxdb/v2.1/monitor-alert/templates/infrastructure/docker.md b/content/influxdb/v2.1/monitor-alert/templates/infrastructure/docker.md index 73ed2a859..514c162f1 100644 --- a/content/influxdb/v2.1/monitor-alert/templates/infrastructure/docker.md +++ b/content/influxdb/v2.1/monitor-alert/templates/infrastructure/docker.md @@ -34,7 +34,9 @@ For more information about how checks, notification endpoints, and notifications ``` For more information, see [influx apply](/influxdb/v2.1/reference/cli/influx/apply/). - > **Note:** Ensure your `influx` CLI is configured with your account credentials and that configuration is active. For more information, see [influx config](/influxdb/v2.1/reference/cli/influx/config/). + {{% note %}} +Ensure your `influx` CLI is configured with your account credentials and that configuration is active. For more information, see [influx config](/influxdb/v2.1/reference/cli/influx/config/). + {{% /note %}} 2. [Install Telegraf](/{{< latest "telegraf" >}}/introduction/installation/) on a server with network access to both the Docker containers and [InfluxDB v2 API](/influxdb/v2.1/reference/api/). 3. In your [Telegraf configuration file (`telegraf.conf`)](/influxdb/v2.1/telegraf-configs/), do the following: @@ -48,7 +50,8 @@ For more information about how checks, notification endpoints, and notifications ## View incoming data -1. In the InfluxDB user interface (UI), select **Boards** (**Dashboards**). +1. In the InfluxDB user interface (UI), select **Dashboards** in the left navigation. {{< nav-icon "dashboards" >}} + 2. Open the **Docker** dashboard to start monitoring. diff --git a/content/influxdb/v2.1/monitor-alert/templates/infrastructure/raspberry-pi.md b/content/influxdb/v2.1/monitor-alert/templates/infrastructure/raspberry-pi.md new file mode 100644 index 000000000..0806faaad --- /dev/null +++ b/content/influxdb/v2.1/monitor-alert/templates/infrastructure/raspberry-pi.md @@ -0,0 +1,62 @@ +--- +title: Monitor Raspberry Pi +description: > + Use the Raspberry Pi system template to monitor your Raspberry Pi 4 or 400 Linux system. +menu: + influxdb_2_1: + parent: Monitor infrastructure + name: Raspberry Pi +weight: 201 +--- + +Use the [Raspberry Pi Monitoring template](https://github.com/influxdata/community-templates/tree/master/raspberry-pi) +to monitor your Raspberry Pi 4 or 400 Linux system. + +The Raspberry Pi template includes the following: + +- one [bucket](/influxdb/v2.1/reference/glossary/#bucket): `rasp-pi` (7d retention) +- labels: `raspberry-pi` + Telegraf plugin labels + - [Diskio input plugin](/{{< latest "telegraf" >}}/plugins//#diskio) + - [Mem input plugin](/{{< latest "telegraf" >}}/plugins//#mem) + - [Net input plugin](/{{< latest "telegraf" >}}/plugins//#net) + - [Processes input plugin](/{{< latest "telegraf" >}}/plugins//#processes) + - [Swap input plugin](/{{< latest "telegraf" >}}/plugins//#swap) + - [System input plugin](/{{< latest "telegraf" >}}/plugins//#system) +- one [Telegraf configuration](/influxdb/v2.1/telegraf-configs/) +- one [dashboard](/influxdb/v2.1/reference/glossary/#dashboard): Raspberry Pi System +- two variables: `bucket` and `linux_host` + +## Apply the template + +1. Use the [`influx` CLI](/influxdb/v2.1/reference/cli/influx/) to run the following command: + + ```sh + influx apply -f https://raw.githubusercontent.com/influxdata/community-templates/master/raspberry-pi/raspberry-pi-system.yml + ``` + For more information, see [influx apply](/influxdb/v2.1/reference/cli/influx/apply/). +2. [Install Telegraf](/{{< latest "telegraf" >}}/introduction/installation/) on + your Raspberry Pi and ensure your Raspberry Pi has network access to the + [InfluxDB {{% cloud-only %}}Cloud{{% /cloud-only %}} API](/influxdb/v2.1/reference/api/). +3. Add the following environment variables to your Telegraf environment: + + - `INFLUX_HOST`: {{% oss-only %}}Your [InfluxDB URL](/influxdb/v2.1/reference/urls/){{% /oss-only %}} + {{% cloud-only %}}Your [InfluxDB Cloud region URL](/influxdb/cloud/reference/regions/){{% /cloud-only %}} + - `INFLUX_TOKEN`: Your [InfluxDB {{% cloud-only %}}Cloud{{% /cloud-only %}} API token](/influxdb/v2.1/security/tokens/) + - `INFLUX_ORG`: Your InfluxDB {{% cloud-only %}}Cloud{{% /cloud-only %}} organization name. + + ```sh + export INFLUX_HOST=http://localhost:8086 + export INFLUX_TOKEN=mY5uP3rS3cr3T70keN + export INFLUX_ORG=example-org + ``` + +4. [Start Telegraf](/influxdb/v2.1/write-data/no-code/use-telegraf/auto-config/#start-telegraf). + +## View the incoming data + +1. In the InfluxDB user interface (UI), select **Boards** (**Dashboards**). + + {{< nav-icon "dashboards" >}} + +2. Click the Raspberry Pi System link to open your dashboard, then select `rasp-pi` +as your bucket and select your linux_host. diff --git a/content/influxdb/v2.1/monitor-alert/templates/infrastructure/vshpere.md b/content/influxdb/v2.1/monitor-alert/templates/infrastructure/vshpere.md index fbb19b1ba..3829e6402 100644 --- a/content/influxdb/v2.1/monitor-alert/templates/infrastructure/vshpere.md +++ b/content/influxdb/v2.1/monitor-alert/templates/infrastructure/vshpere.md @@ -29,7 +29,9 @@ The Docker Monitoring template includes the following: ``` For more information, see [influx apply](/influxdb/v2.1/reference/cli/influx/apply/). - > **Note:** Ensure your `influx` CLI is configured with your account credentials and that configuration is active. For more information, see [influx config](/influxdb/v2.1/reference/cli/influx/config/). + {{% note %}} +Ensure your `influx` CLI is configured with your account credentials and that configuration is active. For more information, see [influx config](/influxdb/v2.1/reference/cli/influx/config/). + {{% /note %}} 2. [Install Telegraf](/{{< latest "telegraf" >}}/introduction/installation/) on a server with network access to both the vSphere host and [InfluxDB v2 API](/influxdb/v2.1/reference/api/). 3. In your [Telegraf configuration file (`telegraf.conf`)](/influxdb/v2.1/telegraf-configs/), do the following: @@ -49,7 +51,8 @@ The Docker Monitoring template includes the following: ## View incoming data -1. In the InfluxDB user interface (UI), select **Boards** (**Dashboards**). +1. In the InfluxDB user interface (UI), select **Dashboards** in the left navigation. {{< nav-icon "dashboards" >}} + 2. Open the **vsphere** dashboard to start monitoring. diff --git a/content/influxdb/v2.1/monitor-alert/templates/infrastructure/windows.md b/content/influxdb/v2.1/monitor-alert/templates/infrastructure/windows.md index c516858a4..7e2c477dd 100644 --- a/content/influxdb/v2.1/monitor-alert/templates/infrastructure/windows.md +++ b/content/influxdb/v2.1/monitor-alert/templates/infrastructure/windows.md @@ -28,7 +28,9 @@ The Windows System Monitoring template includes the following: ``` For more information, see [influx apply](/influxdb/v2.1/reference/cli/influx/apply/). - > **Note:** Ensure your `influx` CLI is configured with your account credentials and that configuration is active. For more information, see [influx config](/influxdb/v2.1/reference/cli/influx/config/). + {{% note %}} +Ensure your `influx` CLI is configured with your account credentials and that configuration is active. For more information, see [influx config](/influxdb/v2.1/reference/cli/influx/config/). + {{% /note %}} 2. [Install Telegraf](/{{< latest "telegraf" >}}/introduction/installation/) on a server with network access to both the Windows system and [InfluxDB v2 API](/influxdb/v2.1/reference/api/). 3. In your [Telegraf configuration file (`telegraf.conf`)](/influxdb/v2.1/telegraf-configs/), do the following: @@ -42,9 +44,10 @@ The Windows System Monitoring template includes the following: ## View incoming data -1. In the InfluxDB user interface (UI), select **Boards** (**Dashboards**). +1. In the InfluxDB user interface (UI), select **Dashboards** in the left navigation. {{< nav-icon "dashboards" >}} + 2. Open the **Windows System** dashboard to start monitoring. {{% note %}} diff --git a/content/influxdb/v2.1/monitor-alert/templates/monitor.md b/content/influxdb/v2.1/monitor-alert/templates/monitor.md new file mode 100644 index 000000000..95aab24e3 --- /dev/null +++ b/content/influxdb/v2.1/monitor-alert/templates/monitor.md @@ -0,0 +1,175 @@ +--- +title: Monitor InfluxDB OSS using a template +description: > + Monitor your InfluxDB OSS instance using InfluxDB Cloud and + a pre-built InfluxDB template. +menu: + influxdb_2_1: + parent: Monitor with templates + name: Monitor InfluxDB OSS +weight: 102 +influxdb/v2.1/tags: [templates, monitor] +aliases: + - /influxdb/v2.1/influxdb-templates/monitor/ +related: + - /influxdb/v2.1/reference/cli/influx/apply/ + - /influxdb/v2.1/reference/cli/influx/template/ +--- + +Use [InfluxDB Cloud](/influxdb/cloud/), the [InfluxDB Open Source (OSS) Metrics template](https://github.com/influxdata/community-templates/tree/master/influxdb2_oss_metrics), +and [Telegraf](/{{< latest "telegraf" >}}/) to monitor one or more InfluxDB OSS instances. + +Do the following: + +1. [Review requirements](#review-requirements) +2. [Install the InfluxDB OSS Monitoring template](#install-the-influxdb-oss-monitoring-template) +3. [Set up InfluxDB OSS for monitoring](#set-up-influxdb-oss-for-monitoring) +4. [Set up Telegraf](#set-up-telegraf) +5. [View the Monitoring dashboard](#view-the-monitoring-dashboard) +6. (Optional) [Alert when metrics stop reporting](#alert-when-metrics-stop-reporting) +7. (Optional) [Create a notification endpoint and rule](#create-a-notification-endpoint-and-rule) + +## Review requirements + +Before you begin, make sure you have access to the following: + +- InfluxDB Cloud account ([sign up for free here](https://cloud2.influxdata.com/signup)) +- Command line access to a machine [running InfluxDB OSS 2.x](/influxdb/v2.1/install/) and permissions to install Telegraf on this machine +- Internet connectivity from the machine running InfluxDB OSS 2.x and Telegraf to InfluxDB Cloud +- Sufficient resource availability to install the template (InfluxDB Cloud Free + Plan accounts include [resource limits](/influxdb/cloud/account-management/pricing-plans/#resource-limits/influxdb/cloud/account-management/pricing-plans/#resource-limits)) + +## Install the InfluxDB OSS Monitoring template + +The InfluxDB OSS Monitoring template includes a Telegraf configuration that sends +InfluxDB OSS metrics to an InfluxDB endpoint and a dashboard that visualizes the metrics. + +1. [Log into your InfluxDB Cloud account](https://cloud2.influxdata.com/). +2. Go to **Settings > Templates** in the navigation bar on the left + + {{< nav-icon "Settings" >}} + +3. Under **Paste the URL of the Template's resource manifest file**, enter the + following template URL: + + ``` + https://raw.githubusercontent.com/influxdata/community-templates/master/influxdb2_oss_metrics/influxdb2_oss_metrics.yml + ``` + +4. Click **{{< caps >}}Lookup Template{{< /caps >}}**, and then click **{{< caps >}}Install Template{{< /caps >}}**. + InfluxDB Cloud imports the template, which includes the following resources: + + - Dashboard `InfluxDB OSS Metrics` + - Telegraf configuration `scrape-influxdb-oss-telegraf` + - Bucket `oss_metrics` + - Check `InfluxDB OSS Deadman` + - Labels `influxdb2` and `prometheus` + +## Set up InfluxDB OSS for monitoring + +By default, InfluxDB OSS 2.x has a `/metrics` endpoint available, which exports +internal InfluxDB metrics in [Prometheus format](https://prometheus.io/docs/concepts/data_model/). + +1. Ensure the `/metrics` endpoint is [enabled](/{{< latest "influxdb" >}}/reference/config-options/#metrics-disabled). + If you've changed the default settings to disable the `/metrics` endpoint, + [re-enable these settings](/{{< latest "influxdb" >}}/reference/config-options/#metrics-disabled). +2. Navigate to the `/metrics` endpoint of your InfluxDB OSS instance to view the InfluxDB OSS system metrics in your browser: + +## Set up Telegraf + +Set up Telegraf to scrape metrics from InfluxDB OSS to send to your InfluxDB Cloud account. + +On each InfluxDB OSS instance you want to monitor, do the following: + +1. [Install Telegraf](/{{< latest "telegraf" >}}/introduction/installation/). +2. Set the following environment variables in your Telegraf environment: + + - `INFLUX_URL`: Your [InfluxDB Cloud region URL](/influxdb/cloud/reference/regions/) + - `INFLUX_ORG`: Your InfluxDB Cloud organization name + +1. [In the InfluxDB Cloud UI](https://cloud2.influxdata.com/), go to **Load Data > Telegraf** in the left navigation. + + {{< nav-icon "load-data" >}} + +2. Click **Setup Instructions** under **Scrape InfluxDB OSS Metrics**. +3. Complete the Telegraf Setup instructions to start Telegraf using the Scrape InfluxDB OSS Metrics + Telegraf configuration stored in InfluxDB Cloud. + + {{% note %}} +For your API token, generate a new token or use an existing All Access token. If you run Telegraf as a service, edit your init script to set the environment variable and ensure its available to the service. + {{% /note %}} + +Telegraf runs quietly in the background (no immediate output appears), and begins +pushing metrics to the `oss_metrics` bucket in your InfluxDB Cloud account. + +## View the Monitoring dashboard + +To see your data in real time, view the Monitoring dashboard. + +1. Select **Dashboards** in your **InfluxDB Cloud** account. + + {{< nav-icon "dashboards" >}} + +2. Click **InfluxDB OSS Metrics**. Metrics appear in your dashboard. +3. Customize your monitoring dashboard as needed. For example, send an alert in the following cases: + - Users create a new task or bucket + - You're testing machine limits + - [Metrics stop reporting](#alert-when-metrics-stop-reporting) + +## Alert when metrics stop reporting + +The Monitoring template includes a [deadman check](/influxdb/cloud/monitor-alert/checks/create/#deadman-check) to verify metrics are reported at regular intervals. + +To alert when data stops flowing from InfluxDB OSS instances to your InfluxDB Cloud account, do the following: + +1. [Customize the deadman check](#customize-the-deadman-check) to identify the fields you want to monitor. +2. [Create a notification endpoint and rule](#create-a-notification-endpoint-and-rule) to receive notifications when your deadman check is triggered. + +### Customize the deadman check + +1. To view the deadman check, click **Alerts** in the navigation bar of your **InfluxDB Cloud** account. + + {{< nav-icon "alerts" >}} + +2. Choose a InfluxDB OSS field or create a new OSS field for your deadman alert: + 1. Click **{{< caps >}}{{< icon "plus" >}} Create{{< /caps >}}** and select **Deadman Check** in the dropdown menu. + 2. Define your query with at least one field. + 3. Click **{{< caps >}}Submit{{< /caps >}}** and **{{< caps >}}Configure Check{{< /caps >}}**. + When metrics stop reporting, you'll receive an alert. +3. Start under **Schedule Every**, set the amount of time to check for data. +4. Set the amount of time to wait before switching to a critical alert. +5. Click **{{< icon "check" >}}** to save the check. + +## Create a notification endpoint and rule + +To receive a notification message when your deadman check is triggered, create a [notification endpoint](#create-a-notification-endpoint) and [rule](#create-a-notification-rule). + +### Create a notification endpoint + +InfluxData supports different endpoints: Slack, PagerDuty, and HTTP. Slack is free for all users, while PagerDuty and HTTP are exclusive to the Usage-Based Plan. + +#### Send a notification to Slack + +1. Create a [Slack Webhooks](https://api.slack.com/messaging/webhooks). +2. Go to **Alerts > Alerts** in the left navigation menu and then click **{{< caps >}}Notification Endpoints{{< /caps >}}**. + + {{< nav-icon "alerts" >}} + +4. Click **{{< caps >}}{{< icon "plus" >}} Create{{< /caps >}}**, and enter a name and description for your Slack endpoint. +3. Enter your Slack Webhook under **Incoming Webhook URL** and click **{{< caps >}}Create Notification Endpoint{{< /caps >}}**. + +#### Send a notification to PagerDuty or HTTP + +Send a notification to PagerDuty or HTTP endpoints (other webhooks) by [upgrading your InfluxDB Cloud account](/influxdb/cloud/account-management/billing/#upgrade-to-usage-based-plan). + +### Create a notification rule + +[Create a notification rule](/influxdb/cloud/monitor-alert/notification-rules/create/) to set rules for when to send a deadman alert message to your notification endpoint. + +1. Go to **Alerts > Alerts** in the left navigation menu and then click **{{< caps >}}Notification Rules{{< /caps >}}**. + + {{< nav-icon "alerts" >}} + +4. Click **{{< caps >}}{{< icon "plus" >}} Create{{< /caps >}}**, and then provide + the required information. +3. Click **{{< caps >}}Create Notification Rule{{< /caps >}}**. diff --git a/content/influxdb/v2.1/monitor-alert/templates/networks/haproxy.md b/content/influxdb/v2.1/monitor-alert/templates/networks/haproxy.md index 1f9011700..ed1cac5ab 100644 --- a/content/influxdb/v2.1/monitor-alert/templates/networks/haproxy.md +++ b/content/influxdb/v2.1/monitor-alert/templates/networks/haproxy.md @@ -42,7 +42,8 @@ The HAProxy for InfluxDB v2 template includes the following: ## View incoming data -1. In the InfluxDB user interface (UI), select **Boards** (**Dashboards**). +1. In the InfluxDB user interface (UI), select **Dashboards** in the left navigation. {{< nav-icon "dashboards" >}} + 2. Open the **HAProxy** dashboard to start monitoring. diff --git a/layouts/shortcodes/icon.html b/layouts/shortcodes/icon.html index 64c83631a..0f2a92a28 100644 --- a/layouts/shortcodes/icon.html +++ b/layouts/shortcodes/icon.html @@ -112,7 +112,7 @@ {{- else if eq $icon "play" -}} {{- else if eq $icon "plus" -}} - + {{- else if or (eq $icon "refresh") (eq $icon "replay") -}} {{- else if or (eq $icon "remove") (eq $icon "x") -}}