netapp-cdot-nagios icon indicating copy to clipboard operation
netapp-cdot-nagios copied to clipboard

Feature request check_cdot_snapshots.pl: provide option to filter on snapshot names as well

Open log1-c opened this issue 4 years ago • 1 comments

Currently the script allows to filter/exclude volumes by name/regex. It would be nice to have this option for the snapshot names as well. E.g. to filter out snapshots containing the string "snapmirror".

log1-c avatar Jan 21 '21 09:01 log1-c

Maybe something like this?

@@ -138,6 +138,10 @@
                     push(@manually_excluded_snapshots,"$vol_name/$snap_name\n");
                     next;
                 }
+               elsif($snap_name =~ m/$excludeliststr/){
+                       push(@manually_excluded_snapshots,"$vol_name/$snap_name\n");
+                    next;
+               }
             }

             if($age >= $AgeOpt){

log1-c avatar Jan 21 '21 10:01 log1-c