ports/56265: [new port] net/cacti - Frontend for RRDTOOL

Sergey Akifyev asa at gascom.ru
Mon Sep 1 10:20:14 UTC 2003


>Number:         56265
>Category:       ports
>Synopsis:       [new port] net/cacti - Frontend for RRDTOOL
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 01 03:20:09 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Sergey Akifyev
>Release:        FreeBSD 4.8-RELEASE-p3 i386
>Organization:
JSC Gascom
>Environment:
System: FreeBSD asa.gascom.net.ru 4.8-RELEASE-p3 FreeBSD 4.8-RELEASE-p3 #7: Mon Aug 11 11:27:23 MSD 2003 asa at boulder.gascom.ru:/usr/src/sys/compile/ASA i386

>Description:
Cacti is a complete frontend to RRDTool,
it stores all of the necessary information
to create graphs and populate them with
data in a MySQL database. The frontend
is completely PHP driven. Along with being
able to maintain Graphs, Data Sources, and
Round Robin Archives in a database, cacti
handles the data gathering. There is also
SNMP support for those used to creating
traffic graphs with MRTG.
 
WWW: http://www.raxnet.net/products/cacti/
>How-To-Repeat:
N/A
>Fix:

--- cacti.sh begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	cacti
#	cacti/pkg-descr
#	cacti/pkg-plist
#	cacti/distinfo
#	cacti/Makefile
#	cacti/pkg-message
#	cacti/files
#	cacti/files/cacti_db.sh
#	cacti/files/cacti.cron
#	cacti/pkg-install
#
echo c - cacti
mkdir -p cacti > /dev/null 2>&1
echo x - cacti/pkg-descr
sed 's/^X//' >cacti/pkg-descr << 'END-of-cacti/pkg-descr'
XCacti is a complete frontend to RRDTool,
Xit stores all of the necessary information
Xto create graphs and populate them with
Xdata in a MySQL database. The frontend
Xis completely PHP driven. Along with being
Xable to maintain Graphs, Data Sources, and
XRound Robin Archives in a database, cacti
Xhandles the data gathering. There is also
XSNMP support for those used to creating
Xtraffic graphs with MRTG.
X
XWWW: http://www.raxnet.net/products/cacti/
END-of-cacti/pkg-descr
echo x - cacti/pkg-plist
sed 's/^X//' >cacti/pkg-plist << 'END-of-cacti/pkg-plist'
X%%CACTIDIR%%/LICENSE
X%%CACTIDIR%%/README
X%%CACTIDIR%%/about.php
X%%CACTIDIR%%/auth_changepassword.php
X%%CACTIDIR%%/auth_login.php
X%%CACTIDIR%%/auth_noauth.php
X%%CACTIDIR%%/cacti.cron
X%%CACTIDIR%%/cacti.sql
X%%CACTIDIR%%/cacti_db.sh
X%%CACTIDIR%%/cactid/AUTHORS
X%%CACTIDIR%%/cactid/COPYING
X%%CACTIDIR%%/cactid/ChangeLog
X%%CACTIDIR%%/cactid/INSTALL
X%%CACTIDIR%%/cactid/Makefile.am
X%%CACTIDIR%%/cactid/Makefile.in
X%%CACTIDIR%%/cactid/NEWS
X%%CACTIDIR%%/cactid/README
X%%CACTIDIR%%/cactid/aclocal.m4
X%%CACTIDIR%%/cactid/cactid.c
X%%CACTIDIR%%/cactid/cactid.conf
X%%CACTIDIR%%/cactid/cactid.h
X%%CACTIDIR%%/cactid/common.h
X%%CACTIDIR%%/cactid/config/config.guess
X%%CACTIDIR%%/cactid/config/config.h.in
X%%CACTIDIR%%/cactid/config/config.sub
X%%CACTIDIR%%/cactid/config/install-sh
X%%CACTIDIR%%/cactid/config/mkinstalldirs
X%%CACTIDIR%%/cactid/config/stamp-h
X%%CACTIDIR%%/cactid/config/stamp-h.in
X%%CACTIDIR%%/cactid/configure
X%%CACTIDIR%%/cactid/configure.in
X%%CACTIDIR%%/cactid/locks.c
X%%CACTIDIR%%/cactid/mysql.c
X%%CACTIDIR%%/cactid/poller.c
X%%CACTIDIR%%/cactid/rrd.c
X%%CACTIDIR%%/cactid/util.c
X%%CACTIDIR%%/cdef.php
X%%CACTIDIR%%/cmd.php
X%%CACTIDIR%%/color.php
X%%CACTIDIR%%/data_input.php
X%%CACTIDIR%%/data_sources.php
X%%CACTIDIR%%/data_templates.php
X%%CACTIDIR%%/docs/CHANGELOG
X%%CACTIDIR%%/docs/CONTRIB
X%%CACTIDIR%%/docs/INSTALL-WIN32.htm
X%%CACTIDIR%%/docs/INSTALL.htm
X%%CACTIDIR%%/docs/README
X%%CACTIDIR%%/docs/UPGRADE.htm
X%%CACTIDIR%%/docs/manual/cacti.gif
X%%CACTIDIR%%/docs/manual/index.htm
X%%CACTIDIR%%/docs/manual/main.css
X%%CACTIDIR%%/docs/manual/section1.htm
X%%CACTIDIR%%/docs/manual/section2.htm
X%%CACTIDIR%%/docs/manual/section2_1.htm
X%%CACTIDIR%%/docs/manual/section2_2.htm
X%%CACTIDIR%%/docs/manual/section3.htm
X%%CACTIDIR%%/docs/manual/section4.htm
X%%CACTIDIR%%/docs/manual/section4_1.htm
X%%CACTIDIR%%/docs/manual/section4_2.htm
X%%CACTIDIR%%/docs/manual/section4_3.htm
X%%CACTIDIR%%/docs/manual/section5.htm
X%%CACTIDIR%%/docs/manual/section5_1.htm
X%%CACTIDIR%%/docs/manual/section5_2.htm
X%%CACTIDIR%%/docs/manual/section6.htm
X%%CACTIDIR%%/docs/manual/section6_1.htm
X%%CACTIDIR%%/docs/manual/section6_2.htm
X%%CACTIDIR%%/docs/manual/section7.htm
X%%CACTIDIR%%/docs/manual/section8.htm
X%%CACTIDIR%%/docs/manual/section8_1.htm
X%%CACTIDIR%%/docs/manual/section8_2.htm
X%%CACTIDIR%%/docs/manual/section8_3.htm
X%%CACTIDIR%%/gprint_presets.php
X%%CACTIDIR%%/graph.php
X%%CACTIDIR%%/graph_image.php
X%%CACTIDIR%%/graph_settings.php
X%%CACTIDIR%%/graph_templates.php
X%%CACTIDIR%%/graph_view.php
X%%CACTIDIR%%/graphs.php
X%%CACTIDIR%%/host.php
X%%CACTIDIR%%/host_templates.php
X%%CACTIDIR%%/images/arrow.gif
X%%CACTIDIR%%/images/auth_deny.gif
X%%CACTIDIR%%/images/auth_login.gif
X%%CACTIDIR%%/images/blue_line.gif
X%%CACTIDIR%%/images/button_add.gif
X%%CACTIDIR%%/images/button_cancel.gif
X%%CACTIDIR%%/images/button_cancel2.gif
X%%CACTIDIR%%/images/button_create.gif
X%%CACTIDIR%%/images/button_delete.gif
X%%CACTIDIR%%/images/button_go.gif
X%%CACTIDIR%%/images/button_no.gif
X%%CACTIDIR%%/images/button_save.gif
X%%CACTIDIR%%/images/button_view.gif
X%%CACTIDIR%%/images/button_yes.gif
X%%CACTIDIR%%/images/cacti_logo.gif
X%%CACTIDIR%%/images/delete_icon.gif
X%%CACTIDIR%%/images/delete_icon_large.gif
X%%CACTIDIR%%/images/gray_line.gif
X%%CACTIDIR%%/images/hide.gif
X%%CACTIDIR%%/images/menu_line.gif
X%%CACTIDIR%%/images/move_down.gif
X%%CACTIDIR%%/images/move_up.gif
X%%CACTIDIR%%/images/raxnet_logo.gif
X%%CACTIDIR%%/images/reload_icon_small.gif
X%%CACTIDIR%%/images/show.gif
X%%CACTIDIR%%/images/top_banner.gif
X%%CACTIDIR%%/images/top_tabs_cacti.gif
X%%CACTIDIR%%/images/top_tabs_console.gif
X%%CACTIDIR%%/images/top_tabs_graph_list.gif
X%%CACTIDIR%%/images/top_tabs_graph_list_down.gif
X%%CACTIDIR%%/images/top_tabs_graph_preview.gif
X%%CACTIDIR%%/images/top_tabs_graph_preview_down.gif
X%%CACTIDIR%%/images/top_tabs_graph_settings.gif
X%%CACTIDIR%%/images/top_tabs_graph_settings_down.gif
X%%CACTIDIR%%/images/top_tabs_graph_tree.gif
X%%CACTIDIR%%/images/top_tabs_graph_tree_down.gif
X%%CACTIDIR%%/images/top_tabs_graphs.gif
X%%CACTIDIR%%/images/top_tabs_logout.gif
X%%CACTIDIR%%/images/transparent_line.gif
X%%CACTIDIR%%/include/adodb/adodb-connection.inc.php
X%%CACTIDIR%%/include/adodb/adodb-cryptsession.php
X%%CACTIDIR%%/include/adodb/adodb-csvlib.inc.php
X%%CACTIDIR%%/include/adodb/adodb-datadict.inc.php
X%%CACTIDIR%%/include/adodb/adodb-errorhandler.inc.php
X%%CACTIDIR%%/include/adodb/adodb-errorpear.inc.php
X%%CACTIDIR%%/include/adodb/adodb-lib.inc.php
X%%CACTIDIR%%/include/adodb/adodb-pager.inc.php
X%%CACTIDIR%%/include/adodb/adodb-pear.inc.php
X%%CACTIDIR%%/include/adodb/adodb-recordset.inc.php
X%%CACTIDIR%%/include/adodb/adodb-session.php
X%%CACTIDIR%%/include/adodb/adodb-time.inc.php
X%%CACTIDIR%%/include/adodb/adodb.inc.php
X%%CACTIDIR%%/include/adodb/crypt.inc.php
X%%CACTIDIR%%/include/adodb/datadict/datadict-mssql.inc.php
X%%CACTIDIR%%/include/adodb/datadict/datadict-mysql.inc.php
X%%CACTIDIR%%/include/adodb/datadict/datadict-oci8.inc.php
X%%CACTIDIR%%/include/adodb/datadict/datadict-postgres.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-access.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-ado.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-ado_access.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-ado_mssql.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-borland_ibase.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-csv.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-db2.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-fbsql.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-firebird.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-ibase.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-informix.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-informix72.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-mssql.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-mssqlpo.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-mysql.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-mysqlt.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-oci8.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-oci805.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-oci8po.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-odbc.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-odbc_mssql.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-odbc_oracle.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-oracle.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-postgres.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-postgres64.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-postgres7.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-proxy.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-sqlanywhere.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-sybase.inc.php
X%%CACTIDIR%%/include/adodb/drivers/adodb-vfp.inc.php
X%%CACTIDIR%%/include/adodb/license.txt
X%%CACTIDIR%%/include/adodb/pivottable.inc.php
X%%CACTIDIR%%/include/adodb/rsfilter.inc.php
X%%CACTIDIR%%/include/adodb/server.php
X%%CACTIDIR%%/include/adodb/toexport.inc.php
X%%CACTIDIR%%/include/adodb/tohtml.inc.php
X%%CACTIDIR%%/include/auth.php
X%%CACTIDIR%%/include/bottom_footer.php
X%%CACTIDIR%%/include/cdef_functions.php
X%%CACTIDIR%%/include/config.php
X%%CACTIDIR%%/include/config_arrays.php
X%%CACTIDIR%%/include/config_settings.php
X%%CACTIDIR%%/include/database.php
X%%CACTIDIR%%/include/form.php
X%%CACTIDIR%%/include/functions.php
X%%CACTIDIR%%/include/graph_export_functions.php
X%%CACTIDIR%%/include/main.css
X%%CACTIDIR%%/include/rrd_functions.php
X%%CACTIDIR%%/include/snmp_functions.php
X%%CACTIDIR%%/include/top_graph_header.php
X%%CACTIDIR%%/include/top_header.php
X%%CACTIDIR%%/include/tree_functions.php
X%%CACTIDIR%%/include/tree_view_functions.php
X%%CACTIDIR%%/include/utility_functions.php
X%%CACTIDIR%%/include/xml_functions.php
X%%CACTIDIR%%/index.php
X%%CACTIDIR%%/install/index.php
X%%CACTIDIR%%/install/install_finish.gif
X%%CACTIDIR%%/install/install_next.gif
X%%CACTIDIR%%/install/update_to_0_8.php
X%%CACTIDIR%%/log/rrd.log
X%%CACTIDIR%%/logout.php
X%%CACTIDIR%%/resource/script_queries/host_cpu.xml
X%%CACTIDIR%%/resource/script_queries/host_disk.xml
X%%CACTIDIR%%/resource/script_queries/unix_disk.xml
X%%CACTIDIR%%/resource/snmp_queries/host_disk.xml
X%%CACTIDIR%%/resource/snmp_queries/interface.xml
X%%CACTIDIR%%/resource/snmp_queries/kbridge.xml
X%%CACTIDIR%%/resource/snmp_queries/net-snmp_disk.xml
X%%CACTIDIR%%/resource/snmp_queries/netware_cpu.xml
X%%CACTIDIR%%/resource/snmp_queries/netware_disk.xml
X%%CACTIDIR%%/rra.php
X%%CACTIDIR%%/rra/.placeholder
X%%CACTIDIR%%/scripts/3com_cable_modem.pl
X%%CACTIDIR%%/scripts/diskfree.pl
X%%CACTIDIR%%/scripts/linux_memory.pl
X%%CACTIDIR%%/scripts/loadavg.pl
X%%CACTIDIR%%/scripts/loadavg_multi.pl
X%%CACTIDIR%%/scripts/ping.pl
X%%CACTIDIR%%/scripts/query_host_cpu.php
X%%CACTIDIR%%/scripts/query_host_partitions.php
X%%CACTIDIR%%/scripts/query_unix_partitions.pl
X%%CACTIDIR%%/scripts/sql.php
X%%CACTIDIR%%/scripts/unix_processes.pl
X%%CACTIDIR%%/scripts/unix_tcp_connections.pl
X%%CACTIDIR%%/scripts/unix_users.pl
X%%CACTIDIR%%/scripts/weatherbug.pl
X%%CACTIDIR%%/scripts/webhits.pl
X%%CACTIDIR%%/settings.php
X%%CACTIDIR%%/snmp.php
X%%CACTIDIR%%/tree.php
X%%CACTIDIR%%/user_admin.php
X%%CACTIDIR%%/utilities.php
X at dirrm %%CACTIDIR%%
X at dirrm %%CACTIDIR%%/log
X at dirrm %%CACTIDIR%%/cactid/config
X at dirrm %%CACTIDIR%%/cactid
X at dirrm %%CACTIDIR%%/scripts
X at dirrm %%CACTIDIR%%/docs/manual
X at dirrm %%CACTIDIR%%/docs
X at dirrm %%CACTIDIR%%/resource/snmp_queries
X at dirrm %%CACTIDIR%%/resource/script_queries
X at dirrm %%CACTIDIR%%/resource
X at dirrm %%CACTIDIR%%/install
X at dirrm %%CACTIDIR%%/rra
X at dirrm %%CACTIDIR%%/include
X at dirrm %%CACTIDIR%%/include/adodb/datadict
X at dirrm %%CACTIDIR%%/include/adodb/drivers
X at dirrm %%CACTIDIR%%/include/adodb
X at dirrm %%CACTIDIR%%/images
X at unexec crontab -u cacti -r
END-of-cacti/pkg-plist
echo x - cacti/distinfo
sed 's/^X//' >cacti/distinfo << 'END-of-cacti/distinfo'
XMD5 (cacti-0.8.2a.tar.gz) = 2f10bfc2b01f1b11866f319fe74b93e7
END-of-cacti/distinfo
echo x - cacti/Makefile
sed 's/^X//' >cacti/Makefile << 'END-of-cacti/Makefile'
X# Ports collection makefile for:  cacti
X# Date created:			  Aug 25 2003
X# Whom:				  Sergey Akifyev <asa at gascom.ru>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	cacti
XPORTVERSION=	0.8.2a
XCATEGORIES=	net
XMASTER_SITES=	http://www.raxnet.net/downloads/
X
XMAINTAINER=	asa at gascom.ru
XCOMMENT=	Frontend for RRDTOOL
X
XRUN_DEPENDS=	safe_mysqld:${PORTSDIR}/databases/mysql323-server \
X		mysql:${PORTSDIR}/databases/mysql323-client \
X		snmpget:${PORTSDIR}/net/net-snmp \
X		rrdtool:${PORTSDIR}/net/rrdtool \
X		php:${PORTSDIR}/lang/php4
X
XNO_BUILD=	yes
X
XCACTIDIR?=	share/cacti
XCRONTAB?=	/usr/bin/crontab
XPLIST_SUB=	CACTIDIR=${CACTIDIR}
X
Xdo-install:
X	@${SH} ${PKGINSTALL}
X	@${MKDIR} ${LOCALBASE}/${CACTIDIR}
X	@${CP} -R ${WRKSRC}/* ${LOCALBASE}/${CACTIDIR}/
X	@${SED} -e 's|%LOCALBASE%|${LOCALBASE}|g' \
X		-e 's|%CACTIDIR%|${LOCALBASE}/${CACTIDIR}|g' \
X		${FILESDIR}/cacti.cron \
X		> ${LOCALBASE}/${CACTIDIR}/cacti.cron
X	@${SED} -e 's|%CACTIDIR%|${LOCALBASE}/${CACTIDIR}|g' \
X		${FILESDIR}/cacti_db.sh \
X		> ${LOCALBASE}/${CACTIDIR}/cacti_db.sh
X	@${CHOWN} -R cacti:cacti ${LOCALBASE}/${CACTIDIR}/rra \
X		${LOCALBASE}/${CACTIDIR}/log
X	@${CRONTAB} -u cacti ${LOCALBASE}/${CACTIDIR}/cacti.cron
X	@${SED} -e 's|%CACTIDIR%|${LOCALBASE}/${CACTIDIR}|g' ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-cacti/Makefile
echo x - cacti/pkg-message
sed 's/^X//' >cacti/pkg-message << 'END-of-cacti/pkg-message'
X====================================================
XACHTUNG!!!
X
X1) Run %CACTIDIR%/cacti_db.sh
Xwhen MySQL is running
X
X2) Configure apache to serve pages from
X%CACTIDIR%
X
X3) Go to http://localhost/ and
Xfinish setting up CACTI
X====================================================
END-of-cacti/pkg-message
echo c - cacti/files
mkdir -p cacti/files > /dev/null 2>&1
echo x - cacti/files/cacti_db.sh
sed 's/^X//' >cacti/files/cacti_db.sh << 'END-of-cacti/files/cacti_db.sh'
X#!/bin/sh
X# Created by Sergey Akifyev <asa at gascom.ru>
X#
X
Xecho "CREATE DATABASE cacti;
XGRANT ALL ON cacti.* TO cactiuser at localhost IDENTIFIED BY 'cactiuser';
XFLUSH PRIVILEGES;" | mysql &&
Xmysql cacti < %CACTIDIR%/cacti.sql
END-of-cacti/files/cacti_db.sh
echo x - cacti/files/cacti.cron
sed 's/^X//' >cacti/files/cacti.cron << 'END-of-cacti/files/cacti.cron'
X# jffnms crontab file
X# Created by Sergey Akifyev <asa at gascom.ru>
XPATH=${PATH}:%LOCALBASE%/bin
X*/5 * * * * php %CACTIDIR%/cmd.php > /dev/null 2>&1
END-of-cacti/files/cacti.cron
echo x - cacti/pkg-install
sed 's/^X//' >cacti/pkg-install << 'END-of-cacti/pkg-install'
X#!/bin/sh
X# Script was taken from mysql323-server port, and modified
X# to suit cacti needs
X
X[ -n "${PACKAGE_BUILDING}" ] && exit 0
X
X[ "${2}" = "POST-INSTALL" ] && exit 0
X
XPATH=/bin:/usr/sbin
X
XUSER=cacti
XGROUP=${USER}
XUID=114
XGID=${UID}
X
Xif pw group show "${GROUP}" 2>/dev/null; then
X	echo "You already have a group \"${GROUP}\", so I will use it."
Xelse
X	if pw groupadd ${GROUP} -g ${GID}; then
X		echo "Added group \"${GROUP}\"."
X	else
X		echo "Adding group \"${GROUP}\" failed..."
X		exit 1
X	fi
Xfi
X
Xif pw user show "${USER}" 2>/dev/null; then
X	echo "You already have a user \"${USER}\", so I will use it."
X	if pw usermod ${USER} -d /nonexistent
X	then
X		echo "Changed home directory of \"${USER}\" to /nonexistent"
X	else
X		echo "Changing home directory of \"${USER}\" to /nonexistent failed..."
X		exit 1
X	fi
Xelse
X	if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
X		-d /nonexistent -s /sbin/nologin -c "Cacti Sandbox"
X	then
X		echo "Added user \"${USER}\"."
X	else
X		echo "Adding user \"${USER}\" failed..."
X		exit 1
X	fi
Xfi
END-of-cacti/pkg-install
exit
--- cacti.sh ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list