Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend check_dns.pl so it can take a list of domains #338

Closed
wants to merge 1 commit into from

Conversation

emiljp
Copy link

@emiljp emiljp commented Sep 3, 2020

Extend check_dns.pl so it can take a list of domains that each have the same expected results.

I have many servers with even more websites, some servers have many websites. I want a single check for each server that checks all the websites on that server.

@sonarcloud
Copy link

sonarcloud bot commented Sep 3, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

$msg .= join("','", @results_uniq);
}
$msg .= "'";
$msg .= " | dns_query_time='${call_time}s'" if $verbose;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will mess up in --verbose mode


my $stop_calls = time;
my $total_time = sprintf("%.4f", $stop_calls - $start_calls);
my $perfdata = "\n | total_dns_query_time='${total_time}s'";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multi-line will break some monitoring servers output

}
@regex_mismatches = sort(uniq_array(@regex_mismatches)) if(@regex_mismatches);
$msg .= "\n$records[$i] $type record ";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multi-line will break some monitoring servers output / dashboards as traditionally only 1 line is guaranteed to be displayed, you wouldn't want the output on some systems to be "DNS OK:" and nothing else...

@HariSekhon
Copy link
Owner

Thanks for the pull request.

Overall the changes look ok, just needs some tweaking of the output formatting to maintain 1 line dashboard compatibility, verbose mode testing etc.

@emiljp
Copy link
Author

emiljp commented Sep 3, 2020

Thanks for the feedback. I will change it to only output one line and remake this pull request from a different account. I used this account by mistake.

@emiljp emiljp closed this Sep 3, 2020
@EHP4321
Copy link

EHP4321 commented Sep 3, 2020

This is my new account. Here is the new pull request #339

@EHP4321
Copy link

EHP4321 commented Sep 4, 2020

I am sorry for the bother of creating a new request instead of just committing the fixes here. But I am in the process of de-googling and is trying to remember not to use my old google accounts eveywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants