Chase Hainey
e9fac00516
feat: Add mssql collector and analyser ( #990 )
...
* Adds MSSQL collector based on Postgres collector
* Adds tests for MSSQL based on the tests for Postgres
* Adds analyzer
* Adds MS SQL Server example
* Assures MS SQL tests pass
* Aligns naming and adds to API
* Corrects names that weren't updated
* Updates text on sample
* Corrects typo
* Makes troubleshoot aware of mssql
* Uses Hashicorp version library for SQL Server versions
* Resyncs generated file
* Cleaning up the workspace.
* Updates schemas per PR feedback
* Unit Tests.
* fix: address runtime error of nil pointer when concatenating preflight specs (#998 )
fix: address runtime error of nil pointer when concatenating preflight spec with hostpreflight spec in preflight run.go
* chore: chore: update binaries used to build manifests and k8s (#997 )
- client-gen version from v0.22.0 to v0.26.1
- controller-gen version from v0.7.0 to v0.11.2
- k8s pacth from 1.26.0 to 1.26.1
* Deduplication for In-Cluster Collectors (#972 )
* adding dedup for in cluster collectors
* add tests
* return collector as is whenever marshalling to json fails
---------
Co-authored-by: Evans Mungai <evans@replicated.com >
* refactor: keep support bundle concat logic to be consistent with Preflight concat (#1002 )
* refactor: keep support bundle concat logic to be consistent with Preflight
* test: add tests for support bundle spec concat function
* chore: Refactor in cluster analysers (#999 )
Have all in-cluster analysers implement the same interface. This
will help with the implementation of code that requires making
calls to all analysers
Fixes #995
* feat: Record summary of execution times of support bundle operations (collect/redact/analyse) (#935 )
When running a support bundle, we want to know how long each operation
(collect, redact, analyze) takes. This commit adds a new trace exporter
that records the start and end times of each operation, and then prints
a summary of the execution. The summary is also stored in the support
bundle.
Related to #923
* chore(deps): bump sigs.k8s.io/controller-runtime from 0.14.2 to 0.14.4 (#1006 )
Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime ) from 0.14.2 to 0.14.4.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases )
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/master/RELEASE.md )
- [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.14.2...v0.14.4 )
---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump github.com/shirou/gopsutil/v3 from 3.22.12 to 3.23.1 (#1007 )
Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil ) from 3.22.12 to 3.23.1.
- [Release notes](https://github.com/shirou/gopsutil/releases )
- [Commits](https://github.com/shirou/gopsutil/compare/v3.22.12...v3.23.1 )
---
updated-dependencies:
- dependency-name: github.com/shirou/gopsutil/v3
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: Don't hardcode /bin/bash (#1011 )
Bash is not always installed in /bin/bash. Mitigate that by relying on
bash being in PATH.
* chore: Don't print which error in Makefile (#1012 )
The which binary is used to detect if client-gen is installed, and if
it's not, the Makefile will install it. The initial detection prints
an error if it's not found. This is misleading, as it is actually an
expected situation.
* chore: remove unused code (#1013 )
Remove code snippets that are not used across the codebase.
* remove PR label enforcement workflow (#1015 )
* chore(deps): bump go.opentelemetry.io/otel/sdk from 1.11.2 to 1.13.0 (#1020 )
Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go ) from 1.11.2 to 1.13.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.11.2...v1.13.0 )
---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/sdk
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump golang.org/x/text from 0.6.0 to 0.7.0 (#1017 )
Bumps [golang.org/x/text](https://github.com/golang/text ) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/golang/text/releases )
- [Commits](https://github.com/golang/text/compare/v0.6.0...v0.7.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/text
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump github.com/jackc/pgx/v5 from 5.2.0 to 5.3.0 (#1018 )
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx ) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/jackc/pgx/releases )
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md )
- [Commits](https://github.com/jackc/pgx/compare/v5.2.0...v5.3.0 )
---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v5
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump github.com/hashicorp/go-getter from 1.6.2 to 1.7.0 (#1019 )
Bumps [github.com/hashicorp/go-getter](https://github.com/hashicorp/go-getter ) from 1.6.2 to 1.7.0.
- [Release notes](https://github.com/hashicorp/go-getter/releases )
- [Changelog](https://github.com/hashicorp/go-getter/blob/main/.goreleaser.yml )
- [Commits](https://github.com/hashicorp/go-getter/compare/v1.6.2...v1.7.0 )
---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-getter
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat(support-bundle): print progress in debug non-interactive mode (#1010 )
Currently, there's no debug logs whatsoever when running a command like
troubleshoot --debug --interactive=false
Tackle this by printing similar log statements as presented in
interactive mode to the debug logger. Refactor the code a bit so there's
no need for a dedicated finished channel and to exit the goroutines
properly.
Co-authored-by: Evans Mungai <evans@replicated.com >
* chore(deps): bump github.com/containerd/containerd from 1.6.12 to 1.6.18 (#1021 )
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd ) from 1.6.12 to 1.6.18.
- [Release notes](https://github.com/containerd/containerd/releases )
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md )
- [Commits](https://github.com/containerd/containerd/compare/v1.6.12...v1.6.18 )
---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump golang.org/x/net from 0.6.0 to 0.7.0 (#1025 )
Bumps [golang.org/x/net](https://github.com/golang/net ) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases )
- [Commits](https://github.com/golang/net/compare/v0.6.0...v0.7.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/net
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump github.com/containers/image/v5 from 5.24.0 to 5.24.1 (#1026 )
Bumps [github.com/containers/image/v5](https://github.com/containers/image ) from 5.24.0 to 5.24.1.
- [Release notes](https://github.com/containers/image/releases )
- [Commits](https://github.com/containers/image/compare/v5.24.0...v5.24.1 )
---
updated-dependencies:
- dependency-name: github.com/containers/image/v5
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update README to add link for the docs (#1022 )
Co-authored-by: Evans Mungai <evans@replicated.com >
* feat: use klog as the default logging library (#1008 )
* chore(deps): bump github.com/shirou/gopsutil/v3 from 3.23.1 to 3.23.2 (#1043 )
Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil ) from 3.23.1 to 3.23.2.
- [Release notes](https://github.com/shirou/gopsutil/releases )
- [Commits](https://github.com/shirou/gopsutil/compare/v3.23.1...v3.23.2 )
---
updated-dependencies:
- dependency-name: github.com/shirou/gopsutil/v3
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump go.opentelemetry.io/otel from 1.13.0 to 1.14.0 (#1040 )
Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go ) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.13.0...v1.14.0 )
---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump github.com/containers/image/v5 from 5.24.1 to 5.24.2 (#1038 )
Bumps [github.com/containers/image/v5](https://github.com/containers/image ) from 5.24.1 to 5.24.2.
- [Release notes](https://github.com/containers/image/releases )
- [Commits](https://github.com/containers/image/compare/v5.24.1...v5.24.2 )
---
updated-dependencies:
- dependency-name: github.com/containers/image/v5
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: support for rhel 9 variants (rhel, centos, ol, rocky) (#1045 )
* fix: Use namespace from the collector spec for Ceph (#1042 )
use namespace from the collector spec for ceph
* chore(deps): bump go.opentelemetry.io/otel/sdk from 1.13.0 to 1.14.0 (#1039 )
Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go ) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.13.0...v1.14.0 )
---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/sdk
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Collector/Analyzer - Subnet Available (#1004 )
* Adding a new Subnet Available Collector and Analyzer, used to check if a subnet is available for use on a K8s node.
* chore(deps): bump k8s.io/apimachinery from 0.26.1 to 0.26.2 (#1050 )
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery ) from 0.26.1 to 0.26.2.
- [Release notes](https://github.com/kubernetes/apimachinery/releases )
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.26.1...v0.26.2 )
---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump sigs.k8s.io/controller-runtime from 0.14.4 to 0.14.5 (#1048 )
Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime ) from 0.14.4 to 0.14.5.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases )
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md )
- [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.14.4...v0.14.5 )
---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* dont run tests on draft PRs (#966 )
Co-authored-by: Xav Paice <xavpaice@users.noreply.github.com >
* chore(deps): bump k8s.io/klog/v2 from 2.90.0 to 2.90.1 (#1052 )
Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog ) from 2.90.0 to 2.90.1.
- [Release notes](https://github.com/kubernetes/klog/releases )
- [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md )
- [Commits](https://github.com/kubernetes/klog/compare/v2.90.0...v2.90.1 )
---
updated-dependencies:
- dependency-name: k8s.io/klog/v2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump k8s.io/cli-runtime from 0.26.1 to 0.26.2 (#1049 )
Bumps [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime ) from 0.26.1 to 0.26.2.
- [Release notes](https://github.com/kubernetes/cli-runtime/releases )
- [Commits](https://github.com/kubernetes/cli-runtime/compare/v0.26.1...v0.26.2 )
---
updated-dependencies:
- dependency-name: k8s.io/cli-runtime
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump k8s.io/apiextensions-apiserver from 0.26.1 to 0.26.2 (#1051 )
* chore(deps): bump k8s.io/apiextensions-apiserver from 0.26.1 to 0.26.2
Bumps [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver ) from 0.26.1 to 0.26.2.
- [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases )
- [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.26.1...v0.26.2 )
---
updated-dependencies:
- dependency-name: k8s.io/apiextensions-apiserver
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
* chore(deps): bump k8s.io/klog/v2 from 2.90.0 to 2.90.1 (#1052 )
Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog ) from 2.90.0 to 2.90.1.
- [Release notes](https://github.com/kubernetes/klog/releases )
- [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md )
- [Commits](https://github.com/kubernetes/klog/compare/v2.90.0...v2.90.1 )
---
updated-dependencies:
- dependency-name: k8s.io/klog/v2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump k8s.io/cli-runtime from 0.26.1 to 0.26.2 (#1049 )
Bumps [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime ) from 0.26.1 to 0.26.2.
- [Release notes](https://github.com/kubernetes/cli-runtime/releases )
- [Commits](https://github.com/kubernetes/cli-runtime/compare/v0.26.1...v0.26.2 )
---
updated-dependencies:
- dependency-name: k8s.io/cli-runtime
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump k8s.io/apiextensions-apiserver from 0.26.1 to 0.26.2
Bumps [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver ) from 0.26.1 to 0.26.2.
- [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases )
- [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.26.1...v0.26.2 )
---
updated-dependencies:
- dependency-name: k8s.io/apiextensions-apiserver
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
* Update go.sum
---------
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Evans Mungai <evans@replicated.com >
* Adds MSSQL collector based on Postgres collector
* Missed a merge conflict.
* More merge conflicts fixed.
* Ran go mod tidy.
* Fixed the function name return.
---------
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: Chuck D'Antonio <chuck@crdant.io >
Co-authored-by: yunju.lly <yunju.lly@infracreate.com >
Co-authored-by: Camila Macedo <7708031+camilamacedo86@users.noreply.github.com >
Co-authored-by: Diamon Wiggins <38189728+diamonwiggins@users.noreply.github.com >
Co-authored-by: Evans Mungai <evans@replicated.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Wieczorek <twz123@users.noreply.github.com >
Co-authored-by: Nick Meyer <nickm@replicated.com >
Co-authored-by: Ethan Mosbaugh <ethan@replicated.com >
Co-authored-by: Nathan Sullivan <nathans@replicated.com >
Co-authored-by: ada mancini <adamancini@users.noreply.github.com >
Co-authored-by: Xav Paice <xavpaice@users.noreply.github.com >
2023-03-27 16:06:27 +01:00
Nathan Sullivan
f3db02a200
Collector/Analyzer - Subnet Available ( #1004 )
...
* Adding a new Subnet Available Collector and Analyzer, used to check if a subnet is available for use on a K8s node.
2023-03-10 12:52:21 +10:00
Ethan Mosbaugh
3419a9b888
feat: support for rhel 9 variants (rhel, centos, ol, rocky) ( #1045 )
2023-03-08 06:29:16 -08:00
Ethan Mosbaugh
ad1a56251f
feat(hostpreflights): udp port status ( #981 )
...
* feat(hostpreflights): udp port status
* fix(hostpreflights): tcpPortStatus -> udpPortStatus
2023-01-24 16:38:54 -05:00
ada mancini
0f2892c316
add cpuArchitecture filter to nodeResources collector ( #930 )
...
* filter on cpu architecture
* filter by cpu architecture
* fail if we dont have a label match too
* add tests for cpu arch filter
* update for make schemas
2022-12-29 12:17:11 -05:00
Evans Mungai
2a61a8686a
feat(collectors): Add TLS parameters to the postgres collector ( #875 )
...
For a postgres collector spec targeting a server configured to accept
(m)TLS connections we need to pass in the necessary parameters in order
to successfully connect to the server. Both preflight and support bundle
specs use this collector.
This change allows us to pass in the necessary TLS parameters via inlined
TLS configuration or via a secret reference.
Fixes #747
2022-11-30 15:52:08 +13:00
Evans Mungai
bfb77ad601
feat(collectors): Add TLS parameters to the redis collector ( #870 )
...
feat(collectors): Add mTLS parameters to the redis collector
For a redis collector spec targeting a redis server configured to accept
(m)TLS connections we need to pass in the necessary TLS parameters in order
to successfully connect to the server. Both preflight and support bundle
specs use this collector.
This change allows us to pass in the necessary TLS parameters via inlined
TLS configuration or via a secret reference.
Fixes #746
2022-11-29 17:47:52 +00:00
Evans Mungai
fbbcf87405
feat(collectors): Store all pod logs in cluster-resources directory ( #821 )
...
* feat(collectors): Store all pod logs in cluster-resources directory
All pod logs collected by the logs collector will now be stored in
/cluster-resources/pods/logs/[namespace]/[pod]/[container].log. This
will provide consistency and allow sbctl to find the logs when we run
`kubectl logs <pod>`. To allow backwards compatibility, symlinks of the
log files will be created in the current expected locations.
Closes : #744
2022-11-22 07:10:34 +13:00
Camila Macedo
f2ffef80af
Revert "Remove ingress check from https://preflight.replicated.com ( #840 )" ( #846 )
...
This reverts commit a5244a262c .
2022-11-16 14:57:47 +13:00
Camila Macedo
a5244a262c
Remove ingress check from https://preflight.replicated.com ( #840 )
...
## Description:
Currently, when we install an k8s with kurl and we run kubectl preflight https://preflight.replicated.com it will fail:
> ------------
> Check FAIL
> Title: Ingress
> Message: Contour ingress not found!
Therefore, Contour ingress does not seems a pre-requirement to kURL. So, should we have this check in the default example/test?
2022-11-15 08:55:04 -06:00
Camila Macedo
18d9a16ceb
Minimal memory requirement for kURL is 8GI ( #843 )
2022-11-15 08:54:29 -06:00
Alex Parker
34c59eb237
Update K8s versions and container runtime
2022-06-22 15:20:48 -04:00
Ethan Mosbaugh
5c269e2aaf
E2E preflight tests
2022-05-17 17:20:45 +00:00
Salah Aldeen Al Saleh
d1f341b8ed
host system packages collector/analyzer ( #506 )
...
* host system packages collector/analyzer
2021-12-10 12:05:21 -08:00
Jalaja Ganapathy
372454651e
collector/analyzer for host operating system ( #443 )
...
* collector/analyzer for host operating system
* address cr comments
* cleanup
* fix invoking the analyzer
code cleanup
* fix cr comments
* add corner case unit-test
* fix kernel version parsing
* address review comments
* add default case
* parse using regex
* added more testcases and fixed the bug found in cr
* few small things
2021-10-12 14:42:23 -07:00
Simon Croome
977fc438ea
Remote host collectors ( #392 )
...
* Add collect command and remote host collectors
Adds the ability to run a host collector on a set of remote k8s nodes.
Target nodes can be filtered using the --selector flag, with the same
syntax as kubectl. Existing flags for --collector-image,
--collector-pullpolicy and --request-timeout are used. To run on a
specified node, --selector="kubernetes.io/hostname=kind-worker2" could
be used.
The collect command is used by the remote collector to output the
results using a "raw" format, which uses the filename as the key, and
the value the output as a escaped json string. When run manually it
defaults to fully decoded json. The existing block devices,
ipv4interfaces and services host collectors don't decode properly - the
fix is to convert their slice output to a map (fix not included as
unsure what depends on the existing format).
The collect command is also useful for troubleshooting preflight issues.
Examples are included to show remote collector usage.
```
bin/collect --collector-image=croomes/troubleshoot:latest examples/collect/remote/memory.yaml --namespace test
{
"kind-control-plane": {
"system/memory.json": {
"total": 1304207360
}
},
"kind-worker": {
"system/memory.json": {
"total": 1695780864
}
},
"kind-worker2": {
"system/memory.json": {
"total": 1726353408
}
}
}
```
The preflight command has been updated to run remote collectors. To run
a host collector remotely it must be specified in the spec as a
`remoteCollector`:
```
apiVersion: troubleshoot.sh/v1beta2
kind: HostPreflight
metadata:
name: memory
spec:
remoteCollectors:
- memory:
collectorName: memory
analyzers:
- memory:
outcomes:
- fail:
when: "< 8Gi"
message: At least 8Gi of memory is required
- warn:
when: "< 32Gi"
message: At least 32Gi of memory is recommended
- pass:
message: The system has as sufficient memory
```
Results for each node are analyzed separately, with the node name
appended to the title:
```
bin/preflight --interactive=false --collector-image=croomes/troubleshoot:latest examples/preflight/remote/memory.yaml --format=json
{memory running 0 1}
{memory completed 1 1}
{
"fail": [
{
"title": "Amount of Memory (kind-worker2)",
"message": "At least 8Gi of memory is required"
},
{
"title": "Amount of Memory (kind-worker)",
"message": "At least 8Gi of memory is required"
},
{
"title": "Amount of Memory (kind-control-plane)",
"message": "At least 8Gi of memory is required"
}
]
}
```
Also added a host collector to allow preflight checks of required kernel
modules, which is the main driver for this change.
2021-10-06 09:03:53 -05:00
kwsorensen
1ed6100ac8
Feature/validate tcp load balancer address ( #387 )
...
Load Balancer Validation part of troubleshoot pre-flight checks
2021-07-14 14:30:47 -06:00
John Murphy
c119a16235
Fixed bugs introduced by handling multiple results in host preflights ( #383 )
...
Fixed bug caused by host preflights not handling empty when clauses, this cropped up because we now handle multiple host preflight results. Also expanded test coverage and added integration test script.
2021-07-08 11:08:53 -05:00
John Murphy
ae4c07027b
host preflights can produce multiple results
2021-07-06 08:42:12 -05:00
Andrew Reed
0a6c9836e0
Add timeout to filesystem performance collector
2021-04-13 18:30:18 +00:00
Andrew Reed
477cde7228
Benchmark write latency with background IOPS
...
Add a background IOPS feature to the filesystem performance collector
that specifies separate read and write background IOPS to perform while
measuring latency. This allows for better assessment of whether etcd
will be stable when running alongside other workloads on the same
cluster.
Also add templating to the outcome message of the filesystem performance
analyzers to allow printing individual latency percentiles or the entire
table.
Remove the random IOPS benchmark since it was attempting to perform
unaligned direct I/O.
2021-04-12 22:56:00 +00:00
Andrew Reed
87b4c12274
Analyze TLS certificate
2021-02-19 20:55:16 +00:00
Dan Stough
7647c039e9
Merge pull request #325 from replicatedhq/feat/rke3-k3s-anaylzer
...
feat(analyzer): rke2 and k3s distro support
2021-02-19 14:52:22 -05:00
Dan Stough
c26824a619
feat(analyzer): rke2 and k3s distro support
2021-02-19 19:06:02 +00:00
Andrew Reed
b418334a46
Analyze random read IOPS for a directory
...
The random IOPS benchmark attempts to replicate the results of this
fio command:
fio --ioengine=psync --direct=1 --bs=4k --size=1Gi --readwrite=randread --serialize_overlap=1
Across three tests the fio command reported 1877 IOPS and the preflight
1822 IOPS with the same block and file size.
2021-02-18 23:56:51 +00:00
Andrew Reed
989d5f7dbd
Analyze fs write performance
...
The included example found P99 latency of 2.6ms.
Fio reported P99 latency of 2.5ms with this command:
fio --rw=write --ioengine=sync --fdatasync=1 --directory=/var/lib/etcd
--size=220m --bs=2300
2021-02-17 23:20:38 +00:00
Andrew Reed
fe4db40b43
Move host preflights examples into separate directory
...
Add all supported analyzers to host preflight sample.
Don't log transient errors waiting for TCP connection.
Begin human stdout results on new line after spinner.
2021-02-15 22:46:12 +00:00
Andrew Reed
6498c34da5
Analyze ipv4 interfaces
...
Co-authored-by: Andrew Lavery <laverya@umich.edu >
2021-02-15 20:54:53 +00:00
Andrew Reed
b0a005796c
Merge pull request #317 from areed/host-remote-port
...
Analyze TCP connection
2021-02-15 15:18:11 -05:00
Andrew Reed
450d7570eb
Analyze HTTP load balancer
2021-02-15 17:22:42 +00:00
Andrew Reed
40af0f8a9c
Analyze TCP connection
2021-02-12 21:45:57 +00:00
Andrew Reed
0bcd5183f5
Analyze block devices
2021-02-11 19:19:45 +00:00
Andrew Reed
9984fe2caa
Get time info from timedated
2021-02-10 20:01:15 +00:00
Andrew Reed
f25149f45c
Host HTTP request analyzer
2021-02-09 20:31:28 +00:00
Andrew Reed
10a34c2e58
Host preflight ( #311 )
...
* Add HostPreflight v1beta2
* Work on TCP Load Balancer
* Host disk usage collector and analyzer
* Host memory analyzer
* TCP port status
* TCP load balancer
* Review changes
Co-authored-by: Marc Campbell <marc.e.campbell@gmail.com >
2021-02-08 16:09:01 -05:00
divolgin
a0ce85ae1e
Adding troubleshoot.sh/v1beta2
2020-09-01 19:57:11 +00:00
GraysonNull
4b1852c3e1
updates from feedback
2020-07-13 16:45:46 +00:00
GraysonNull
dc80733397
update sample preflight and support bundles, update diretory name
2020-07-13 15:43:10 +00:00
Marc Campbell
4e3a627b21
Remove broken mysql example
2020-03-23 08:51:59 -07:00
Marc Campbell
8f78827002
Redis
2020-03-20 11:03:49 -07:00
Marc Campbell
562a565f1f
Adding postgres analyzer
2020-03-19 18:28:13 -07:00
Marc Campbell
f15579a3b2
Update example
2020-02-06 23:10:40 +00:00
Marc Campbell
879c3a67d7
Node resource analyzer
2020-01-29 23:16:40 +00:00
Marc Campbell
806b2fbb41
Revert "Regex analyzer"
2019-12-18 17:30:16 -08:00
Marc Campbell
518f826fc2
Regex analyzer
2019-12-19 00:49:16 +00:00
Marc Campbell
d37d037ad1
Some fixes to troubleshoot, better error messages
2019-08-15 01:22:17 +00:00
Marc Campbell
e6416d7738
Some more error wrapping
2019-07-31 20:29:28 +00:00
Marc Campbell
2477616753
Add samples
2019-07-26 22:05:05 +00:00
Marc Campbell
c3e3eb34d2
Add example for docs
2019-07-18 18:27:36 +00:00