Skip to content

Commit

Permalink
feat: add support for windows node metrics (#3569)
Browse files Browse the repository at this point in the history
* feat: add Prometheus Windows Exporter as optional chart dependency

Signed-off-by: Dominik Rosiek <[email protected]>

* Update docs/README.md

Co-authored-by: Mikołaj Świątek <[email protected]>

* docs(windows): add information that windows support is experimental

Signed-off-by: Dominik Rosiek <[email protected]>

* chore: make format

Signed-off-by: Dominik Rosiek <[email protected]>

* docs: add info that windows support is experimental

Signed-off-by: Dominik Rosiek <[email protected]>

---------

Signed-off-by: Dominik Rosiek <[email protected]>
Co-authored-by: Mikołaj Świątek <[email protected]>
  • Loading branch information
sumo-drosiek and swiatekm authored Mar 1, 2024
1 parent 8a444b8 commit 8bb842b
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 0 deletions.
1 change: 1 addition & 0 deletions .changelog/3569.added.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
feat: add Prometheus Windows Exporter as optional chart dependency
4 changes: 4 additions & 0 deletions deploy/helm/sumologic/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ dependencies:
version: 0.47.1
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
condition: opentelemetry-operator.enabled,sumologic.metrics.collector.otelcol.enabled
- name: prometheus-windows-exporter
repository: https://prometheus-community.github.io/helm-charts
version: "0.3.*"
condition: prometheus-windows-exporter.enabled,sumologic.metrics.collector.otelcol.enabled
5 changes: 5 additions & 0 deletions deploy/helm/sumologic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ To see all available configuration for our sub-charts, please refer to their doc
- [Kube-Prometheus-Stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack#configuration) - All
Kube Prometheus Stack properties should be prefixed with `kube-prometheus-stack.` in our `values.yaml` to override a property not listed
below.
- [Prometheus Windows Exporter](https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-windows-exporter#configuring) -
All Kube Prometheus Stack properties should be prefixed with `prometheus-windows-exporter.` in our `values.yaml` to override a property
not listed below.
- [Metrics Server](https://github.com/bitnami/charts/tree/master/bitnami/metrics-server/#parameters) - All Metrics Server properties should
be prefixed with `metrics-server.` in our `values.yaml` to override a property not listed below.
- [Tailing Sidecar Operator](https://github.com/SumoLogic/tailing-sidecar/tree/main/helm/tailing-sidecar-operator#configuration) - All
Expand Down Expand Up @@ -253,6 +256,8 @@ The following table lists the configurable parameters of the Sumo Logic chart an
| `kube-prometheus-stack.prometheus.prometheusSpec.scrapeInterval` | Prometheus metrics scrape interval. If not set, the Prometheus default scrape interval is used. | `30s` |
| `kube-prometheus-stack.prometheus.serviceMonitor.selfMonitor` | Enable scraping Prometheus metrics | `false` |
| `kube-prometheus-stack.prometheus.prometheusSpec.nodeSelector` | Node selector for prometheus. [See help.sumologic.com/docs/send-data/kubernetes/best-practices for more information.](https://help.sumologic.com/docs/send-data/kubernetes/best-practices/) | `{"kubernetes.io/os": "linux"}` |
| `prometheus-windows-exporter.enabled` | Set it to `true` to enable Prometheus Windows Exporter. It will gather metrics from Windows nodes. This is an experimental feature and may be subject of breaking changes. | `false` |
| `prometheus-windows-exporter` | Configuration for Prometheus Windows Exporter. [See external documentation.](https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-windows-exporter#configuring) | See [values.yaml] |
| `falco.enabled` | Flag to control deploying Falco Helm sub-chart. | `false` |
| `falco.fullnameOverride` | Used to override the chart's full name. | `Nil` |
| `falco.addKernelDevel` | Flag to control installation of `kernel-devel` on nodes using MachineConfig, required to build falco modules (only for OpenShift) | `true` |
Expand Down
26 changes: 26 additions & 0 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,32 @@ kube-prometheus-stack:
serviceMonitor:
selfMonitor: false

## Configuration for prometheus-windows-exporter
## ref: https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-windows-exporter
## This is an experimental feature
prometheus-windows-exporter:
enabled: false

## Enable ServiceMonitor and set Kubernetes label to use as a job label
##
prometheus:
monitor:
enabled: true
jobLabel: jobLabel

releaseLabel: true

## Set job label to 'windows-exporter' as required by the default Prometheus rules and Grafana dashboards
##
podLabels:
jobLabel: windows-exporter

## Enable memory and container metrics as required by the default Prometheus rules and Grafana dashboards
##
config: |-
collectors:
enabled: '[defaults],memory,container'
## Configure otelcol-instrumentation - Sumo OTel Distro Collector
## ref: https://github.com/SumoLogic/sumologic-kubernetes-collection/blob/main/docs/opentelemetry-collector/traces.md
otelcolInstrumentation:
Expand Down
15 changes: 15 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,18 @@ environment, don't hesitate to open an [issue][issues] describing them.
### Falco support

Falco is embedded in this Helm Chart for user convenience only - Sumo Logic does not provide production support for it.

### Windows nodes support

Support for Windows is experimental.

Windows nodes are supported only for metrics collection. To enable it, add the following configuration to your `user-values.yaml`

```yaml
prometheus-windows-exporter:
enabled: true
```
It will send `windows_` prefixed metrics to Sumo Logic.

> [!NOTE] We currently do not have dashboards using using these metrics.
30 changes: 30 additions & 0 deletions docs/windows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Windows support

Windows support is under evaluation and is experimental. This document describes issues which should be resolved before claiming full
support for windows.

## Running collection on windows nodes

In order to fully support windows nodes, the following issues should be addressed:

- Windows nodes do not support linux filesystems
- We should use HostProcess Containers to support log collection
- Lack of windows supported containers

### Known Issues

If pod stuck in Container Creating state, and shows the following error:

```text
Warning FailedCreatePodSandBox 4s (x2 over 18s) kubelet (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "6b7584ff75fd07362dd40aa18319998ae6f2b0afb78a391d773c953a17216c55": plugin type="vpc-bridge" name="vpc" failed (add): failed to parse Kubernetes args: failed to get pod IP address collection-sumologic-otelcol-logs-2: error executing k8s connector: error executing connector binary: exit status 1 with execution error: pod collection-sumologic-otelcol-logs-2 does not have label vpc.amazonaws.com/PrivateIPv4Address
```

You need to add the following resource configuration:

```yaml
resources:
limits:
vpc.amazonaws.com/PrivateIPv4Address: 1
requests:
vpc.amazonaws.com/PrivateIPv4Address: 1
```

0 comments on commit 8bb842b

Please sign in to comment.