Check the number of Snapshots per Volume

How can I find Volumes without any Snapshots?

How can you find out which Volumes on the Filer don’t have any Snapshots? The check Snapshots,which is included in our Suite check_netapp_pro, provides a relatively easy way of achieving this. The following example demonstrates how it can be used:

$ check\_netapp\_pro Snapshots ...  --metric=number -w 1 -c 1 --comparison=lt

With the above command, every Volume that has less than 1 Snapshot will trigger the Monitoring System (e.g. Nagios or Icinga) to send a warning message. (Of course, all Volumes found during one sweep will be summarized into a single message.)

Too many Snapshots on one Volume?

In order to check if the number of Snapshots per Volume does not exceed a given maximum, for example 255 Snapshots per Volume, the above command can be used with some minor adjustments:

$ check\_netapp\_pro Snapshots ...  --metric=number -w 230 -c 250

This command compares the number of Snapshots per Volume with the warning-threshold. Should the number of Snapshots exceed 230, a warning message will be generated. A critical alarm will be sent if the number exceeds 250. (in the default settings, –comparison is set to greater than and can be ignored in these cases.)