Check dns misc improvements#417
Open
inqrphl wants to merge 8 commits into
Open
Conversation
added 2 commits
July 16, 2026 18:23
improve argument description text for norec,warning,critical,timeout fix some grammatical issues and typos return unknown when getting a timeout and exit immediately
inqrphl
marked this pull request as draft
July 17, 2026 06:34
…etric, and append warning and critical thresholds to it.
inqrphl
marked this pull request as ready for review
July 17, 2026 07:36
added 3 commits
July 17, 2026 13:56
…nse came save them in a slice with details, then generate an output that looks like this: dns lookup failed for host: 'host' : nameserver1: err1, err2, err3 nameserver2: err1, err2 tests written completely using ai add test function that creates local dns nameserver that always replies with a specific return code use it to check errored output when every query is errored/empty.
…dividual query. adjust global timeout to 30 seconds, and query timeout to 5 seconds add tests, ai generated, checking query timeout parameter
split up test functions, rename some variables
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.
make 'time' metric track the total time needed for queries. add warning and critical thresholds to its perfdata
improve argument description text for norec,warning,critical,timeout
fix some grammatical issues and typos
return unknown when getting a timeout and exit immediately
ai pass - add validator functions to the arguments and tests
rework output when no valid query answer is present. output line says that host cant be resolved, following lines give error types for each nameserver
add query-timeout parameter. uses the timeout in the DNS library client
make --server argument save to a []string. multiple namesvers can be passed by arguments now
example output:
./snclient -vvv --logfile stdout run check_dns -H thishostdoesnotexist.com --server 1.1.1.1 --server 8.8.8.8 --server 192.168.178.21 --search-path de --search-path tr --search-path uk --timeout 100
./snclient -vvv --logfile stdout run check_dns -H google.com --server thisdnsnameserverdoesnotexist --serve
r 8.8.8.8 --search-path de --search-path tr --search-path uk --timeout 100 --query-timeout 5