Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
monitors:bb-zfs [2013/07/16 03:44] – external edit 127.0.0.1 | monitors:bb-zfs [2020/04/21 01:05] – [Changelog] freesoftwareservers | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== bb-zfs ====== | ====== bb-zfs ====== | ||
- | ^ Author | [[ everett.vernon@gmail.com | Vernon Everett ]] | | + | ^ Author |
- | ^ Compatibility | Xymon 4.2 | | + | ^ Compatibility |
- | ^ Requirements | ZFS | | + | ^ Requirements |
- | ^ Download | None | | + | ^ Download |
- | ^ Last Update | 2010-07-21 | | + | ^ Last Update |
===== Description ===== | ===== Description ===== | ||
Line 16: | Line 16: | ||
[zfs] | [zfs] | ||
ENVFILE $HOBBITCLIENTHOME/ | ENVFILE $HOBBITCLIENTHOME/ | ||
- | CMD $HOBBITCLIENTHOME/ | + | CMD $HOBBITCLIENTHOME/ |
LOGFILE $HOBBITCLIENTHOME/ | LOGFILE $HOBBITCLIENTHOME/ | ||
INTERVAL 5m | INTERVAL 5m | ||
Line 22: | Line 22: | ||
=== Server side === | === Server side === | ||
* Add the following lines to hobbitgraph.cfg < | * Add the following lines to hobbitgraph.cfg < | ||
- | | + | [zfs] |
FNPATTERN ^zfs, | FNPATTERN ^zfs, | ||
TITLE ZFS Capacity | TITLE ZFS Capacity | ||
- | YAXIS % | + | YAXIS % Full |
- | -u 100 | + | |
- | -l 0 | + | |
DEF: | DEF: | ||
LINE2: | LINE2: | ||
+ | -u 100 | ||
+ | -l 0 | ||
GPRINT: | GPRINT: | ||
GPRINT: | GPRINT: | ||
Line 36: | Line 36: | ||
</ | </ | ||
* In hobbitserver.cfg, | * In hobbitserver.cfg, | ||
- | < | + | < |
+ | TEST2RRD=" | ||
+ | SPLITNCV_zfs=" | ||
</ | </ | ||
- | |||
- | * Add zfs=ncv to TEST2RRD= | ||
- | * Add zfs to GRAPHS= | ||
===== Source ===== | ===== Source ===== | ||
Line 53: | Line 52: | ||
# 4. Vernon Everett < | # 4. Vernon Everett < | ||
# : Added graphing data | # : Added graphing data | ||
+ | # 5. FreeSoftwareServers < | ||
+ | # Update to new "zpool list -h" format | ||
+ | # Add Available/ | ||
+ | # Full "zpool status" | ||
+ | # Set DEGRADED=RED | ||
+ | # DISKYELL=90 & DISKRED=95 | ||
- | DISKYELL=80 | + | DISKYELL=90 |
- | DISKRED=90 | + | DISKRED=95 |
SNAPRED=90 | SNAPRED=90 | ||
SNAPYELL=60 # Days old | SNAPYELL=60 # Days old | ||
SNAPCOL=true | SNAPCOL=true | ||
- | CHECKSNAPS=true # Set to true to do snapshot checking | + | CHECKSNAPS=true# |
TEST=" | TEST=" | ||
DISPCOLOR=" | DISPCOLOR=" | ||
Line 68: | Line 73: | ||
#What: beautify the page display by html code. | #What: beautify the page display by html code. | ||
- | STRING="< | + | STRING="< |
#What: a loop to parse output of "zpool list -H" output. | #What: a loop to parse output of "zpool list -H" output. | ||
# bash-3.00# zpool list | # bash-3.00# zpool list | ||
# NAME SIZE USED | # NAME SIZE USED | ||
# mypool | # mypool | ||
+ | ##### | ||
+ | # | ||
+ | #:# zpool list | ||
+ | #NAME | ||
+ | # | ||
# bash-3.00# zpool list -H | # bash-3.00# zpool list -H | ||
# mypool | # mypool | ||
# bash-3.00# | # bash-3.00# | ||
- | /usr/sbin/zpool list -H | while read name size used avail cap health altroot | + | |
+ | zpool list -H | while read name size alloc free expandsz frag cap dedup health altroot | ||
do | do | ||
LINE_COLOR=" | LINE_COLOR=" | ||
Line 84: | Line 95: | ||
HEALTH_COLOR=" | HEALTH_COLOR=" | ||
elif [ " | elif [ " | ||
- | HEALTH_COLOR=" | + | HEALTH_COLOR=" |
elif [ " | elif [ " | ||
HEALTH_COLOR=" | HEALTH_COLOR=" | ||
fi | fi | ||
+ | |||
CAP_COLOR=" | CAP_COLOR=" | ||
Line 96: | Line 108: | ||
CAP_COLOR=" | CAP_COLOR=" | ||
fi | fi | ||
- | DATA=$(/usr/bin/echo "$name : $cap\n$DATA" | + | DATA=$(echo "$name : $cap\n$DATA" |
# Determine the line colours | # Determine the line colours | ||
Line 103: | Line 115: | ||
# Determine the messages | # Determine the messages | ||
- | [ " | + | [ " |
- | [ " | + | [ " |
[ " | [ " | ||
[ " | [ " | ||
Line 112: | Line 124: | ||
[ " | [ " | ||
- | | + | STRING=" |
done | done | ||
- | DATA=$(/usr/bin/echo "$DATA \n\n") | + | DATA=$(echo "$DATA \n\n") |
STRING=" | STRING=" | ||
- | STRING=" | + | STRING=" |
- | FIRST_LINE=" | + | FIRST_LINE=" |
# Snapshot check | # Snapshot check | ||
Line 187: | Line 199: | ||
* **2013-07-16** | * **2013-07-16** | ||
* Changed graphing FNPATTERN to **^**zfs, | * Changed graphing FNPATTERN to **^**zfs, | ||
+ | * **2020-04-20** | ||
+ | * Update to new "zpool list -h" format | ||
+ | * Add Available/ | ||
+ | * Full "zpool status" | ||
+ | * Set DEGRADED=RED | ||
+ | * DISKYELL=90 & DISKRED=95 |