diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..468677a72 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "cSpell.words": [ + "dbrp", + "downsample", + "eastus", + "Invokable", + "Rienmann", + "Signup", + "westeurope" + ] +} \ No newline at end of file diff --git a/api-docs/cloud/ref.yml b/api-docs/cloud/ref.yml index 3b9fa93cc..b4c159e2c 100644 --- a/api-docs/cloud/ref.yml +++ b/api-docs/cloud/ref.yml @@ -9992,7 +9992,7 @@ paths: description: Unexpected error summary: List scripts tags: - - Invocable Scripts + - Invokable Scripts post: operationId: PostScripts requestBody: @@ -10014,7 +10014,7 @@ paths: description: Unexpected error summary: Create a script tags: - - Invocable Scripts + - Invokable Scripts /api/v2/scripts/{scriptID}: delete: description: Deletes a script and all associated records. @@ -10034,9 +10034,9 @@ paths: description: Unexpected error summary: Delete a script tags: - - Invocable Scripts + - Invokable Scripts get: - description: Uses script ID to retrieve details of an invocable script. + description: Uses script ID to retrieve details of an invokable script. operationId: GetScriptsID parameters: - description: The script ID. @@ -10057,10 +10057,10 @@ paths: description: Unexpected error summary: Retrieve a script tags: - - Invocable Scripts + - Invokable Scripts patch: description: > - Updates properties (`name`, `description`, and `script`) of an invocable + Updates properties (`name`, `description`, and `script`) of an invokable script. operationId: PatchScriptsID parameters: @@ -10089,7 +10089,7 @@ paths: description: Unexpected error summary: Update a script tags: - - Invocable Scripts + - Invokable Scripts /api/v2/scripts/{scriptID}/invoke: post: description: >- @@ -10119,7 +10119,7 @@ paths: description: Unexpected error summary: Invoke a script tags: - - Invocable Scripts + - Invokable Scripts /api/v2/setup: get: description: >- @@ -12382,7 +12382,7 @@ tags: - DBRPs - Delete - DemoDataBuckets - - Invocable Scripts + - Invokable Scripts - Labels - Limits - NotificationEndpoints @@ -12514,7 +12514,7 @@ x-tagGroups: - DBRPs - Delete - DemoDataBuckets - - Invocable Scripts + - Invokable Scripts - Labels - Limits - NotificationEndpoints diff --git a/api-docs/openapi/content/cloud/tags.yml b/api-docs/openapi/content/cloud/tags.yml index 0304eda51..99031e526 100644 --- a/api-docs/openapi/content/cloud/tags.yml +++ b/api-docs/openapi/content/cloud/tags.yml @@ -6,18 +6,18 @@ - [Querystring authentication](#section/Authentication/QuerystringAuthentication) x-traitTag: true -- name: Invocable Scripts +- name: Invokable Scripts description: | Manage and execute scripts as API endpoints in InfluxDB. - An API Invocable Script assigns your custom Flux script to a new InfluxDB API endpoint for your organization. - Invocable scripts let you execute your script as an HTTP request to the endpoint. + An API Invokable Script assigns your custom Flux script to a new InfluxDB API endpoint for your organization. + Invokable scripts let you execute your script as an HTTP request to the endpoint. - Invocable scripts accept parameters. Add parameter references in your script as `params.myparameter`. + Invokable scripts accept parameters. Add parameter references in your script as `params.myparameter`. When you `invoke` your script, you send parameters as key-value pairs in the `params` object. Then, InfluxDB executes your script with the key-value pairs as arguments, and returns the result. - For more information and examples, see [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invocable-scripts). + For more information and examples, see [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts). - name: Quick start x-traitTag: true description: | diff --git a/content/flux/v0.x/spec/options.md b/content/flux/v0.x/spec/options.md index 8f1cb77e5..0affc5aff 100644 --- a/content/flux/v0.x/spec/options.md +++ b/content/flux/v0.x/spec/options.md @@ -13,23 +13,17 @@ aliases: - /influxdb/cloud/reference/flux/language/options/ --- -{{% note %}} -This document is a living document and may not represent the current implementation of Flux. -Any section that is not currently implemented is commented with a **[IMPL#XXX]** where -**XXX** is an issue number tracking discussion and progress towards implementation. -{{% /note %}} - An option represents a storage location for any value of a specified type. Options are mutable. An option can hold different values during its lifetime. Below is a list of built-in options currently implemented in the Flux language: -- now -- task -- location +- [now](#now) +- [task](#task) +- [location](#location) -##### now +#### now The `now` option is a function that returns a time value used as a proxy for the current system time. ```js @@ -37,7 +31,7 @@ The `now` option is a function that returns a time value used as a proxy for the option now = () => 2006-01-02T15:04:05-07:00 ``` -##### task +#### task The `task` option schedules the execution of a Flux query. ```js @@ -50,18 +44,19 @@ option task = { } ``` -##### location +#### location The `location` option sets the default time zone of all times in the script. The location maps the UTC offset in use at that location for a given time. -The default value is set using the time zone of the running process. +The default value is [`timezone.utc`](/flux/v0.x/stdlib/timezone/#constants). ```js -option location = fixedZone(offset:-5h) // Set timezone to be 5 hours west of UTC. -option location = loadLocation(name:"America/Denver") // Set location to be America/Denver. +import "timezone" + +// Set timezone to be 5 hours west of UTC. +option location = timezone.fixed(offset: -5h) + +// Set location to be America/Denver. +option location = timezone.location(name: "America/Denver") ``` -{{% note %}} -[IMPL#406](https://github.com/influxdata/flux/issues/406) Implement Location option -{{% /note %}} - {{< page-nav prev="/flux/v0.x/spec/variables/" next="/flux/v0.x/spec/types/" >}} diff --git a/content/influxdb/cloud/api-guide/api-invocable-scripts/_index.md b/content/influxdb/cloud/api-guide/api-invokable-scripts/_index.md similarity index 86% rename from content/influxdb/cloud/api-guide/api-invocable-scripts/_index.md rename to content/influxdb/cloud/api-guide/api-invokable-scripts/_index.md index cbac860b7..14827fd3f 100644 --- a/content/influxdb/cloud/api-guide/api-invocable-scripts/_index.md +++ b/content/influxdb/cloud/api-guide/api-invokable-scripts/_index.md @@ -1,27 +1,29 @@ --- title: Invoke custom scripts as API endpoints -seotitle: Use InfluxDB API-invocable scripts +seotitle: Use InfluxDB API-invokable scripts description: > - Use API-invocable scripts to create your own InfluxDB API endpoints that execute custom scripts. + Use API-invokable scripts to create your own InfluxDB API endpoints that execute custom scripts. weight: 101 menu: influxdb_cloud: name: Invoke custom scripts parent: Develop with the API -influxdb/cloud/tags: [api guides] +aliases: + - /influxdb/cloud/api-guide/api-invocable-scripts/ +influxdb/cloud/tags: [api guides] --- -Use API invocable scripts to create custom InfluxDB API endpoints that query, process, and shape data. API invocable scripts let you assign scripts to API endpoints and then execute them as standard REST operations in InfluxDB Cloud. Learn how to manage API invocable scripts and invoke them with runtime parameters. +Use API invokable scripts to create custom InfluxDB API endpoints that query, process, and shape data. API invokable scripts let you assign scripts to API endpoints and then execute them as standard REST operations in InfluxDB Cloud. Learn how to manage API invokable scripts and invoke them with runtime parameters. Use the `/api/v2/scripts` InfluxDB API endpoint to: -- [Create a script](#create-an-invocable-script) +- [Create a script](#create-an-invokable-script) - [Invoke a script](#invoke-a-script) -- [List scripts](#list-invocable-scripts) -- [Update a script](#update-an-invocable-script) -- [Delete a script](#delete-an-invocable-script) +- [List scripts](#list-invokable-scripts) +- [Update a script](#update-an-invokable-script) +- [Delete a script](#delete-an-invokable-script) -## Create an invocable script -To create an API-invocable script +## Create an invokable script +To create an API-invokable script for your [organization](/influxdb/v2.0/reference/glossary/#organization), send a request using the `POST` method to the `/api/v2/scripts` InfluxDB API endpoint. @@ -44,7 +46,7 @@ JSON object with the following fields: - **orgID**: your [InfluxDB organization ID](/influxdb/v2.0/organizations/view-orgs/#view-your-organization-id) ### Use parameters in a script -To create an invocable script that accepts parameters (variables), +To create an invokable script that accepts parameters (variables), reference the parameters as properties of the `params` object, e.g. `params.firstparam`. `params` is an InfluxDB object that defines runtime variables. You provide values for `params` when you [invoke a script](#invoke-a-script). @@ -58,11 +60,11 @@ If you don't provide a value for a referenced parameter, InfluxDB returns the fo ## Examples -### Create an invocable Flux script +### Create an invokable Flux script The following example creates a new Flux script that references the `params.mybucket` parameter and returns the last point from the [bucket](/influxdb/v2.0/reference/glossary/#bucket). ```sh -{{% get-shared-text "api/v2.0/api-invocable-scripts/create-flux-script.sh" %}} +{{% get-shared-text "api/v2.0/api-invokable-scripts/create-flux-script.sh" %}} ``` Replace the following: - *`INFLUX_API_TOKEN`*: your [InfluxDB API token](/influxdb/cloud/reference/glossary/#token) @@ -99,7 +101,7 @@ Provide the following in your request: ### Request body JSON object that contains a `params` object. In `params`, provide key-value pairs for parameters referenced in your script. -The [create](#create-an-invocable-script) example references the parameter `params.mybucket`. +The [create](#create-an-invokable-script) example references the parameter `params.mybucket`. ```json "from(bucket: params.mybucket) \ |> range(start: -7d) \ @@ -109,7 +111,7 @@ The [create](#create-an-invocable-script) example references the parameter `para The following example invokes the created script and passes "air_sensor" as the value for `params.mybucket`. ```sh -{{% get-shared-text "api/v2.0/api-invocable-scripts/invoke-post.sh" %}} +{{% get-shared-text "api/v2.0/api-invokable-scripts/invoke-post.sh" %}} ``` InfluxDB returns query results in [annotated CSV](/influxdb/cloud/reference/syntax/annotated-csv/) from the `air_sensor` bucket. @@ -119,7 +121,7 @@ If the script references multiple parameters, provide values for all parameters. To provide values for multiple parameters, send an object that contains a `params` object. In `params`, add the parameter names as keys and define a value for each key. -The following **invocable script** object references four parameters: +The following **invokable script** object references four parameters: ```json { @@ -166,7 +168,7 @@ The following `params` object provides a key-value pair for each parameter refer The following example uses the `/api/v2/scripts` InfluxDB API endpoint to create the script and invoke the new script ID with `params`. ```sh -{{% get-shared-text "api/v2.0/api-invocable-scripts/invoke_with_params.sh" %}} +{{% get-shared-text "api/v2.0/api-invokable-scripts/invoke_with_params.sh" %}} ``` InfluxDB returns points from `air_sensor` that have `temperature` or `humidity` fields. @@ -183,7 +185,7 @@ Each unique `table` value represents a group. ,_result,1,2021-09-25T21:10:01.810564864Z,2021-10-25T21:10:01.810564864Z,2021-09-28T16:57:57Z,35.651929918691714,humidity,airSensors,TLM0202 ``` -## List invocable scripts +## List invokable scripts To list scripts for an organization, send a request using the `GET` method to the `/api/v2/scripts` InfluxDB API endpoint. Provide the following in your request: @@ -199,7 +201,7 @@ Provide the following in your request: - **offset**: (Optional) number to offset the pagination ```sh -{{% get-shared-text "api/v2.0/api-invocable-scripts/list.sh" %}} +{{% get-shared-text "api/v2.0/api-invokable-scripts/list.sh" %}} ``` To find a specific script for an organization, send a request using the `GET` method to the `/api/v2/scripts/SCRIPT_ID` InfluxDB API endpoint. @@ -215,10 +217,10 @@ Provide the following in your request: - **Accept**: application/json ```sh -{{% get-shared-text "api/v2.0/api-invocable-scripts/find.sh" %}} +{{% get-shared-text "api/v2.0/api-invokable-scripts/find.sh" %}} ``` -## Update an invocable script -Use the API to replace the following properties of an invocable script: +## Update an invokable script +Use the API to replace the following properties of an invokable script: - name - description - script @@ -236,23 +238,23 @@ Provide the following in your request: - **Accept**: application/json' #### Request body -- A modified **invocable script** as a JSON object. +- A modified **invokable script** as a JSON object. -The following example finds an invocable script containing a numeric date range, -replaces the date with a new parameter, and updates the invocable script. +The following example finds an invokable script containing a numeric date range, +replaces the date with a new parameter, and updates the invokable script. ```sh -{{% get-shared-text "api/v2.0/api-invocable-scripts/update-flux-script.sh" %}} +{{% get-shared-text "api/v2.0/api-invokable-scripts/update-flux-script.sh" %}} ``` 1. Use `GET /api/v2/scripts` to retrieve an object that contains a list of scripts. -2. With the scripts array, use [`jq`](https://stedolan.github.io/jq/) to find the first **invocable script** object that has a `script` property that contains a hard-coded numeric date range. +2. With the scripts array, use [`jq`](https://stedolan.github.io/jq/) to find the first **invokable script** object that has a `script` property that contains a hard-coded numeric date range. 3. Replace the hard-coded date range in the `script` property with a new `params.myrangestart` dynamic parameter and assign the object to a `new_script` variable. 4. Assign the script ID to a `script_id` variable. 5. Update the script by sending a request to `PATCH /api/v2/scripts/` with `$script_id` in the URL path and `$new_script` as data (in the request body). -InfluxDB returns the updated invocable script. +InfluxDB returns the updated invokable script. -## Delete an invocable script +## Delete an invokable script To delete a script, send a request using the `DELETE` method to the `/api/v2/scripts/SCRIPT_ID` InfluxDB API endpoint. Replace *`SCRIPT_ID`* with the ID of the script you want to update. 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/cloud/reference/release-notes/cloud-updates.md b/content/influxdb/cloud/reference/release-notes/cloud-updates.md index 4ad963857..6f8d4de2a 100644 --- a/content/influxdb/cloud/reference/release-notes/cloud-updates.md +++ b/content/influxdb/cloud/reference/release-notes/cloud-updates.md @@ -14,6 +14,31 @@ aliases: InfluxDB Cloud updates occur frequently. Find a compilation of recent updates below. To find information about the latest Flux updates in InfluxDB Cloud, see [Flux release notes](/influxdb/cloud/reference/release-notes/flux/). +## October 2021 + +- [API invokable scripts](#api-invokable-scripts) +- [New UI design](#new-ui-design) +- [Flux update](#flux-update) +- [Telegraf configuration UI](#telegraf-configuration-ui) + +### API invokable scripts + +Use [API invokable scripts](/influxdb/cloud/api-guide/api-invokable-scripts/) to assign and execute a script through an API endpoint. + +### New UI design + +Refresh the look and feel of InfluxDB Cloud UI. The updated icons, fonts, and layouts improve visibility, accessibility, and user experience. + + The updated icons, fonts, and layouts improve visibility, accessibility, and user experience. For those interested in the code, check out the [Clockface UI kit](https://github.com/influxdata/clockface). + +### Flux update + +Upgrade to [Flux v0.139](/flux/v0.x/release-notes/). + +### Telegraf configuration UI + +Update Telegraf configuration in the UI to make it easier to set up and configure Telegraf plugins. See how to [use the InfluxDB UI to generate and store new Telegraf plugins](/influxdb/cloud/telegraf-configs/create/#use-the-influxdb-ui). + ## September 2021 - **Paginated tasks in UI**: Previously, the Tasks page only listed the first 100 tasks. Now, all tasks are accessible and paginated on the Tasks page. diff --git a/content/influxdb/cloud/upgrade/v2-to-cloud.md b/content/influxdb/cloud/upgrade/v2-to-cloud.md index 40508d3fa..b2137b7df 100644 --- a/content/influxdb/cloud/upgrade/v2-to-cloud.md +++ b/content/influxdb/cloud/upgrade/v2-to-cloud.md @@ -208,44 +208,7 @@ to your InfluxDB Cloud instance. ## Dual write to InfluxDB 2.x and InfluxDB Cloud Update external clients to write to your InfluxDB Cloud instance. **We recommend writing data to both InfluxDB 2.x and InfluxDB Cloud until you -finish [migrating your existing time series data](#migrate-time-series-data)**. - -Configure external clients with your InfluxDB Cloud **host**, **organization**, -and **API token**. - -### Update Telegraf configurations -If using Telegraf configurations migrated to or stored in InfluxDB Cloud, -[update your Telegraf configurations](/influxdb/cloud/telegraf-configs/update/) -**in InfluxDB Cloud** to write to both InfluxDB 2.x and InfluxDB Cloud: - -1. [Update your Telegraf configuration](/influxdb/cloud/telegraf-configs/update/) - with a second `influxdb_v2` output to write to your InfluxDB Cloud instance. - - ##### Example dual-write Telegraf configuration - ```toml - # Write metrics to InfluxDB 2.x - [[outputs.influxdb_v2]] - urls = ["https://localhost:8086"] - token = "$INFLUX_TOKEN" - organization = "example-org" - bucket = "example-bucket" - - # Write metrics to InfluxDB Cloud - [[outputs.influxdb_v2]] - urls = ["https://cloud2.influxdata.com"] - token = "$INFLUX_CLOUD_TOKEN" - organization = "your.email@example.com" - bucket = "example-bucket" - ``` - -2. Add the following environment variables to your Telegraf environment(s): - - - `INFLUX_TOKEN`: InfluxDB 2.x API token - - `INFLUX_CLOUD_TOKEN`: InfluxDB Cloud API token - -3. Use the command provided in your [Telegraf Setup Instructions](/influxdb/cloud/telegraf-configs/#use-influxdb-telegraf-configurations) - to restart Telegraf with the updated configuration and begin writing to both - InfluxDB 2.x and InfluxDB Cloud. +finish [migrating your existing time series data](#migrate-time-series-data)**. For step-by-step instructions, see [Dual write](/influxdb/cloud/write-data/no-code/use-telegraf/dual-write/). ## Migrate time series data To migrate your time series data from your InfluxDB 2.x instance to your diff --git a/content/influxdb/cloud/write-data/no-code/use-telegraf/dual-write.md b/content/influxdb/cloud/write-data/no-code/use-telegraf/dual-write.md new file mode 100644 index 000000000..59c8d7f26 --- /dev/null +++ b/content/influxdb/cloud/write-data/no-code/use-telegraf/dual-write.md @@ -0,0 +1,10 @@ +--- +title: Dual write to InfluxDB OSS and InfluxDB Cloud +description: Write data to both OSS and Cloud simultaneously. +menu: + influxdb_cloud: + parent: Telegraf (agent) +weight: 201 +--- + +{{< 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/install.md b/content/influxdb/v2.1/install.md index fd3f8cde9..e9d766373 100644 --- a/content/influxdb/v2.1/install.md +++ b/content/influxdb/v2.1/install.md @@ -244,7 +244,7 @@ For information about installing the `influx` CLI, see sudo cp influxdb2-{{< latest-patch >}}-linux-amd64/influxd /usr/local/bin/ # arm - sudo cp influxdb2-{{< latest-patch >}}-linux-amd64/influxd /usr/local/bin/ + sudo cp influxdb2-{{< latest-patch >}}-linux-arm64/influxd /usr/local/bin/ ``` If you do not move the `influxd` binary into your `$PATH`, prefix the executable 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/content/influxdb/v2.1/tools/chronograf.md b/content/influxdb/v2.1/tools/chronograf.md index 1b6400040..1fb32b104 100644 --- a/content/influxdb/v2.1/tools/chronograf.md +++ b/content/influxdb/v2.1/tools/chronograf.md @@ -20,16 +20,15 @@ that provides an InfluxQL data explorer, Kapacitor integrations, and more. Continue to use Chronograf with **InfluxDB Cloud** and **InfluxDB OSS {{< current-version >}}** and the [1.x compatibility API](/influxdb/v2.1/reference/api/influxdb-1x/). + ## Create an InfluxDB connection 1. In Chronograf, click **Configuration** in the left navigation bar, and then click **{{< icon "plus" >}} Add Connection**. 2. Toggle the **InfluxDB v2 Auth** option at the bottom of the form. - {{< img-hd src="/img/influxdb/2-0-tools-chronograf-v2-auth.png" alt="InfluxDB v2 Auth toggle" />}} - 3. Enter your InfluxDB connection credentials: - **Connection URL:** InfluxDB URL _(see [InfluxDB Cloud regions](/influxdb/cloud/reference/regions/) - or [InfluxDB OSS URLs](/influxdb/v2.1/reference/urls/))_ + or [InfluxDB OSS URLs](/influxdb/%762.1/reference/urls/))_ ``` http://localhost:8086 @@ -43,7 +42,7 @@ Continue to use Chronograf with **InfluxDB Cloud** and **InfluxDB OSS {{< curren - **Default Retention Policy:** default [retention policy](/{{< latest "influxdb" "v1" >}}/concepts/glossary/#retention-policy-rp) _**(leave blank)**_ - {{% note %}} + {{% note %}} #### DBRPs map to InfluxDB buckets In InfluxDB Cloud and InfluxDB OSS {{< current-version >}}, database/retention-policy (DBRP) combinations are mapped to buckets using the `database-name/retention-policy` naming convention. @@ -51,7 +50,7 @@ are mapped to buckets using the `database-name/retention-policy` naming conventi For information, see [DBRP mapping](/influxdb/v2.1/reference/api/influxdb-1x/dbrp/) and [Map unmapped buckets](/influxdb/v2.1/query-data/influxql/#map-unmapped-buckets). - {{% /note %}} + {{% /note %}} 3. Click **Add Connection**. 4. Select the dashboards you would like to create, and then click **Next**. diff --git a/content/influxdb/v2.1/visualize-data/visualization-types/graph-single-stat.md b/content/influxdb/v2.1/visualize-data/visualization-types/graph-single-stat.md index 208420f93..2a69eaae9 100644 --- a/content/influxdb/v2.1/visualize-data/visualization-types/graph-single-stat.md +++ b/content/influxdb/v2.1/visualize-data/visualization-types/graph-single-stat.md @@ -137,4 +137,4 @@ from(bucket: "example-bucket") ) ``` ###### Memory allocations percentage visualization with static legend -{{< img-hd src="/img/influxdb/2-0-visualizations-graph-single-stat-static.png" alt="Graph + Single Stat Memory Usage Example" />}} +{{< img-hd src="/img/influxdb/2-0-visualizations-graph-single-stat-mem-8.png" alt="Graph + Single Stat Memory Usage Example" />}} diff --git a/content/influxdb/v2.1/write-data/no-code/use-telegraf/dual-write.md b/content/influxdb/v2.1/write-data/no-code/use-telegraf/dual-write.md new file mode 100644 index 000000000..bdba14b1d --- /dev/null +++ b/content/influxdb/v2.1/write-data/no-code/use-telegraf/dual-write.md @@ -0,0 +1,60 @@ +--- +title: Dual write to InfluxDB OSS and InfluxDB Cloud +description: Write data to both OSS and Cloud simultaneously. +menu: + influxdb_2_1: + parent: Telegraf (agent) +weight: 201 +--- + +If you want to back up your data in two places, or if you're migrating from OSS to Cloud, you may want to set up dual write. + +Use Telegraf to write to both InfluxDB OSS and InfluxDB Cloud simultaneously. + +The sample configuration below uses: + - The [InfluxDB v2 output plugin](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/influxdb_v2) twice: first pointing to the OSS instance and then to the cloud instance. + - Two different tokens, one for OSS and one for Cloud. You'll need to configure both tokens as environment variables (see [Configure your token as an environment variable](/influxdb/v2.1/write-data/no-code/use-telegraf/auto-config/#configure-your-token-as-an-environment-variable). + +Use the configuration below to write your data to both OSS and Cloud instances simultaneously. + +## Sample configuration + +``` +[[inputs.cpu]] +[[inputs.mem]] + +## Any other inputs, processors, aggregators that you want to include in your configuration. + +# Send data to InfluxDB OSS v2 +[[outputs.influxdb_v2]] + ## The URLs of the InfluxDB instance. + ## + ## Multiple URLs can be specified for a single cluster, only ONE of the + ## urls will be written to each interval. + ## urls exp: http://127.0.0.1:9999 + urls = ["http://localhost:8086"] + + ## OSS token for authentication. + token = "$INFLUX_TOKEN_OSS" + + ## Organization is the name of the organization you want to write to. It must already exist. + organization = "influxdata" + + ## Destination bucket to write to. + bucket = "telegraf" + +# Send data to InfluxDB Cloud - AWS West cloud instance + [[outputs.influxdb_v2]] + ## The URLs of the InfluxDB Cloud instance. + + urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"] + + ## Cloud token for authentication. + token = "$INFLUX_TOKEN_CLOUD" + + ## Organization is the name of the organization you want to write to. It must already exist. + organization = "example@domain.com" + + ## Destination bucket to write into. + bucket = "telegraf" + ``` diff --git a/content/telegraf/v1.20/administration/commands.md b/content/telegraf/v1.20/administration/commands.md new file mode 100644 index 000000000..796386c47 --- /dev/null +++ b/content/telegraf/v1.20/administration/commands.md @@ -0,0 +1,91 @@ +--- +title: Telegraf commands and flags +description: The `telegraf` command starts and runs all the processes necessary for Telegraf to function. +menu: + telegraf_1_20: + name: Commands + weight: 20 + parent: Administration +--- + +The `telegraf` command starts and runs all the processes necessary for Telegraf to function. + +## Usage + +``` +telegraf [commands] +telegraf [flags] +``` + +## Commands + + + +| Command | Description | +| :-------- | :--------------------------------------------- | +| `config` | Print out full sample configuration to stdout. | +| `version` | Print version to stdout. | + +## Flags + +| Flag | Description | +| :------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------- | +| `--aggregator-filter ` | Filter aggregators to enable. Separator is `:`. | +| `--config ` | Configuration file to load. | +| `--config-directory ` | Directory containing additional `*.conf` files. | +| `--watch-config` | Restart Telegraf on local configuration changes. Use either fs notifications (`inotify`) or polling (`poll`). Disabled by default | +| `--plugin-directory ` | Directory containing `*.so` files to search recursively for plugins. Found plugins are loaded, tagged, and identified. | +| `--debug` | Enable debug logging. | +| `--input-filter ` | Filter input plugins to enable. Separator is `:`. | +| `--input-list` | Print available input plugins. | +| `--output-filter` | Filter output plugins to enable. Separator is `:`. | +| `--output-list` | Print available output plugins. | +| `--pidfile ` | File to write PID to. | +| `--pprof-addr
` | pprof address to listen on. Disabled by default. | +| `--processor-filter ` | Filter processor plugins to enable. Separator is `:`. | +| `--quiet` | Run in quiet mode. | +| `--section-filter ` | Filter configuration sections to output (`agent`, `global_tags`, `outputs`, `processors`, `aggregators` and `inputs`). Separator is `:`. | +| `--sample-config` | Print full sample configuration. | +| `--once` | Gather metrics once, write them, and exit. | +| `--test` | Gather metrics once and print them. | +| `--test-wait` | Number of seconds to wait for service inputs to complete in test or once mode. | +| `--usage ` | Print plugin usage (example: `telegraf --usage mysql`). | +| `--version` | Print Telegraf version. | + +## Examples + +### Generate a Telegraf configuration file + +```sh +telegraf config > telegraf.conf +``` + +### Generate configuration with only CPU input and InfluxDB output plugins defined + +```sh +telegraf --input-filter cpu --output-filter influxdb config +``` + +### Run a single Telegraf configuration, outputting metrics to stdout + +```sh +telegraf --config telegraf.conf --test +``` + +### Run Telegraf with all plugins defined in configuration file** + +```sh +telegraf --config telegraf.conf +``` + +### Run Telegraf, enabling the CPU and memory input plugins and InfluxDB output plugin** + +```sh +telegraf --config telegraf.conf --input-filter cpu:mem --output-filter influxdb +``` + +### Run Telegraf with pprof + +```sh +telegraf --config telegraf.conf --pprof-addr localhost:6060 +``` diff --git a/data/telegraf_plugins.yml b/data/telegraf_plugins.yml index a96ea5d44..2dc2ccc61 100644 --- a/data/telegraf_plugins.yml +++ b/data/telegraf_plugins.yml @@ -1655,6 +1655,13 @@ input: introduced: 1.3.0 tags: [linux, macos, windows, networking] + - name: SQL + id: sql + description: | + The SQL plugin reads and ingests SQL data from a variety of SQL databases into InfluxDB. + introduced: 1.19.0 + tags: [linux, macos, windows, data-stores] + - name: Stackdriver id: stackdriver description: | @@ -2159,7 +2166,7 @@ output: - name: InfluxDB v2 id: influxdb_v2 description: | - The InfluxDB v2 output plugin writes metrics to [InfluxDB 2.0](https://github.com/influxdata/influxdb). + The InfluxDB v2 output plugin writes metrics to [InfluxDB 2.x](https://github.com/influxdata/influxdb) OSS or Cloud. introduced: 1.8.0 tags: [linux, macos, windows, data-stores] 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") -}} diff --git a/shared/text/api/v2.0/api-invocable-scripts/create-flux-script.sh b/shared/text/api/v2.0/api-invokable-scripts/create-flux-script.sh similarity index 100% rename from shared/text/api/v2.0/api-invocable-scripts/create-flux-script.sh rename to shared/text/api/v2.0/api-invokable-scripts/create-flux-script.sh diff --git a/shared/text/api/v2.0/api-invocable-scripts/find.sh b/shared/text/api/v2.0/api-invokable-scripts/find.sh similarity index 100% rename from shared/text/api/v2.0/api-invocable-scripts/find.sh rename to shared/text/api/v2.0/api-invokable-scripts/find.sh diff --git a/shared/text/api/v2.0/api-invocable-scripts/invoke-post.sh b/shared/text/api/v2.0/api-invokable-scripts/invoke-post.sh similarity index 100% rename from shared/text/api/v2.0/api-invocable-scripts/invoke-post.sh rename to shared/text/api/v2.0/api-invokable-scripts/invoke-post.sh diff --git a/shared/text/api/v2.0/api-invocable-scripts/invoke_with_params.sh b/shared/text/api/v2.0/api-invokable-scripts/invoke_with_params.sh similarity index 100% rename from shared/text/api/v2.0/api-invocable-scripts/invoke_with_params.sh rename to shared/text/api/v2.0/api-invokable-scripts/invoke_with_params.sh diff --git a/shared/text/api/v2.0/api-invocable-scripts/list.sh b/shared/text/api/v2.0/api-invokable-scripts/list.sh similarity index 100% rename from shared/text/api/v2.0/api-invocable-scripts/list.sh rename to shared/text/api/v2.0/api-invokable-scripts/list.sh diff --git a/shared/text/api/v2.0/api-invocable-scripts/update-flux-script.sh b/shared/text/api/v2.0/api-invokable-scripts/update-flux-script.sh similarity index 100% rename from shared/text/api/v2.0/api-invocable-scripts/update-flux-script.sh rename to shared/text/api/v2.0/api-invokable-scripts/update-flux-script.sh