diff --git a/go.mod b/go.mod index b8f8a459..fac140ef 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/atc0005/cert-payload v0.7.0-alpha.3 - github.com/atc0005/go-nagios v0.19.0-alpha.1 + github.com/atc0005/go-nagios v0.19.0 github.com/grantae/certinfo v0.0.0-20170412194111-59d56a35515b github.com/rs/zerolog v1.33.0 ) diff --git a/go.sum b/go.sum index 4357432c..a817d1d1 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/atc0005/cert-payload v0.7.0-alpha.3 h1:mnBoCxbx48OP0840g+CvsfpT2OGZVBCT2Tg0WCr35Ho= github.com/atc0005/cert-payload v0.7.0-alpha.3/go.mod h1:zgKxu51OfQJvWRgBCdMk4b/LMotprdFeidietjopVgY= -github.com/atc0005/go-nagios v0.19.0-alpha.1 h1:j06uEubgiOfdHV/UA2Z5cLsEcZ34MbxrN3fTNjFfcfM= -github.com/atc0005/go-nagios v0.19.0-alpha.1/go.mod h1:7XhhQHYOD+jZQVrTWXuWzSoPoDb6/FQh60dbGauQ5lQ= +github.com/atc0005/go-nagios v0.19.0 h1:QMqu4iAKb4SD/kdAJdnMYZjHL4KzfYOSq5Lq30AZc0U= +github.com/atc0005/go-nagios v0.19.0/go.mod h1:7XhhQHYOD+jZQVrTWXuWzSoPoDb6/FQh60dbGauQ5lQ= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= diff --git a/vendor/github.com/atc0005/go-nagios/CHANGELOG.md b/vendor/github.com/atc0005/go-nagios/CHANGELOG.md index 1419ee5b..fdd05388 100644 --- a/vendor/github.com/atc0005/go-nagios/CHANGELOG.md +++ b/vendor/github.com/atc0005/go-nagios/CHANGELOG.md @@ -26,6 +26,81 @@ The following types of changes will be recorded in this file: - placeholder +## [v0.19.0] - 2024-11-27 + +### Added + +- (GH-330) Add plugin output size metric + +#### Dependency Updates + +- (GH-323) Go Dependency: Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 + +## [v0.18.1] - 2024-11-23 + +### Changed + +- (GH-317) Extend logging for error collection handling +- (GH-313) Update connectionResetByPeerAdvice doc comments + +### Fixed + +- (GH-315) Fix log message for skipping thresholds section + +## [v0.18.0] - 2024-11-16 + +### Changed + +- (GH-309) Add support for transparent payload compression +- (GH-300) Update `logPluginOutputSize` calls for consistency +- (GH-310) Update README to note payload behavior changes + +## [v0.17.1] - 2024-11-08 + +### Changed + +- (GH-296) Unescape encoded Ascii85 payload before decoding + +## [v0.17.0] - 2024-11-06 + +### Added + +- (GH-288) Add support for embedded/encoded payloads +- (GH-289) Add support for (internal) debug logging output + +### Changed + +- (GH-291) Clarify handling of empty payload input +- (GH-292) Enable LongServiceOutput header/label for payloads + +### Fixed + +- (GH-268) Fix `Plugin.SetOutputTarget` method +- (GH-273) Fix test case validity check +- (GH-290) Minor refactoring of Range and Thresholds support + +## [v0.16.2] - 2024-10-10 + +### Changed + +#### Dependency Updates + +- (GH-240) Update Dependabot PR prefixes +- (GH-241) Update Dependabot PR prefixes (redux) +- (GH-242) Go Dependency: Bump github.com/stretchr/testify from 1.8.4 to 1.9.0 + +#### Other + +- (GH-245) Add check_cert plugin perfdata success test case +- (GH-254) Update README reference links + +### Fixed + +- (GH-247) Remove inactive maligned linter +- (GH-248) Fix errcheck linting errors +- (GH-252) Fix `TestEmptyServiceOutputProducesNoOutput` test +- (GH-257) Fix `predeclared` linter warnings + ## [v0.16.1] - 2024-01-25 ### Added @@ -521,7 +596,13 @@ Initial package state - Nagios state map -[Unreleased]: https://github.com/atc0005/go-nagios/compare/v0.16.1...HEAD +[Unreleased]: https://github.com/atc0005/go-nagios/compare/v0.19.0...HEAD +[v0.19.0]: https://github.com/atc0005/go-nagios/releases/tag/v0.19.0 +[v0.18.1]: https://github.com/atc0005/go-nagios/releases/tag/v0.18.1 +[v0.18.0]: https://github.com/atc0005/go-nagios/releases/tag/v0.18.0 +[v0.17.1]: https://github.com/atc0005/go-nagios/releases/tag/v0.17.1 +[v0.17.0]: https://github.com/atc0005/go-nagios/releases/tag/v0.17.0 +[v0.16.2]: https://github.com/atc0005/go-nagios/releases/tag/v0.16.2 [v0.16.1]: https://github.com/atc0005/go-nagios/releases/tag/v0.16.1 [v0.16.0]: https://github.com/atc0005/go-nagios/releases/tag/v0.16.0 [v0.15.0]: https://github.com/atc0005/go-nagios/releases/tag/v0.15.0 diff --git a/vendor/github.com/atc0005/go-nagios/README.md b/vendor/github.com/atc0005/go-nagios/README.md index 91fe837e..a3603f30 100644 --- a/vendor/github.com/atc0005/go-nagios/README.md +++ b/vendor/github.com/atc0005/go-nagios/README.md @@ -60,6 +60,9 @@ such time that the API is considered stable. - Panics from client code are captured and reported - panics are surfaced as `CRITICAL` state - service output and error details are overridden to make panics prominent +- Optional support for emitting performance data metric for plugin output size + - disabled by default + - can be toggled on by client code as desired - Optional support for emitting performance data generated by plugins - if not overridden by client code *and* if using the provided `nagios.NewPlugin()` constructor, a default `time` performance data metric diff --git a/vendor/github.com/atc0005/go-nagios/testdata/plugin-output-multiline-with-optional-perf-data-included.txt b/vendor/github.com/atc0005/go-nagios/testdata/plugin-output-multiline-with-optional-perf-data-included.txt new file mode 100644 index 00000000..c78e71c4 --- /dev/null +++ b/vendor/github.com/atc0005/go-nagios/testdata/plugin-output-multiline-with-optional-perf-data-included.txt @@ -0,0 +1,22 @@ +OK: Datastore HUSVM-DC1-vol6 space usage (0 VMs) is 0.01% of 18.0TB with 18.0TB remaining [WARNING: 90% , CRITICAL: 95%] +**THRESHOLDS** + +* CRITICAL: 95% datastore usage +* WARNING: 90% datastore usage + +**DETAILED INFO** + +Datastore Space Summary: + +* Name: HUSVM-DC1-vol6 +* Space Used: 2.3GB (0.01%) +* Space Remaining: 18.0TB (99.99%) +* VMs: 0 + + +--- + +* vSphere environment: https://vc1.example.com:443/sdk +* Plugin User Agent: check-vmware/v0.30.6-0-g25fdcdc + + | 'time'=874ms;;;; 'plugin_output_size'=530B;;;; diff --git a/vendor/github.com/atc0005/go-nagios/testdata/plugin-output-one-line-with-optional-perf-data-included.txt b/vendor/github.com/atc0005/go-nagios/testdata/plugin-output-one-line-with-optional-perf-data-included.txt new file mode 100644 index 00000000..28073760 --- /dev/null +++ b/vendor/github.com/atc0005/go-nagios/testdata/plugin-output-one-line-with-optional-perf-data-included.txt @@ -0,0 +1 @@ +OK: Datastore HUSVM-DC1-vol6 space usage (0 VMs) is 0.01% of 18.0TB with 18.0TB remaining [WARNING: 90% , CRITICAL: 95%] | 'time'=874ms;;;; 'plugin_output_size'=171B;;;; diff --git a/vendor/modules.txt b/vendor/modules.txt index 8803624b..d458d7ea 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -7,7 +7,7 @@ github.com/atc0005/cert-payload/format/v1 github.com/atc0005/cert-payload/input github.com/atc0005/cert-payload/internal/certs github.com/atc0005/cert-payload/internal/textutils -# github.com/atc0005/go-nagios v0.19.0-alpha.1 +# github.com/atc0005/go-nagios v0.19.0 ## explicit; go 1.19 github.com/atc0005/go-nagios # github.com/grantae/certinfo v0.0.0-20170412194111-59d56a35515b