svn commit: r419615 - in head/sysutils: munin-common/files munin-node munin-node/plugins
Mathieu Arnold
mat at FreeBSD.org
Thu Aug 4 14:26:57 UTC 2016
Author: mat
Date: Thu Aug 4 14:26:56 2016
New Revision: 419615
URL: https://svnweb.freebsd.org/changeset/ports/419615
Log:
Fix swap accounting if there are multiple devices [1]
Add a few zfs related plugins [2]
PR: 210494 [1]
Submitted by: bcr [2]
Reported by: Fabian Keil [1]
Sponsored by: Absolight
Added:
head/sysutils/munin-common/files/patch-plugins_node.d.freebsd_memory.in (contents, props changed)
head/sysutils/munin-node/plugins/
head/sysutils/munin-node/plugins/zfs_compress (contents, props changed)
head/sysutils/munin-node/plugins/zpool_chksum (contents, props changed)
head/sysutils/munin-node/plugins/zpool_dedup (contents, props changed)
Modified:
head/sysutils/munin-node/Makefile (contents, props changed)
Added: head/sysutils/munin-common/files/patch-plugins_node.d.freebsd_memory.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/munin-common/files/patch-plugins_node.d.freebsd_memory.in Thu Aug 4 14:26:56 2016 (r419615)
@@ -0,0 +1,8 @@
+--- plugins/node.d.freebsd/memory.in.orig 2014-11-24 21:46:24 UTC
++++ plugins/node.d.freebsd/memory.in
+@@ -74,4 +74,4 @@ echo wired.value $(($WIRED_COUNT*$PAGESI
+ echo buffers.value $(($BUFFERS_COUNT))
+ echo cached.value $(($CACHE_COUNT*$PAGESIZE))
+ echo free.value $(($FREE_COUNT*$PAGESIZE))
+-echo swap.value $(swapinfo -k | awk '{sum += $3}; END {print sum * 1024}')
++echo swap.value $(swapinfo -k | awk '!/^Total/ && !/^Device/ {sum += $3}; END {print sum * 1024}')
Modified: head/sysutils/munin-node/Makefile
==============================================================================
--- head/sysutils/munin-node/Makefile Thu Aug 4 14:18:33 2016 (r419614)
+++ head/sysutils/munin-node/Makefile Thu Aug 4 14:26:56 2016 (r419615)
@@ -3,7 +3,7 @@
PORTNAME= munin
PORTVERSION= ${MUNIN_VERSION}
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= sysutils perl5
MASTER_SITES= ${MUNIN_SITES}
PKGNAMESUFFIX= -node
Added: head/sysutils/munin-node/plugins/zfs_compress
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/munin-node/plugins/zfs_compress Thu Aug 4 14:26:56 2016 (r419615)
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+set -e
+set -u
+
+cat <<'EOM'
+graph_title ZFS dataset compression ratio
+graph_vlabel ratio
+graph_category ZFS
+graph_info This graph shows the ZFS dataset compression ratio
+EOM
+
+listing=$(zfs get -t filesystem -H compressratio)
+
+while read -r label _ ratio _; do
+ clean_label=$(echo "${label}" | sed -e 's|/|__|g')
+ echo "${clean_label}.label ${label}"
+ echo "${clean_label}.value ${ratio%x}"
+done <<eot
+${listing}
+eot
+
+exit 0
+
+
Added: head/sysutils/munin-node/plugins/zpool_chksum
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/munin-node/plugins/zpool_chksum Thu Aug 4 14:26:56 2016 (r419615)
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+set -e
+set -u
+
+cat <<'EOM'
+graph_title ZFS dataset error counters
+graph_vlabel amount of errors
+graph_category ZFS
+graph_info This graph shows the ZFS dataset error counters for reads, writes, and checksums
+EOM
+
+status=$(zpool status|awk 'BEGIN {p=0} /spares$/ || /^$/ {p=0} p==1 {print} /NAME.*STATE.*READ/ {p=1}')
+
+while read -r label _ r w c; do
+ echo "R${label}.label READ ${label} "
+ echo "R${label}.value ${r}"
+ echo "R${label}.warning 1"
+ echo "R${label}.critical 2"
+ echo "W${label}.label WRITE ${label} "
+ echo "W${label}.value ${w}"
+ echo "W${label}.warning 1"
+ echo "W${label}.critical 2"
+ echo "C${label}.label CHKSUM ${label}"
+ echo "C${label}.value ${c}"
+ echo "C${label}.warning 1"
+ echo "C${label}.critical 2"
+done <<eot
+${status}
+eot
+
+exit 0
Added: head/sysutils/munin-node/plugins/zpool_dedup
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/munin-node/plugins/zpool_dedup Thu Aug 4 14:26:56 2016 (r419615)
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+set -e
+set -u
+
+cat <<'EOM'
+graph_title ZFS deduplication ratio
+graph_vlabel ratio
+graph_category ZFS
+graph_info This graph shows the ZFS pool deduplication ratio
+EOM
+
+listing=$(zpool get -H dedup)
+
+while read -r label _ ratio _; do
+ echo "${label}.label ${label}"
+ echo "${label}.value ${ratio%x}"
+done <<eot
+${listing}
+eot
+
+exit 0
+
More information about the svn-ports-head
mailing list