diff options
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/rrdbot/Makefile | 35 | ||||
-rw-r--r-- | net-mgmt/rrdbot/distinfo | 3 | ||||
-rw-r--r-- | net-mgmt/rrdbot/files/patch-parse.c | 43 | ||||
-rw-r--r-- | net-mgmt/rrdbot/files/pkg-message.in | 32 | ||||
-rw-r--r-- | net-mgmt/rrdbot/files/rrdbot.in | 36 | ||||
-rw-r--r-- | net-mgmt/rrdbot/pkg-descr | 16 | ||||
-rw-r--r-- | net-mgmt/rrdbot/pkg-plist | 58 |
7 files changed, 223 insertions, 0 deletions
diff --git a/net-mgmt/rrdbot/Makefile b/net-mgmt/rrdbot/Makefile new file mode 100644 index 000000000000..7690c88cc03c --- /dev/null +++ b/net-mgmt/rrdbot/Makefile @@ -0,0 +1,35 @@ +# New ports collection makefile for: net-mgmt/rrdbot +# Date created: 18 September 2008 +# Whom: Jeremy Chadwick <koitsu@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= rrdbot +PORTVERSION= 0.9.1 +CATEGORIES= net-mgmt +MASTER_SITES= http://memberwebs.com/stef/software/rrdbot/ + +MAINTAINER= koitsu@FreeBSD.org +COMMENT= Threaded SNMP polling daemon which stores data in RRDs + +LIB_DEPENDS= rrd:${PORTSDIR}/databases/rrdtool + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --datarootdir=${PREFIX}/share/rrdbot + +SUB_FILES= pkg-message +USE_RC_SUBR= rrdbot + +MAN1= rrdbot-get.1 +MAN5= rrdbot.conf.5 +MAN8= rrdbot-create.8 rrdbotd.8 + +.if defined(WITH_DEBUG) +CONFIGURE_ARGS+= --enable-debug +.endif + +post-install: + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/net-mgmt/rrdbot/distinfo b/net-mgmt/rrdbot/distinfo new file mode 100644 index 000000000000..18f6e396a908 --- /dev/null +++ b/net-mgmt/rrdbot/distinfo @@ -0,0 +1,3 @@ +MD5 (rrdbot-0.9.1.tar.gz) = 0be67c64be1a87f064351e3964571699 +SHA256 (rrdbot-0.9.1.tar.gz) = 6bc2637fca8f841f10bb08a03f962ff393d181809cfbe011a268603786cbbf79 +SIZE (rrdbot-0.9.1.tar.gz) = 490158 diff --git a/net-mgmt/rrdbot/files/patch-parse.c b/net-mgmt/rrdbot/files/patch-parse.c new file mode 100644 index 000000000000..effce6121719 --- /dev/null +++ b/net-mgmt/rrdbot/files/patch-parse.c @@ -0,0 +1,43 @@ +--- mib/parse.c.orig 2007-05-26 17:42:33.000000000 -0700 ++++ mib/parse.c 2008-09-18 10:42:58.000000000 -0700 +@@ -4516,20 +4516,17 @@ + int + add_mibdir(const char *dirname) + { +- FILE *fp, *ip; ++ FILE *fp; + DIR *dir, *dir2; + const char *oldFile = File; + struct dirent *file; + char token[MAXTOKEN], token2[MAXTOKEN]; +- char tmpstr[300]; ++ char tmpstr[MAXPATHLEN]; + int count = 0; + + DEBUGMSGTL(("parse-mibs", "Scanning directory %s\n", dirname)); + + if ((dir = opendir(dirname))) { +- snprintf(tmpstr, sizeof(tmpstr), "%s/.index", dirname); +- tmpstr[ sizeof(tmpstr)-1 ] = 0; +- ip = fopen(tmpstr, "w"); + while ((file = readdir(dir))) { + /* + * Only parse file names not beginning with a '.' +@@ -4561,8 +4558,6 @@ + if (get_token(fp, token2, MAXTOKEN) == DEFINITIONS) { + new_module(token, tmpstr); + count++; +- if (ip) +- fprintf(ip, "%s %s\n", token, file->d_name); + } + fclose(fp); + } +@@ -4570,8 +4565,6 @@ + } + File = oldFile; + closedir(dir); +- if (ip) +- fclose(ip); + return (count); + } + return (-1); diff --git a/net-mgmt/rrdbot/files/pkg-message.in b/net-mgmt/rrdbot/files/pkg-message.in new file mode 100644 index 000000000000..801e82d07886 --- /dev/null +++ b/net-mgmt/rrdbot/files/pkg-message.in @@ -0,0 +1,32 @@ + +Post-Installation Procedure +=========================== +Before starting the rrdbot daemon for the first time, you need to +perform some necessary steps: + +1. Create configuration file(s) of what you wish to monitor, and + and place them in %%PREFIX%%/etc/rrdbot +2. Create the RRD files based on the above configuration file(s), + using %%PREFIX%%/sbin/rrdbot-create + +When creating your rrdbot configuration files which use the "archive" +feature, be sure your archive durations are correct mathematically +when compared to the actual SNMP polling interval. For example, +assuming your SNMP polling interval is 30: + + 6/minute -- won't work (6*30 = 180 seconds) + 2/minute -- will work (2*30 = 60 seconds) + +Otherwise you'll receive this kind of warning when using rrdbot-create: + + rrdbot-create: my.conf: archive has too many data points for polling interval. ignoring + +Once you've followed these steps, you can start the daemon by setting +rrdbot_enable="yes" in rc.conf, and then execute: + + %%PREFIX%%/etc/rc.d/rrdbot start + +If you forgot to run rrdbot-create, rrdbotd will start but will silently +fail when trying to write data to the non-existent RRD. So please be +sure to follow the above! + diff --git a/net-mgmt/rrdbot/files/rrdbot.in b/net-mgmt/rrdbot/files/rrdbot.in new file mode 100644 index 000000000000..07e586852360 --- /dev/null +++ b/net-mgmt/rrdbot/files/rrdbot.in @@ -0,0 +1,36 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: rrdbot +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable rrdbot: +# rrdbot_enable (bool): Set to "NO" by default. +# Set it to "YES" to start rrdbotd. +# rrdbot_pidfile (str): pidfile location for rrdbotd. +# Defaults to "/var/run/rrdbotd.pid". +# rrdbot_flags (str): Custom command-line flags to be passed +# to rrdbotd (default: none). +# + +. %%RC_SUBR%% + +name="rrdbot" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${rrdbot_enable="NO"} +: ${rrdbot_pidfile="/var/run/rrdbotd.pid"} +: ${rrdbot_flags=""} + +pidfile="${rrdbot_pidfile}" + +command="%%PREFIX%%/sbin/rrdbotd" +command_args="-p ${rrdbot_pidfile} ${rrdbot_flags}" + +run_rc_command "$1" diff --git a/net-mgmt/rrdbot/pkg-descr b/net-mgmt/rrdbot/pkg-descr new file mode 100644 index 000000000000..d6ea3615cb51 --- /dev/null +++ b/net-mgmt/rrdbot/pkg-descr @@ -0,0 +1,16 @@ +RRDBot is an SNMP polling daemon which writes the polled values to an RRD +database. It can poll many different SNMP sources in an efficient manner. + +It has no large external dependencies, and its configuration is stored in text +files. It has full support for MIB definition files and using textual MIBs +instead of numerical OIDs. + +A nice feature is the querying of SNMP tables without using a specific index. +Indexes of the rows in an SNMP table may change from time to time, and are less +than ideal for long term tracking of a given value. For example RRDBot can +query the traffic on your router based on the 'xl0' interface name. + +RRDBot also contains tools to simplify the creation of RRD files, and the +various archives contained in them. + +WWW: http://memberwebs.com/stef/software/rrdbot/ diff --git a/net-mgmt/rrdbot/pkg-plist b/net-mgmt/rrdbot/pkg-plist new file mode 100644 index 000000000000..0abd06ce37a4 --- /dev/null +++ b/net-mgmt/rrdbot/pkg-plist @@ -0,0 +1,58 @@ +sbin/rrdbot-create +sbin/rrdbot-get +sbin/rrdbotd +share/rrdbot/mib/AGENTX-MIB.txt +share/rrdbot/mib/BEGEMOT-MIB.txt +share/rrdbot/mib/BGP4-MIB.txt +share/rrdbot/mib/BRIDGE-MIB.txt +share/rrdbot/mib/DISMAN-SCHEDULE-MIB.txt +share/rrdbot/mib/DISMAN-SCRIPT-MIB.txt +share/rrdbot/mib/EtherLike-MIB.txt +share/rrdbot/mib/FOKUS-MIB.txt +share/rrdbot/mib/GNOME-SMI.txt +share/rrdbot/mib/HCNUM-TC.txt +share/rrdbot/mib/HOST-RESOURCES-MIB.txt +share/rrdbot/mib/HOST-RESOURCES-TYPES.txt +share/rrdbot/mib/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt +share/rrdbot/mib/IANA-LANGUAGE-MIB.txt +share/rrdbot/mib/IANAifType-MIB.txt +share/rrdbot/mib/IF-INVERTED-STACK-MIB.txt +share/rrdbot/mib/IF-MIB.txt +share/rrdbot/mib/INET-ADDRESS-MIB.txt +share/rrdbot/mib/IP-FORWARD-MIB.txt +share/rrdbot/mib/IP-MIB.txt +share/rrdbot/mib/IPV6-ICMP-MIB.txt +share/rrdbot/mib/IPV6-MIB.txt +share/rrdbot/mib/IPV6-TC.txt +share/rrdbot/mib/IPV6-TCP-MIB.txt +share/rrdbot/mib/IPV6-UDP-MIB.txt +share/rrdbot/mib/LM-SENSORS-MIB.txt +share/rrdbot/mib/NOTIFICATION-LOG-MIB.txt +share/rrdbot/mib/OSPF-MIB.txt +share/rrdbot/mib/REGEX-MIB.txt +share/rrdbot/mib/RFC-1215.txt +share/rrdbot/mib/RFC1155-SMI.txt +share/rrdbot/mib/RFC1213-MIB.txt +share/rrdbot/mib/RIPv2-MIB.txt +share/rrdbot/mib/RMON-MIB.txt +share/rrdbot/mib/SMUX-MIB.txt +share/rrdbot/mib/SNMP-COMMUNITY-MIB.txt +share/rrdbot/mib/SNMP-FRAMEWORK-MIB.txt +share/rrdbot/mib/SNMP-MPD-MIB.txt +share/rrdbot/mib/SNMP-NOTIFICATION-MIB.txt +share/rrdbot/mib/SNMP-PROXY-MIB.txt +share/rrdbot/mib/SNMP-TARGET-MIB.txt +share/rrdbot/mib/SNMP-USER-BASED-SM-MIB.txt +share/rrdbot/mib/SNMP-USM-AES-MIB.txt +share/rrdbot/mib/SNMP-VIEW-BASED-ACM-MIB.txt +share/rrdbot/mib/SNMPv2-CONF.txt +share/rrdbot/mib/SNMPv2-MIB.txt +share/rrdbot/mib/SNMPv2-SMI.txt +share/rrdbot/mib/SNMPv2-TC.txt +share/rrdbot/mib/SNMPv2-TM.txt +share/rrdbot/mib/SOURCE-ROUTING-MIB.txt +share/rrdbot/mib/TCP-MIB.txt +share/rrdbot/mib/UDP-MIB.txt +@dirrm share/rrdbot/mib +@dirrm share/rrdbot +@dirrmtry etc/rrdbot |