From 2c8e894d10d65a3dbe89193ae5a434338a18053f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 08:01:00 +0000 Subject: [PATCH] Go Dependency: Bump github.com/atc0005/go-nagios from 0.18.0 to 0.18.1 Bumps [github.com/atc0005/go-nagios](https://github.com/atc0005/go-nagios) from 0.18.0 to 0.18.1. - [Release notes](https://github.com/atc0005/go-nagios/releases) - [Changelog](https://github.com/atc0005/go-nagios/blob/master/CHANGELOG.md) - [Commits](https://github.com/atc0005/go-nagios/compare/v0.18.0...v0.18.1) --- updated-dependencies: - dependency-name: github.com/atc0005/go-nagios dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- vendor/github.com/atc0005/go-nagios/CHANGELOG.md | 14 +++++++++++++- vendor/github.com/atc0005/go-nagios/annotations.go | 5 +++-- vendor/github.com/atc0005/go-nagios/sections.go | 14 +++++++++----- vendor/modules.txt | 2 +- 6 files changed, 29 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 2815915..8f4c9b7 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/atc0005/nagios-debug go 1.20 -require github.com/atc0005/go-nagios v0.18.0 +require github.com/atc0005/go-nagios v0.18.1 diff --git a/go.sum b/go.sum index d1e240c..486f3c8 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/atc0005/go-nagios v0.18.0 h1:W14EM2SgByAbRB5YzCLzpyHMAQ8z4bB3KvnNmUxuZZ0= -github.com/atc0005/go-nagios v0.18.0/go.mod h1:n2RHhsrgI8xiapqkJ240dKLwMXWbWvkOPLE92x0IGaM= +github.com/atc0005/go-nagios v0.18.1 h1:YGYNTyjNJiGXcCXYMhatHKzddjij06Peeb0va/wX45g= +github.com/atc0005/go-nagios v0.18.1/go.mod h1:n2RHhsrgI8xiapqkJ240dKLwMXWbWvkOPLE92x0IGaM= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/vendor/github.com/atc0005/go-nagios/CHANGELOG.md b/vendor/github.com/atc0005/go-nagios/CHANGELOG.md index 21df870..07eb135 100644 --- a/vendor/github.com/atc0005/go-nagios/CHANGELOG.md +++ b/vendor/github.com/atc0005/go-nagios/CHANGELOG.md @@ -26,6 +26,17 @@ The following types of changes will be recorded in this file: - placeholder +## [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 @@ -575,7 +586,8 @@ Initial package state - Nagios state map -[Unreleased]: https://github.com/atc0005/go-nagios/compare/v0.18.0...HEAD +[Unreleased]: https://github.com/atc0005/go-nagios/compare/v0.18.1...HEAD +[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 diff --git a/vendor/github.com/atc0005/go-nagios/annotations.go b/vendor/github.com/atc0005/go-nagios/annotations.go index 7f8a549..2c5eafe 100644 --- a/vendor/github.com/atc0005/go-nagios/annotations.go +++ b/vendor/github.com/atc0005/go-nagios/annotations.go @@ -21,9 +21,10 @@ const runtimeTimeoutReachedAdvice string = "plugin runtime exceeded specified ti // connectionResetByPeerAdvice offers advice to the sysadmin for remediating // "read: connection reset by peer" errors. The cause of this error can vary -// but is often associated access control mechanisms such as firewalls, +// but is often associated with access control mechanisms such as firewalls, // misconfigured IIS sites (e.g., missing certificate binding), overloaded -// services at maximum connection capacity or otherwise misconfigured services. +// services at maximum connection capacity or otherwise misconfigured +// services. // // See also https://stackoverflow.com/questions/1434451 const connectionResetByPeerAdvice string = "consider checking firewall, certificate/port bindings or maximum supported connections for remote service" diff --git a/vendor/github.com/atc0005/go-nagios/sections.go b/vendor/github.com/atc0005/go-nagios/sections.go index 9366e58..1c204d3 100644 --- a/vendor/github.com/atc0005/go-nagios/sections.go +++ b/vendor/github.com/atc0005/go-nagios/sections.go @@ -56,10 +56,11 @@ func (p Plugin) handleErrorsSection(w io.Writer) { var totalWritten int - writeErrorToOutputSink := func(err error) { + writeErrorToOutputSink := func(err error, fieldname string) { written, writeErr := fmt.Fprintf(w, "* %v%s", err, CheckOutputEOL) if writeErr != nil { - panic("Failed to write LastError field content to given output sink") + msg := fmt.Sprintf("Failed to write error field %q value to given output sink", fieldname) + panic(msg) } totalWritten += written @@ -79,13 +80,16 @@ func (p Plugin) handleErrorsSection(w io.Writer) { totalWritten += written if p.LastError != nil { - writeErrorToOutputSink(p.LastError) + p.logAction("Writing field p.LastError value to output sink") + + writeErrorToOutputSink(p.LastError, "p.LastError") } // Process any non-nil errors in the collection. + p.logAction(fmt.Sprintf("Writing %d errors from field %q to output sink", len(p.Errors), "p.Errors")) for _, err := range p.Errors { if err != nil { - writeErrorToOutputSink(err) + writeErrorToOutputSink(err, "p.Errors") } } @@ -102,7 +106,7 @@ func (p Plugin) handleThresholdsSection(w io.Writer) { return case p.isThresholdsSectionHidden(): - p.logAction("Skipping emission of thresholds section; option to hide errors enabled") + p.logAction("Skipping emission of thresholds section; option to hide thresholds enabled") return } diff --git a/vendor/modules.txt b/vendor/modules.txt index eb88b4b..4111260 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,3 +1,3 @@ -# github.com/atc0005/go-nagios v0.18.0 +# github.com/atc0005/go-nagios v0.18.1 ## explicit; go 1.19 github.com/atc0005/go-nagios