Xymon Mailing List Archive search

ZFS Monitoring Script

13 messages in this thread

list Mike Rowell · Thu, 12 Apr 2007 15:15:04 +0100 ·
Okay here it is, it's small but does the following.

 
File system HEALTH.

 
ONLINE = green

DEGRADED = yellow

FAULTED = red

 
File system sizes are set to alert yellow at 80% capacity and red at
90%, the variables to alter this are at the top of the file.  It doesn't
check scrub status as yet as I'm not to sure what the scrub will report
back, so once I've got some scrubbing underway I'll adjust the script to
take into account scrubbing.

 
This was something I threw together in 15minutes as we just realized
that UFS would not suit the requirements of a project and therefore we
had to move to ZFS.  Enhancements I'm working on are to display all the
storage devices in the pools and their health and also read / write and
checksum errors, but they will have to wait for a bit.

Mike Rowell

Systems Team Leader

* Email: user-63f3e97eb1de@xymon.invalid
* Tel:   XXX XXXX XXXX
* Fax:  XXXX XXX XXXX

www.rightmove.co.uk <http://www.rightmove.co.uk/>;  - the UK's number 1
property website

This message (including any attachments) is confidential and may be
legally privileged. The content and views expressed are those of the
sender and not necessarily Rightmove plc. If you are not the intended
recipient, you must not disclose, copy or use any part of it. Please
delete all copies immediately and notify the sender. Rightmove plc is
registered in England and Wales, No. 03997679. Registered Office:
Rightmove plc, Grafton Court, Snowdon Drive, Milton Keynes, MK6 1AJ.

 
This email has been scanned for all viruses by the MessageLabs service. 
Attachments (1)
list Charles Goyard · Thu, 12 Apr 2007 16:36:47 +0200 ·
Hi,
quoted from Mike Rowell

Mike Rowell wrote :
File system sizes are set to alert yellow at 80% capacity and red at
90%, the variables to alter this are at the top of the file.
I don't know about ZFS, but are these the same kind of values "du"
reports ? If so, maybe it's a duplicate, or maybe you should format the
output the way "disk" does.

Just a question/suggestion.

Regards,

-- 
Charles Goyard - user-a6cdca7046e2@xymon.invalid - (+33) 1 45 38 01 31
Orange Business Services - online multimedia  // ingénierie
list Jason Altrincham Jones · Thu, 12 Apr 2007 15:40:00 +0100 ·
Not sure if this has been covered previously but when you schedule a
number of disables for the future then the only way to cancel the
scheduled task seems to be to click cancel on each of them, it would be
nice to have something similar to the "Currently disabled tests"
listbox, if possible.

 
If I am missing an easier way please tell me :-).

 
Thanks,

Jason.
list Rich Smrcina · Thu, 12 Apr 2007 10:12:51 -0500 ·
I concur, unless there's something specific that ZFS provides that is 
critical to monitor.  This way the back end client code will be similar 
to (or the same as) that for Linux.
quoted from Charles Goyard

Charles Goyard wrote:
Hi,

Mike Rowell wrote :
File system sizes are set to alert yellow at 80% capacity and red at
90%, the variables to alter this are at the top of the file.
I don't know about ZFS, but are these the same kind of values "du"
reports ? If so, maybe it's a duplicate, or maybe you should format the
output the way "disk" does.

Just a question/suggestion.

Regards,
-- 

Rich Smrcina
VM Assist, Inc.
Phone: XXX-XXX-XXXX
Ans Service:  XXX-XXX-XXXX
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2007 - Green Bay, WI - May 18-22, 2007
list Mike Rowell · Thu, 12 Apr 2007 16:13:43 +0100 ·
Sorry made a typo when trying some new functionality, working version
attached.

 
Mike
quoted from Mike Rowell

 
From: Mike Rowell [mailto:user-63f3e97eb1de@xymon.invalid] 
Sent: 12 April 2007 15:15
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] ZFS Monitoring Script

 
Okay here it is, it's small but does the following.

 
File system HEALTH.

 
ONLINE = green

DEGRADED = yellow

FAULTED = red

 
File system sizes are set to alert yellow at 80% capacity and red at
90%, the variables to alter this are at the top of the file.  It doesn't
check scrub status as yet as I'm not to sure what the scrub will report
back, so once I've got some scrubbing underway I'll adjust the script to
take into account scrubbing.

 
This was something I threw together in 15minutes as we just realized
that UFS would not suit the requirements of a project and therefore we
had to move to ZFS.  Enhancements I'm working on are to display all the
storage devices in the pools and their health and also read / write and
checksum errors, but they will have to wait for a bit.

Mike Rowell

Systems Team Leader

* Email: user-63f3e97eb1de@xymon.invalid
* Tel:   XXX XXXX XXXX
* Fax:  XXXX XXX XXXX

www.rightmove.co.uk <http://www.rightmove.co.uk/>;  - the UK's number 1
property website

This message (including any attachments) is confidential and may be
legally privileged. The content and views expressed are those of the
sender and not necessarily Rightmove plc. If you are not the intended
recipient, you must not disclose, copy or use any part of it. Please
delete all copies immediately and notify the sender. Rightmove plc is
registered in England and Wales, No. 03997679. Registered Office:
Rightmove plc, Grafton Court, Snowdon Drive, Milton Keynes, MK6 1AJ.

 
This email has been scanned for all viruses by the MessageLabs service. 

This email has been scanned for all viruses by the MessageLabs service.


This email has been scanned for all viruses by the MessageLabs service. 
Attachments (1)
list Mike Rowell · Thu, 12 Apr 2007 16:30:18 +0100 ·
The way ZFS works is to have storage pools, the script checks the status
of the storage pools which is where the ONLINE, FAULTED, DEGRADED stuff
comes in to it.

The capacity is just for my own information as we currently run only one
zfs filesystem per storage pool, as you state this isn't really needed
as it does duplicate other things, however it gives you the ability to
see how much storage is in a pool, you can have multiple ZFS file
systems inside each pool so it does have it's uses.

mike
quoted from Rich Smrcina

-----Original Message-----
From: Rich Smrcina [mailto:user-cf452ff334e0@xymon.invalid] 
Sent: 12 April 2007 16:13
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] ZFS Monitoring Script

I concur, unless there's something specific that ZFS provides that is 
critical to monitor.  This way the back end client code will be similar 
to (or the same as) that for Linux.

Charles Goyard wrote:
Hi,

Mike Rowell wrote :
File system sizes are set to alert yellow at 80% capacity and red at
90%, the variables to alter this are at the top of the file.
I don't know about ZFS, but are these the same kind of values "du"
reports ? If so, maybe it's a duplicate, or maybe you should format
the
output the way "disk" does.

Just a question/suggestion.

Regards,
-- 
Rich Smrcina
VM Assist, Inc.
Phone: XXX-XXX-XXXX
Ans Service:  XXX-XXX-XXXX
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2007 - Green Bay, WI - May 18-22, 2007


This email has been scanned for all viruses by the MessageLabs service.

This email has been scanned for all viruses by the MessageLabs service. 
list Greg Shea · Thu, 12 Apr 2007 11:32:34 -0400 ·
Hi,

Here's some output from one of my Sol10 boxes running ZFS.
Don't quote me but I think the filesystems are carved up from
the ZFS pools.

-Grs-
Gregory R Shea
EMC Corporation


[hobbit at solaris10 ]$ df -n -l
/                  : ufs
/devices           : devfs
/system/contract   : ctfs
/proc              : proc
/etc/mnttab        : mntfs
/etc/svc/volatile  : tmpfs
/system/object     : objfs
/dev/fd            : fd
/tmp               : tmpfs
/var/run           : tmpfs
/data              : zfs
/data/docp1        : zfs
/data/docp1/dctm   : zfs
/data/docp1/dctm/data: zfs

[hobbit at solaris10 ]$ /usr/sbin/zpool list -H
node_apps       123M    6.83M   116M    5%      ONLINE  -
ofcdocp1        7.94G   86K     7.94G   0%      ONLINE  -
ofcdocp1_data   398G    86K     398G    0%      ONLINE  -
ofcdocp1_doc    99.5G   88K     99.5G   0%      ONLINE  -

[hobbit at solaris10 ]$ df -lk
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/emcpower2a  12392428 4946137 7198443    41%    /
/devices                   0       0       0     0%    /devices
ctfs                       0       0       0     0%    /system/contract
proc                       0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
swap                 6953160    1280 6951880     1%    /etc/svc/volatile
objfs                      0       0       0     0%    /system/object
fd                         0       0       0     0%    /dev/fd
swap                 6951992     112 6951880     1%    /tmp
swap                 6951928      48 6951880     1%    /var/run
node_apps              93184    6911   86204     8%    /data
ofcdocp1             8193024      25 8192941     1%    /data/docp1
ofcdocp1_doc         102703104      26 102703019     1%
/data/docp1/dctm
ofcdocp1_data        410812416      24 410812333     1%
/data/docp1/dctm/data
quoted from Rich Smrcina
 

-----Original Message-----
From: Rich Smrcina [mailto:user-cf452ff334e0@xymon.invalid] 
Sent: Thursday, April 12, 2007 11:13 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] ZFS Monitoring Script

I concur, unless there's something specific that ZFS provides that is 
critical to monitor.  This way the back end client code will be similar 
to (or the same as) that for Linux.

Charles Goyard wrote:
Hi,

Mike Rowell wrote :
File system sizes are set to alert yellow at 80% capacity and red at
90%, the variables to alter this are at the top of the file.
I don't know about ZFS, but are these the same kind of values "du"
reports ? If so, maybe it's a duplicate, or maybe you should format
the
output the way "disk" does.

Just a question/suggestion.

Regards,
-- 
Rich Smrcina
VM Assist, Inc.
Phone: XXX-XXX-XXXX
Ans Service:  XXX-XXX-XXXX
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2007 - Green Bay, WI - May 18-22, 2007
list T.J. Yang · Thu, 12 Apr 2007 10:46:07 -0500 ·
As promised, here is hb client zfs wiki notes.

http://en.wikibooks.org/wiki/System_Monitoring_with_Hobbit/HOWTO#Hobbit_Client_and_ZFS_monitoring

It is not done yet, I haven't able to see the zfs column on hb server.

T.J. Yang
quoted from Mike Rowell

From: "Mike Rowell" <user-63f3e97eb1de@xymon.invalid>
Reply-To: user-ae9b8668bcde@xymon.invalid
To: <user-ae9b8668bcde@xymon.invalid>
Subject: RE: [hobbit] ZFS Monitoring Script
Date: Thu, 12 Apr 2007 16:13:43 +0100

Sorry made a typo when trying some new functionality, working version
attached.


Mike


From: Mike Rowell [mailto:user-63f3e97eb1de@xymon.invalid]
Sent: 12 April 2007 15:15
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] ZFS Monitoring Script


Okay here it is, it's small but does the following.


File system HEALTH.


ONLINE = green

DEGRADED = yellow

FAULTED = red


File system sizes are set to alert yellow at 80% capacity and red at
90%, the variables to alter this are at the top of the file.  It doesn't
check scrub status as yet as I'm not to sure what the scrub will report
back, so once I've got some scrubbing underway I'll adjust the script to
take into account scrubbing.


This was something I threw together in 15minutes as we just realized
that UFS would not suit the requirements of a project and therefore we
had to move to ZFS.  Enhancements I'm working on are to display all the
storage devices in the pools and their health and also read / write and
checksum errors, but they will have to wait for a bit.

Mike Rowell

Systems Team Leader

* Email: user-63f3e97eb1de@xymon.invalid
* Tel:   XXX XXXX XXXX
* Fax:  XXXX XXX XXXX

www.rightmove.co.uk <http://www.rightmove.co.uk/>;  - the UK's number 1
property website

This message (including any attachments) is confidential and may be
legally privileged. The content and views expressed are those of the
sender and not necessarily Rightmove plc. If you are not the intended
recipient, you must not disclose, copy or use any part of it. Please
delete all copies immediately and notify the sender. Rightmove plc is
registered in England and Wales, No. 03997679. Registered Office:
Rightmove plc, Grafton Court, Snowdon Drive, Milton Keynes, MK6 1AJ.


This email has been scanned for all viruses by the MessageLabs service.

This email has been scanned for all viruses by the MessageLabs service.


This email has been scanned for all viruses by the MessageLabs service.
<< zfs_stat.sh >>

The average US Credit Score is 675. The cost to see yours: $0 by Experian. 
http://www.freecreditreport.com/pm/default.aspx?sc=660600&bcd=EMAILFOOTERAVERAGE
list Rich Smrcina · Thu, 12 Apr 2007 10:51:27 -0500 ·
OK, then it's a software layer above the file systems, sort of like (but 
probably nothing like) LVM?
quoted from Mike Rowell

Mike Rowell wrote:
The way ZFS works is to have storage pools, the script checks the status
of the storage pools which is where the ONLINE, FAULTED, DEGRADED stuff
comes in to it.

The capacity is just for my own information as we currently run only one
zfs filesystem per storage pool, as you state this isn't really needed
as it does duplicate other things, however it gives you the ability to
see how much storage is in a pool, you can have multiple ZFS file
systems inside each pool so it does have it's uses.

mike

-----Original Message-----
From: Rich Smrcina [mailto:user-cf452ff334e0@xymon.invalid] 
Sent: 12 April 2007 16:13
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] ZFS Monitoring Script

I concur, unless there's something specific that ZFS provides that is 
critical to monitor.  This way the back end client code will be similar 
to (or the same as) that for Linux.

Charles Goyard wrote:
Hi,

Mike Rowell wrote :
File system sizes are set to alert yellow at 80% capacity and red at
90%, the variables to alter this are at the top of the file.
I don't know about ZFS, but are these the same kind of values "du"
reports ? If so, maybe it's a duplicate, or maybe you should format
the
output the way "disk" does.

Just a question/suggestion.

Regards,
-- 
Rich Smrcina
VM Assist, Inc.
Phone: XXX-XXX-XXXX
Ans Service:  XXX-XXX-XXXX
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2007 - Green Bay, WI - May 18-22, 2007
list Mike Rowell · Thu, 12 Apr 2007 17:10:19 +0100 ·
It's a bit of both...

ZFS is a file system type that can be applied to a raw device to create
a filesystem, however to get that you need to put the raw device into a
zfs pool which is what the software part does.

It's build directly into the kernel so operates in kernel space, but
also has a lot of dynamic qualities such as compression that can be
enabled and disabled at will, good if you've got a filesystem with a lot
of logs in it etc.

The good thing is that there is no such concept as inodes in zfs so you
can have as many files as you want without worrying about hitting inodes
maximums. 
quoted from Rich Smrcina

Mike

-----Original Message-----
From: Rich Smrcina [mailto:user-cf452ff334e0@xymon.invalid] 
Sent: 12 April 2007 16:51
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] ZFS Monitoring Script

OK, then it's a software layer above the file systems, sort of like (but

probably nothing like) LVM?

Mike Rowell wrote:
The way ZFS works is to have storage pools, the script checks the
status
of the storage pools which is where the ONLINE, FAULTED, DEGRADED
stuff
comes in to it.

The capacity is just for my own information as we currently run only
one
zfs filesystem per storage pool, as you state this isn't really needed
as it does duplicate other things, however it gives you the ability to
see how much storage is in a pool, you can have multiple ZFS file
systems inside each pool so it does have it's uses.

mike

-----Original Message-----
From: Rich Smrcina [mailto:user-cf452ff334e0@xymon.invalid] 
Sent: 12 April 2007 16:13
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] ZFS Monitoring Script

I concur, unless there's something specific that ZFS provides that is 
critical to monitor.  This way the back end client code will be
similar 
to (or the same as) that for Linux.

Charles Goyard wrote:
Hi,

Mike Rowell wrote :
File system sizes are set to alert yellow at 80% capacity and red at
90%, the variables to alter this are at the top of the file.
I don't know about ZFS, but are these the same kind of values "du"
reports ? If so, maybe it's a duplicate, or maybe you should format
the
output the way "disk" does.

Just a question/suggestion.

Regards,
-- 
Rich Smrcina
VM Assist, Inc.
Phone: XXX-XXX-XXXX
Ans Service:  XXX-XXX-XXXX
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2007 - Green Bay, WI - May 18-22, 2007


This email has been scanned for all viruses by the MessageLabs service.

This email has been scanned for all viruses by the MessageLabs service. 
list Rich Smrcina · Thu, 12 Apr 2007 11:17:17 -0500 ·
Sounds pretty cool!
quoted from Mike Rowell

Mike Rowell wrote:
It's a bit of both...

ZFS is a file system type that can be applied to a raw device to create
a filesystem, however to get that you need to put the raw device into a
zfs pool which is what the software part does.

It's build directly into the kernel so operates in kernel space, but
also has a lot of dynamic qualities such as compression that can be
enabled and disabled at will, good if you've got a filesystem with a lot
of logs in it etc.

The good thing is that there is no such concept as inodes in zfs so you
can have as many files as you want without worrying about hitting inodes
maximums. 

Mike
-- 
Rich Smrcina
VM Assist, Inc.
Phone: XXX-XXX-XXXX
Ans Service:  XXX-XXX-XXXX
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2007 - Green Bay, WI - May 18-22, 2007
list Uwe Kirbach · Thu, 12 Apr 2007 18:40:26 +0200 ·
Hello Mike + hobbits,
 
i wanted to have a first line in the hobbit message, so that i can include
this line in a sms alert.
That's why i changed your script a little bit.
It gives you "zfs - health: okay - capacity: okay" if all is okay
 
Thanks
 
Uwe Kirbach
 
EnBW Energie Baden-Württemberg
Systeme Infrastruktur Support GmbH
Informationsverarbeitung Operations
Infrastrukturbetrieb Unix
Sitz der Gesellschaft: Karlsruhe
Handelsregister: Amtsgericht Mannheim - HRB 108550
Vorsitzender des Aufsichtsrats: Dr. Bernhard Beck
Geschäftsführer: Jochen Adenau, Dr. Peter Krampf
quoted from Mike Rowell

	-----Original Message-----
	From: Mike Rowell [mailto:user-63f3e97eb1de@xymon.invalid] 
	Sent: Thursday, April 12, 2007 5:14 PM
	To: user-ae9b8668bcde@xymon.invalid
	Subject: RE: [hobbit] ZFS Monitoring Script
	
	
	Sorry made a typo when trying some new functionality, working
version attached.

	 
	Mike

	 
	From: Mike Rowell [mailto:user-63f3e97eb1de@xymon.invalid] 
	Sent: 12 April 2007 15:15
	To: user-ae9b8668bcde@xymon.invalid
	Subject: [hobbit] ZFS Monitoring Script

	 
	Okay here it is, it's small but does the following.

	 
	File system HEALTH.

	 
	ONLINE = green

	DEGRADED = yellow

	FAULTED = red

	 
	File system sizes are set to alert yellow at 80% capacity and red at
90%, the variables to alter this are at the top of the file.  It doesn't
check scrub status as yet as I'm not to sure what the scrub will report
back, so once I've got some scrubbing underway I'll adjust the script to
take into account scrubbing.

	 
	This was something I threw together in 15minutes as we just realized
that UFS would not suit the requirements of a project and therefore we had
to move to ZFS.  Enhancements I'm working on are to display all the storage
devices in the pools and their health and also read / write and checksum
errors, but they will have to wait for a bit.

	Mike Rowell

	Systems Team Leader
	
	* Email: user-63f3e97eb1de@xymon.invalid
	* Tel:   XXX XXXX XXXX
	* Fax:  XXXX XXX XXXX

	www.rightmove.co.uk <http://www.rightmove.co.uk/>;  - the UK's number
1 property website

	This message (including any attachments) is confidential and may be
legally privileged. The content and views expressed are those of the sender
and not necessarily Rightmove plc. If you are not the intended recipient,
you must not disclose, copy or use any part of it. Please delete all copies
immediately and notify the sender. Rightmove plc is registered in England
and Wales, No. 03997679. Registered Office: Rightmove plc, Grafton Court,
Snowdon Drive, Milton Keynes, MK6 1AJ.

	 
	This email has been scanned for all viruses by the MessageLabs
service. 
	
	
	This email has been scanned for all viruses by the MessageLabs
service.


	This email has been scanned for all viruses by the MessageLabs
service. 
	
Attachments (1)
list Galen Johnson · Thu, 12 Apr 2007 18:23:44 -0400 ·
quoted from T.J. Yang
T.J. Yang wrote:
As promised, here is hb client zfs wiki notes.

http://en.wikibooks.org/wiki/System_Monitoring_with_Hobbit/HOWTO#Hobbit_Client_and_ZFS_monitoring 


It is not done yet, I haven't able to see the zfs column on hb server.

T.J. Yang

From: "Mike Rowell" <user-63f3e97eb1de@xymon.invalid>
Reply-To: user-ae9b8668bcde@xymon.invalid
To: <user-ae9b8668bcde@xymon.invalid>
Subject: RE: [hobbit] ZFS Monitoring Script
Date: Thu, 12 Apr 2007 16:13:43 +0100

Sorry made a typo when trying some new functionality, working version
attached.


Mike


From: Mike Rowell [mailto:user-63f3e97eb1de@xymon.invalid]
Sent: 12 April 2007 15:15
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] ZFS Monitoring Script


Okay here it is, it's small but does the following.


File system HEALTH.


ONLINE = green

DEGRADED = yellow

FAULTED = red


File system sizes are set to alert yellow at 80% capacity and red at
90%, the variables to alter this are at the top of the file.  It doesn't
check scrub status as yet as I'm not to sure what the scrub will report
back, so once I've got some scrubbing underway I'll adjust the script to
take into account scrubbing.


This was something I threw together in 15minutes as we just realized
that UFS would not suit the requirements of a project and therefore we
had to move to ZFS.  Enhancements I'm working on are to display all the
storage devices in the pools and their health and also read / write and
checksum errors, but they will have to wait for a bit.
<< zfs_stat.sh >>
Let's not forget about The Shire 
folks... http://www.trantor.org/theshire/doku.php/faq has a template you 
can send to the developers list on the Shire...

=G=