aleex42 / netapp-cdot-nagios

Nagios-Checks for monitoring NetApp cDOT-Systems via NetApp Perl API
GNU General Public License v3.0
43 stars 30 forks source link

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

Open log1-c opened 3 years ago

log1-c commented 3 years ago

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 commented 3 years ago

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){