pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/munin-node Add an entropy monitoring script f...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8313c2b58f98
branches:  trunk
changeset: 622088:8313c2b58f98
user:      he <he%pkgsrc.org@localhost>
date:      Thu Jul 25 11:41:25 2013 +0000

description:
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.

diffstat:

 sysutils/munin-node/Makefile                            |   4 +-
 sysutils/munin-node/PLIST                               |   3 +-
 sysutils/munin-node/files/node/node.d.netbsd/entropy.in |  39 +++++++++++++++++
 3 files changed, 43 insertions(+), 3 deletions(-)

diffs (76 lines):

diff -r 47d5c8a7e5ab -r 8313c2b58f98 sysutils/munin-node/Makefile
--- a/sysutils/munin-node/Makefile      Thu Jul 25 09:46:49 2013 +0000
+++ b/sysutils/munin-node/Makefile      Thu Jul 25 11:41:25 2013 +0000
@@ -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 -r 47d5c8a7e5ab -r 8313c2b58f98 sysutils/munin-node/PLIST
--- a/sysutils/munin-node/PLIST Thu Jul 25 09:46:49 2013 +0000
+++ b/sysutils/munin-node/PLIST Thu Jul 25 11:41:25 2013 +0000
@@ -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 @@
 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 -r 47d5c8a7e5ab -r 8313c2b58f98 sysutils/munin-node/files/node/node.d.netbsd/entropy.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/munin-node/files/node/node.d.netbsd/entropy.in   Thu Jul 25 11:41:25 2013 +0000
@@ -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 }'



Home | Main Index | Thread Index | Old Index