summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2013-07-25 11:41:25 +0000
committerhe <he@pkgsrc.org>2013-07-25 11:41:25 +0000
commit3687166c6c3015f34b7f78ad35a7abeeca81a1e8 (patch)
tree65b49fcd03e01ff9f1c7eb368249fec0399520ae
parent5c6c44fdc58a295aff5b255be53dba10456ae18e (diff)
downloadpkgsrc-3687166c6c3015f34b7f78ad35a7abeeca81a1e8.tar.gz
Add an entropy monitoring script for NetBSD. This script needs to run
as root, so you need a ${SYSCONFDIR}/munin/plugin-conf.d/entropy file with [entropy] user root as contents to get any values. And... at the same time, I notice that the postfix_mailqueue script also needs a postfix plugin-conf.d file with [postfix_mailqueue] user postfix as contents to get any values. Bump PKGREVISION.
-rw-r--r--sysutils/munin-node/Makefile4
-rw-r--r--sysutils/munin-node/PLIST3
-rw-r--r--sysutils/munin-node/files/node/node.d.netbsd/entropy.in39
3 files changed, 43 insertions, 3 deletions
diff --git a/sysutils/munin-node/Makefile b/sysutils/munin-node/Makefile
index 3b3ac40b1aa..4908b9d40b7 100644
--- a/sysutils/munin-node/Makefile
+++ b/sysutils/munin-node/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.30 2013/07/12 10:45:03 jperkin Exp $
+# $NetBSD: Makefile,v 1.31 2013/07/25 11:41:25 he Exp $
#
DISTNAME= munin_${VER}
VER= 1.3.2
PKGNAME= munin-node-${VER}
-PKGREVISION= 14
+PKGREVISION= 15
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=munin/}
diff --git a/sysutils/munin-node/PLIST b/sysutils/munin-node/PLIST
index f4669e0322d..0e83ea4a98f 100644
--- a/sysutils/munin-node/PLIST
+++ b/sysutils/munin-node/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.11 2010/12/11 12:09:23 abs Exp $
+@comment $NetBSD: PLIST,v 1.12 2013/07/25 11:41:25 he Exp $
lib/munin/plugins/acpi
lib/munin/plugins/amavis
lib/munin/plugins/apache_accesses
@@ -22,6 +22,7 @@ ${PLIST.linux}lib/munin/plugins/df_abs
lib/munin/plugins/df_inode
lib/munin/plugins/dhcpd3
${PLIST.linux}lib/munin/plugins/entropy
+${PLIST.netbsd}lib/munin/plugins/entropy
lib/munin/plugins/exim_mailqueue
lib/munin/plugins/exim_mailqueue_alt
lib/munin/plugins/exim_mailstats
diff --git a/sysutils/munin-node/files/node/node.d.netbsd/entropy.in b/sysutils/munin-node/files/node/node.d.netbsd/entropy.in
new file mode 100644
index 00000000000..1939394dea4
--- /dev/null
+++ b/sysutils/munin-node/files/node/node.d.netbsd/entropy.in
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# Plugin to monitor available entropy
+#
+# Usage: Link or copy into /etc/munin/node.d/
+#
+# Magic markers (optional - only used by munin-config and some
+# installation scripts):
+#
+#%# family=auto
+#%# capabilities=autoconf
+
+
+
+if [ "$1" = "autoconf" ]; then
+ if [ -x /sbin/rndctl ]; then
+ echo yes
+ exit 0
+ else
+ echo no
+ exit 1
+ fi
+fi
+
+
+if [ "$1" = "config" ]; then
+ echo 'graph_title Available entropy'
+ echo 'graph_args --base 1000 -l 0'
+ echo 'graph_vlabel entropy (bytes)'
+ echo 'graph_scale no'
+ echo 'graph_category system'
+ echo 'graph_info This graph shows the amount of entropy available in the system.'
+ echo 'entropy.label entropy'
+ echo 'entropy.info The number of random bytes available. This is typically used by cryptographic applications.'
+ exit 0
+fi
+
+echo -n "entropy.value "
+/sbin/rndctl -s | /usr/bin/awk '/bits currently stored/ { print $1 }'