Better perfdata parsing and other improvements#10
Merged
Conversation
added 10 commits
March 6, 2026 17:26
- add explanations to the regexes used in the parser - use '\' when specifying all literal characters in the regex, not all of them were using it when building regex lists - convert some German names to English - add example value of perfdata string regex match - use enum to browse perdata fields after regex match, clearer to read - revise the perdata reading logic, use guards and skip early where possible instead of nesting - add max length filters to each field of the perfdata: value, uom, warn, crit, min, max , accessible by the config file - move config parsing of nagios from main function to nagiosCollectorFactory. main function only parses to check if its enabled
root go.mod file was replacing pkg/nagflux with the local path, and /pkg/nagflux was then defining its own go.mod. this caused problems with vendoring. had to use go mod vendor everytime after making changes. simplify package structure by just having one go.mod at the project root: github.com/ConSol-Monitoring/nagflux
if they match the original strings this detects if there are letters after the last perfdata value
reflects the snclient structure, and makes it easier to work in makefile
ba73522 to
477805c
Compare
inqrphl
commented
Mar 11, 2026
Author
inqrphl
left a comment
There was a problem hiding this comment.
Reviewed changes that happened due to package renaming, file moving or golangci-lint updates.
Important changes are in other files
sni
approved these changes
Mar 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Perfdata related improvements
General improvements