[Check_mk (english)] ZFS disk usage.

Hello Everyone.

I’m trying to monitor zfs pool usage and I’m having some trouble on how check_mk does this.

I have omd installed and the check_mk is reporting zpool status only. I would like it to show the usage statistics of pools. I have been searching for a documentation on how to do this and most of the references I found is too vague for me to understand.

Could someone point me to how I can have check_mk to show disk usage/trend? What I found on this page https://mathias-kettner.de/checkmk_check_zfsget.html was not helpful for me to understand.

The systems are outputting zfs related information.

<<>>

rootfs rootfs 1911216768 1049216 1910167552 1% /

udev devtmpfs 65992920 4 65992916 1% /dev

<<>>

rpool name rpool -

rpool quota 0 default

rpool used 5714717696 -

rpool available 1956011594752 -

rpool mountpoint / local

rpool type filesystem -

rpool/ROOT name rpool/ROOT -

rpool/ROOT quota 0 default

rpool/ROOT used 1147936768 -

rpool/ROOT available 1956011594752 -

rpool/ROOT mountpoint none local

rpool/ROOT type filesystem -

rpool/ROOT/ubuntu name rpool/ROOT/ubuntu -

rpool/ROOT/ubuntu quota 0 default

rpool/ROOT/ubuntu used 1147906048 -

rpool/ROOT/ubuntu available 1956011594752 -

rpool/ROOT/ubuntu mountpoint / local

rpool/ROOT/ubuntu type filesystem -

rpool/ROOT/ubuntu@install name rpool/ROOT/ubuntu@install -

rpool/ROOT/ubuntu@install quota - -

rpool/ROOT/ubuntu@install used 73430016 -

rpool/ROOT/ubuntu@install available - -

rpool/ROOT/ubuntu@install mountpoint - -

rpool/ROOT/ubuntu@install type snapshot -

rpool/swap name rpool/swap -

rpool/swap quota - -

rpool/swap used 4565762048 -

rpool/swap available 1960544232960 -

rpool/swap mountpoint - -

rpool/swap type volume -

rpool/var name rpool/var -

rpool/var quota 0 default

rpool/var used 63488 -

rpool/var available 1956011594752 -

rpool/var mountpoint /var inherited from rpool

rpool/var type filesystem -

rpool/var/tmp name rpool/var/tmp -

rpool/var/tmp quota 0 default

rpool/var/tmp used 32768 -

rpool/var/tmp available 1956011594752 -

rpool/var/tmp mountpoint /var/tmp inherited from rpool

rpool/var/tmp type filesystem -

tank name tank -

tank quota 0 default

tank used 9218217305277 -

tank available 27652936080195 -

tank mountpoint /tank default

tank type filesystem -

[df]

rpool/ROOT/ubuntu zfs 1911216768 1049216 1910167552 1% /

rpool/var/tmp zfs 1910167552 0 1910167552 0% /var/tmp

tank zfs 36006784512 9001964160 27004820352 26% /tank

<<<zpool_status>>>

all pools are healthy

Thanks in advance!

I was wondering if you found a solution for this. I verified that zfsget portion of check_mk_agent was working and the output was there but I am not seeing a monitor/test the zfs filesystems like you mentioned as well.

···

On 2/12/2014 1:42 PM, Jason G Chang wrote:

Hello Everyone.

I'm trying to monitor zfs pool usage and I'm having some trouble on how
check_mk does this.

Could someone point me to how I can have check_mk to show disk usage/trend?
What I found on this page
https://mathias-kettner.de/checkmk_check_zfsget.html was not helpful for me
to understand.

--

Mike Wilson

To follow up on this. I don't have a problem with my Solaris machines, just the RHEL ones.

···

On 3/17/2014 3:28 PM, Mike W wrote:

On 2/12/2014 1:42 PM, Jason G Chang wrote:

Hello Everyone.

I'm trying to monitor zfs pool usage and I'm having some trouble on how
check_mk does this.

Could someone point me to how I can have check_mk to show disk
usage/trend?
What I found on this page
https://mathias-kettner.de/checkmk_check_zfsget.html was not helpful
for me
to understand.

I was wondering if you found a solution for this. I verified that zfsget
portion of check_mk_agent was working and the output was there but I am
not seeing a monitor/test the zfs filesystems like you mentioned as well.

--

Mike Wilson

It looks like they changed the command line for zfsget/df from (1.2.2p1):

df -lk -F zfs | sed 1d

to (1.2.4):

df -PTlk -t zfs | sed 1d

The first works, the change (1.2.4) doesn't work on my RHEL systems.

Originally thought this was a solaris versus rhel issue but I run older check_mk_agent on solaris systems right now.

···

On 3/17/2014 3:28 PM, Mike W wrote:

On 2/12/2014 1:42 PM, Jason G Chang wrote:

Hello Everyone.

I'm trying to monitor zfs pool usage and I'm having some trouble on how
check_mk does this.

Could someone point me to how I can have check_mk to show disk
usage/trend?
What I found on this page
https://mathias-kettner.de/checkmk_check_zfsget.html was not helpful
for me
to understand.

I was wondering if you found a solution for this. I verified that zfsget
portion of check_mk_agent was working and the output was there but I am
not seeing a monitor/test the zfs filesystems like you mentioned as well.

--

Mike Wilson