add hash on filter_counter for cache_name

This commit is contained in:
Sims24 2017-05-23 17:57:06 +02:00
parent d944863c8d
commit 9a07a065a1
3 changed files with 6 additions and 3 deletions

View File

@ -165,7 +165,8 @@ sub manage_selection {
my $json_data = decode_json($stdout);
$self->{cache_name} = "cache_varnish_" . $self->{mode} . '_' .
(defined($self->{option_results}->{hostname}) ? md5_hex($self->{option_results}->{hostname}) : md5_hex('all'));
(defined($self->{option_results}->{hostname}) ? md5_hex($self->{option_results}->{hostname}) : md5_hex('all')) . '_' .
(defined($self->{option_results}->{filter_counters}) ? md5_hex($self->{option_results}->{filter_counters}) : md5_hex('all'));
foreach my $counter (keys %{$json_data}) {
next if ($counter !~ /backend/);

View File

@ -105,7 +105,8 @@ sub manage_selection {
my $json_data = decode_json($stdout);
$self->{cache_name} = "cache_varnish_" . $self->{mode} . '_' .
(defined($self->{option_results}->{hostname}) ? md5_hex($self->{option_results}->{hostname}) : md5_hex('all'));
(defined($self->{option_results}->{hostname}) ? md5_hex($self->{option_results}->{hostname}) : md5_hex('all')) . '_' .
(defined($self->{option_results}->{filter_name}) ? md5_hex($self->{option_results}->{filter_name}) : md5_hex('all'));
foreach my $counter (keys %{$json_data}) {
next if ($counter !~ /cache/);

View File

@ -128,7 +128,8 @@ sub manage_selection {
my $json_data = decode_json($stdout);
$self->{cache_name} = "cache_varnish_" . $self->{mode} . '_' .
(defined($self->{option_results}->{hostname}) ? md5_hex($self->{option_results}->{hostname}) : md5_hex('all'));
(defined($self->{option_results}->{hostname}) ? md5_hex($self->{option_results}->{hostname}) : md5_hex('all')) . '_' .
(defined($self->{option_results}->{filter_name}) ? md5_hex($self->{option_results}->{filter_name}) : md5_hex('all'));
foreach my $counter (keys %{$json_data}) {
next if ($counter !~ /shm/);