From b603b75cceb54ba56af3e67a504bfc4bdd46d0da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 08:57:31 +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 7d1bcf3d..b6c76898 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/atc0005/check-mail go 1.20 require ( - github.com/atc0005/go-nagios v0.18.0 + github.com/atc0005/go-nagios v0.18.1 github.com/emersion/go-imap v1.2.1 github.com/emersion/go-sasl v0.0.0-20241020182733-b788ff22d5a6 github.com/google/go-cmp v0.6.0 diff --git a/go.sum b/go.sum index 6d09d3fc..7c63f364 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/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/emersion/go-imap v1.2.1 h1:+s9ZjMEjOB8NzZMVTM3cCenz2JrQIGGo5j1df19WjTA= diff --git a/vendor/github.com/atc0005/go-nagios/CHANGELOG.md b/vendor/github.com/atc0005/go-nagios/CHANGELOG.md index 21df8702..07eb135a 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 7f8a5493..2c5eafeb 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 9366e58e..1c204d3f 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 2b37e2e2..d5ed8b20 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# 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 # github.com/emersion/go-imap v1.2.1