Skip to content

Commit

Permalink
maybe delete dns query configure file when ignore is work
Browse files Browse the repository at this point in the history
  • Loading branch information
arstercz committed Oct 27, 2021
1 parent ef65513 commit f1f4102
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/telegraf-discover
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,11 @@ sub gen_conf_for_non_listen {
if ($type eq 'dns_query') {
if (defined($secs->{ignore}) && $secs->{ignore} > 0) {
Utils::time_print("ignore dns_query.");
if (-w $cnf) {
Utils::time_print("will delete $cnf file");
unlink $cnf if $self->is_update();
return 1;
}
return 0;
}

Expand Down

0 comments on commit f1f4102

Please sign in to comment.