Nagios Plugin to monitor only the zone filesystems

Hello,

Has anyone created a script that monitors only the zone file systems from the global zone?

The check_disk plugin is showing way more information then I require, I would have to exclude so many things it would not be feasible to use.

The zones are always being added and removed so it would be an administrative nightmare to monitor file systems from the local zone.

Here is what i’m looking for:

A script that runs zoneadm list -ip

0:global:running:/::native:shared
2:watchdog01:running:/zones/watchdog01:xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:native:shared

Looks for any systems with a 2 in the first column, then does a df -k on any of the file systems that are mounted for this zone.

/dev/vx/dsk/twsdg/vwdg01
10485760 3385114 6656949 34% /zones/watchdog01
/dev/vx/dsk/twsdg/vwdg01log
4194304 29447 3904681 1% /zones/watchdog01/varlog

Parsing the data to nagios readable disk critical and warning. I could probably write the script but I didn’t want to reinvent the wheel if something already exists.

Any help will be greatly appreciated.

Greg