diff --git a/integrations/prometheus/node-exporter-metrics/CHANGELOG.md b/integrations/prometheus/node-exporter-metrics/CHANGELOG.md index 18e7edef..fad7f402 100644 --- a/integrations/prometheus/node-exporter-metrics/CHANGELOG.md +++ b/integrations/prometheus/node-exporter-metrics/CHANGELOG.md @@ -7,7 +7,13 @@ to [Semantic Versioning][semver]. ## Unreleased -- N/A +- Remove linux and darwin tags and subscriptions in integraton yaml +- Move labels to the subscription screen in the integration yaml +- Revise text labels and prompts in configuration modal +- Add summary for success screen in integration yaml file +- Add interval patch in integration yaml +- Add and revise setup steps and options in README +- Update reference documentation list in README ## [ 20220421.0.0 ] - 2022-04-21 diff --git a/integrations/prometheus/node-exporter-metrics/README.md b/integrations/prometheus/node-exporter-metrics/README.md index 3426f077..5d4fba26 100644 --- a/integrations/prometheus/node-exporter-metrics/README.md +++ b/integrations/prometheus/node-exporter-metrics/README.md @@ -2,13 +2,13 @@ -The Prometheus `node_exporter` metrics monitoring integration provides metrics from hosts running the [Prometheus `node_exporter`](https://github.com/prometheus/node_exporter#readme) (Linux/macOS hosts). +The Prometheus Node Exporter Metrics integration collects metrics from Linux and macOS hosts running the [Prometheus `node_exporter`][prom-node-exp]. -Use the related [Prometheus `windows_exporter`](https://github.com/prometheus-community/windows_exporter#readme) integration for Windows hosts. +**NOTE**: For Windows hosts, use Sensu's Prometheus Windows Exporter integration. -This integration includes the following resources: +This integration includes the following Sensu resources: * `node-exporter-metrics` [check] * `sensu/http-checks:0.7.0` [asset] @@ -21,46 +21,71 @@ This integration includes the following resources: -There are no compatible dashboards for this integration. +The Prometheus Node Exporter Metrics integration does not have compatible dashboards. ## Setup -1. **[OPTIONAL] Configure custom request headers** +1. Get the Prometheus target URL. You will need these target URL elements to install this integration: - To add custom request headers, install this integration, then modify the resulting Sensu Check resource with one or more `--header` flags. + - Protocol (`http` or `https`) + - Host (hostname, IP address, or domain name) + - Port number (default is `9100`) + - Path (default is `/metrics`) - Example: +1. Decide which Sensu agents should execute the `node-exporter-metrics` check. You will need the agent [subscription] names when you install this integration. + + **Optional**: Create subscription names that map to the hosts that are running Prometheus. + +1. If you want to use a Sensu [pipeline] to process Prometheus Node Exporter Metrics integration data, you will need the pipeline name when you install this integration. + +1. **Optional** Configure custom request headers. + + To use custom request headers, install the Prometheus Node Exporter Metrics integration. Then, update the `node-exporter-metrics` check to add one or more `--header` flags in the check's `command` attribute. + +
Example: Custom request header configuration ```yaml spec: command: >- http-get --timeout 10 - --url "http://127.0.0.1:9100/ + --url "http://127.0.0.1:9100" --header "Content-Type: text/plain" --header "X-Example-Header: helloworld" ``` +
+
+ ## Plugins +The Prometheus Node Exporter Metrics uses the following Sensu [plugins]: + - [sensu/http-checks][http-checks-bonsai] ([GitHub][http-checks-github]) -## Metrics & Events +## Alerts + + + +The Prometheus Node Exporter Metrics integration does not produce any events that should be processed by an alert or incident management pipeline. + +## Metrics -This integration collects a wide range of [metrics], depending on the configuration of your Prometheus `node_exporter` and the platform that it is running on. For a full list, see the [`node_exporter` documentation](https://github.com/prometheus/node_exporter#readme). +The Prometheus Node Exporter Metrics integration collects many [metrics], depending on the Prometheus `node_exporter` configuration and the operating system version that it is running on. For a complete list of metrics, read the [Prometheus `node_exporter` documentation][prom-node-exp]. -# Reference Documentation +## Reference Documentation -1. This integration uses [Sensu Tokens][tokens] for variable substitution. +* [Token substitution] (Sensu documentation): the Prometheus Node Exporter Metrics integration supports Sensu tokens for variable substitution with data from Sensu entities + [entity]: https://docs.sensu.io/sensu-go/latest/observability-pipeline/observe-entities/entities/ @@ -76,7 +101,9 @@ This integration collects a wide range of [metrics], depending on the configurat [pipeline]: https://docs.sensu.io/sensu-go/latest/observability-pipeline/observe-process/pipelines/ [secret]: https://docs.sensu.io/sensu-go/latest/operations/manage-secrets/secrets/ [secrets]: https://docs.sensu.io/sensu-go/latest/operations/manage-secrets/secrets/ -[tokens]: https://docs.sensu.io/sensu-go/latest/observability-pipeline/observe-schedule/tokens/ +[Token substitution]: https://docs.sensu.io/sensu-go/latest/observability-pipeline/observe-schedule/tokens/ [sensu-plus]: https://sensu.io/features/analytics [http-checks-bonsai]: https://bonsai.sensu.io/assets/sensu/http-checks [http-checks-github]: https://github.com/sensu/http-checks +[prom-win-exp]: https://github.com/prometheus-community/windows_exporter#readme +[prom-node-exp]: https://github.com/prometheus/node_exporter#readme diff --git a/integrations/prometheus/node-exporter-metrics/sensu-integration.yaml b/integrations/prometheus/node-exporter-metrics/sensu-integration.yaml index 62512b72..ad94781a 100644 --- a/integrations/prometheus/node-exporter-metrics/sensu-integration.yaml +++ b/integrations/prometheus/node-exporter-metrics/sensu-integration.yaml @@ -7,7 +7,7 @@ metadata: spec: class: community provider: monitoring - display_name: Prometheus node_exporter monitoring + display_name: Prometheus Node Exporter Metrics short_description: Collect metrics from Prometheus node_exporter supported_platforms: - darwin @@ -16,8 +16,6 @@ spec: - metrics - prometheus - node_exporter - - linux - - darwin contributors: - "@sensu" - "@thoward" @@ -27,22 +25,22 @@ spec: title: Node Exporter Metrics HTTP Endpoint Configuration - type: markdown body: | - Configure HTTP Endpoint monitoring with the following parameters: + Provide these configuration parameters for the Prometheus `node_exporter` HTTP endpoint: - * **URL**: the target URL to monitor (e.g. `https://api.mycompany.com:443/health`) - * **Protocol**: select http or https request - * **Host**: provide a hostname, IP address, or domain name - * **Port**: provide the port to check (e.g. `80` for HTTP, `443` for HTTPS) - * **Path**: provide the URL path to check (e.g. `/healthz`) - * **Interval**: how often to monitor the HTTP endpoint (in seconds) + * Target URL to collect metrics from, such as `https://127.0.0.1:9100/metrics`, separated into: + * Protocol (`http` or `https`) + * Host (hostname, IP address, or domain name) + * Port number + * Path (e.g. `/metrics`) + * Interval for collecting metrics from the endpoint (in seconds) - type: question name: protocol required: true input: type: string - title: HTTP Endpoint Protocol + title: Target URL protocol description: >- - Provide the HTTP endpoint protocol (i.e. "http" or "https"). + Select the protocol for the Prometheus `node_exporter` target URL (`http` or `https`) enum: - http - https @@ -52,27 +50,27 @@ spec: required: true input: type: string - title: HTTP Endpoint Host + title: Target URL host description: >- - Provide the HTTP endpoint host (e.g. "127.0.0.1") + Enter the host for the Prometheus `node_exporter` target URL default: 127.0.0.1 - type: question name: port required: true input: type: integer - title: HTTP Endpoint Port + title: Target URL port description: >- - Provide the HTTP endpoint port (e.g. 9100 is the default for node_exporter) + Enter the port for the Prometheus `node_exporter` target URL (`node_exporter` default is `9100`) default: 9100 - type: question name: path required: true input: type: string - title: HTTP Endpoint Path + title: Target URL path description: >- - Provide the HTTP endpoint path (e.g. "/metrics"; NOTE: this configuration MUST begin with a "/") + Enter the path for the Prometheus `node_exporter` target URL (MUST begin with `/`) default: "/metrics" - type: question name: interval @@ -80,52 +78,48 @@ spec: type: integer title: Interval description: >- - Configure the HTTP endpoint monitoring interval, in seconds (60 = one minute, 300 = five minutes, 600 = 10 minutes, etc) + Specify the metrics collection interval, in seconds (60 = 1 minute, 300 = 5 minutes, 600 = 10 minutes) default: 30 - - type: question - name: labels - input: - type: object - title: Labels - description: Key/value metadata - format: io.sensu.meta.label - additionalProperties: - type: string - type: section - title: Configure Sensu Subscriptions + title: Check Labels and Sensu Subscriptions - type: markdown body: | - Configure which Sensu Agent subscriptions this check should be run on. - - E.G. A subscription that maps to the hosts that are running Prometheus `node_exporter`. + Specify the subscriptions for Sensu agents that should execute the `node-exporter-metrics` check and the metadata labels to add to the check definition. - type: question name: subscriptions input: type: array items: type: string - title: Subscriptions (Origins) + title: Subscriptions ref: core/v2/entity/subscriptions default: - prometheus - node_exporter - - linux - - darwin + - type: question + name: labels + input: + type: object + title: Check labels + description: Add metadata labels for the `node-exporter-metrics` check + format: io.sensu.meta.label + additionalProperties: + type: string - type: section title: Pipeline Configuration - type: markdown body: | - Configure one or more [pipelines] for processing Prometheus `node_exporter` metrics. + Name the [pipelines] you want to use to process Prometheus Node Exporter Metrics integration data. - [pipelines]: https://docs.sensu.io/sensu-go/latest/observability-pipeline/ + [pipelines]: https://docs.sensu.io/sensu-go/latest/observability-pipeline/observe-process/pipelines/ - type: question name: metrics_pipeline required: false input: type: string - title: Metrics Pipeline + title: Metrics pipeline name description: >- - How do you want to process metrics collected by this integration? + Which pipeline do you want to use to process the metrics this integration collects? ref: core/v2/pipeline/metadata/name refFilter: .labels.provider == "metrics" resource_patches: @@ -143,6 +137,9 @@ spec: http-get --timeout 10 --url "[[protocol]]://[[host]]:[[port]][[path]]" + - op: replace + path: /spec/interval + value: interval - op: replace path: /spec/subscriptions value: subscriptions @@ -157,4 +154,11 @@ spec: api_version: core/v2 type: Pipeline name: "[[metrics_pipeline]]" - + post_install: + - type: section + title: Success + - type: markdown + body: | + You enabled the Prometheus Node Exporter Metrics integration for `[[protocol]]://[[host]]:[[port]][[path]]`. + + The `node-exporter-metrics` check will run for all Sensu agents with these subscriptions: [[subscriptions]]. \ No newline at end of file