1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

Add cacti, a PHP based frontend to RRDtool configuration.

PR:		ports/59996
Submitted by:	Vincent Tantardini <vinc@freebsd-fr.org>
This commit is contained in:
Pav Lucistnik 2003-12-21 17:01:41 +00:00
parent 5ed6b35528
commit 5b92ee5df5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=96317
13 changed files with 825 additions and 0 deletions

47
net-mgmt/cacti/Makefile Normal file
View File

@ -0,0 +1,47 @@
# New ports collection makefile for: cacti
# Date created: 6 December 2003
# Whom: Vincent Tantardini <vinc@freebsd-fr.org>
#
# $FreeBSD$
#
PORTNAME= cacti
PORTVERSION= 0.8.4
CATEGORIES= net
MASTER_SITES= http://www.raxnet.net/downloads/
MAINTAINER= vinc@freebsd-fr.org
COMMENT= Web-driven graphing interface for RRDTool
RUN_DEPENDS= php:${PORTSDIR}/lang/php4 \
rrdtool:${PORTSDIR}/net/rrdtool \
net-snmp-config:${PORTSDIR}/net/net-snmp
USE_MYSQL= yes
NO_BUILD= yes
PKGMESSAGE= ${WRKDIR}/pkg-message
CACTIDIR?= share/cacti
CACTIUSER?= cacti
CACTIGROUP?= ${CACTIUSER}
PLIST_SUB+= CACTIDIR=${CACTIDIR}
post-patch:
@${CAT} pkg-message | ${SED} -e 's|%%PREFIX%%|${PREFIX}| ; \
s|%%CACTIDIR%%|${CACTIDIR}| ; \
s|%%CACTIUSER%%|${CACTIUSER}|' > ${PKGMESSAGE}
pre-install:
@PREFIX=${PREFIX} CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} CACTIGROUP=${CACTIGROUP} \
${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
do-install:
@${MKDIR} ${PREFIX}/${CACTIDIR}/
@${CP} -R ${WRKSRC}/* ${PREFIX}/${CACTIDIR}/
post-install:
@PREFIX=${PREFIX} CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} CACTIGROUP=${CACTIGROUP} \
${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>

1
net-mgmt/cacti/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (cacti-0.8.4.tar.gz) = afa100acd57db792dd65f4443268a64d

6
net-mgmt/cacti/pkg-descr Normal file
View File

@ -0,0 +1,6 @@
One drawback to RRDTool, is that by itself it is not a complete package for
users wanting to graph their own networks. This is where cacti's job comes
in. Cacti brings the power of RRDTool to a friendly web interface making it
easy to graph anything using RRDTool.
WWW: http://www.raxnet.net/products/cacti/

View File

@ -0,0 +1,43 @@
#!/bin/sh
PW=/usr/sbin/pw
case $2 in
PRE-INSTALL)
if ${PW} group show "${CACTIGROUP}" 2>/dev/null; then
echo "You already have a group \"${CACTIGROUP}\", so I will use it."
else
if ${PW} groupadd ${CACTIGROUP}; then
echo "Added group \"${CACTIGROUP}\"."
else
echo "Adding group \"${CACTIGROUP}\" failed..."
exit 1
fi
fi
if ${PW} user show "${CACTIUSER}" 2>/dev/null; then
echo "You already have a user \"${CACTIUSER}\", so I will use it."
else
if ${PW} useradd ${CACTIUSER} -g ${CACTIGROUP} -h - \
-d "/nonexistent" -s /sbin/nologin -c "Cacti Sandbox"
then
echo "Added user \"${CACTIUSER}\"."
else
echo "Adding user \"${CACTIUSER}\" failed..."
exit 1
fi
fi
;;
POST-INSTALL)
chown ${CACTIUSER}:${CACTIGROUP} ${PREFIX}/${CACTIDIR}/log/
chown ${CACTIUSER}:${CACTIGROUP} ${PREFIX}/${CACTIDIR}/rra/
;;
*)
exit 1
;;
esac
exit

View File

@ -0,0 +1,21 @@
==========================================================
Cacti is now installed. You may have to follow this steps
to make it work correctly.
1: Create the MySQL database
# mysqladmin --user=root create cacti
2: Create a mysql user/password for cacti
# echo "CREATE DATABASE cacti;
GRANT ALL ON cacti.* TO cactiuser at localhost IDENTIFIED BY 'cactiuser';
FLUSH PRIVILEGES;" | mysql &&
3: Import the default cacti database
# mysql cacti < %%PREFIX%%/%%CACTIDIR%%/cacti.sql
4: Edit your config.php
Specify the MySQL user, password and database for
your cacti configuration.
5: Add a line to your /etc/crontab file similar to:
*/5 * * * * %%CACTIUSER%% php %%PREFIX%%/%%CACTIDIR%%/cmd.php > /dev/null 2>&1
6: Point your web browser to the cacti dir
Have fun!
==========================================================

294
net-mgmt/cacti/pkg-plist Normal file
View File

@ -0,0 +1,294 @@
%%CACTIDIR%%/LICENSE
%%CACTIDIR%%/README
%%CACTIDIR%%/about.php
%%CACTIDIR%%/auth_changepassword.php
%%CACTIDIR%%/auth_login.php
%%CACTIDIR%%/cacti.sql
%%CACTIDIR%%/cactid/.deps/cactid.Po
%%CACTIDIR%%/cactid/.deps/locks.Po
%%CACTIDIR%%/cactid/.deps/poller.Po
%%CACTIDIR%%/cactid/.deps/rrd.Po
%%CACTIDIR%%/cactid/.deps/snmp.Po
%%CACTIDIR%%/cactid/.deps/sql.Po
%%CACTIDIR%%/cactid/.deps/util.Po
%%CACTIDIR%%/cactid/AUTHORS
%%CACTIDIR%%/cactid/COPYING
%%CACTIDIR%%/cactid/ChangeLog
%%CACTIDIR%%/cactid/INSTALL
%%CACTIDIR%%/cactid/Makefile.am
%%CACTIDIR%%/cactid/Makefile.in
%%CACTIDIR%%/cactid/NEWS
%%CACTIDIR%%/cactid/README
%%CACTIDIR%%/cactid/aclocal.m4
%%CACTIDIR%%/cactid/cactid.c
%%CACTIDIR%%/cactid/cactid.conf
%%CACTIDIR%%/cactid/cactid.h
%%CACTIDIR%%/cactid/common.h
%%CACTIDIR%%/cactid/config/config.guess
%%CACTIDIR%%/cactid/config/config.h.in
%%CACTIDIR%%/cactid/config/config.h.in~
%%CACTIDIR%%/cactid/config/config.sub
%%CACTIDIR%%/cactid/config/depcomp
%%CACTIDIR%%/cactid/config/install-sh
%%CACTIDIR%%/cactid/config/missing
%%CACTIDIR%%/cactid/config/mkinstalldirs
%%CACTIDIR%%/cactid/config/stamp-h
%%CACTIDIR%%/cactid/config/stamp-h.in
%%CACTIDIR%%/cactid/config/stamp-h1
%%CACTIDIR%%/cactid/configure
%%CACTIDIR%%/cactid/configure.ac
%%CACTIDIR%%/cactid/locks.c
%%CACTIDIR%%/cactid/locks.h
%%CACTIDIR%%/cactid/poller.c
%%CACTIDIR%%/cactid/poller.h
%%CACTIDIR%%/cactid/rrd.c
%%CACTIDIR%%/cactid/rrd.h
%%CACTIDIR%%/cactid/snmp.c
%%CACTIDIR%%/cactid/snmp.h
%%CACTIDIR%%/cactid/sql.c
%%CACTIDIR%%/cactid/sql.h
%%CACTIDIR%%/cactid/util.c
%%CACTIDIR%%/cactid/util.h
%%CACTIDIR%%/cdef.php
%%CACTIDIR%%/cmd.php
%%CACTIDIR%%/color.php
%%CACTIDIR%%/data_input.php
%%CACTIDIR%%/data_sources.php
%%CACTIDIR%%/data_templates.php
%%CACTIDIR%%/docs/CHANGELOG
%%CACTIDIR%%/docs/CONTRIB
%%CACTIDIR%%/docs/FAQ.htm
%%CACTIDIR%%/docs/INSTALL-WIN32.htm
%%CACTIDIR%%/docs/INSTALL.htm
%%CACTIDIR%%/docs/README
%%CACTIDIR%%/docs/UPGRADE.htm
%%CACTIDIR%%/docs/manual/cacti.gif
%%CACTIDIR%%/docs/manual/index.htm
%%CACTIDIR%%/docs/manual/main.css
%%CACTIDIR%%/docs/manual/section1.htm
%%CACTIDIR%%/docs/manual/section2.htm
%%CACTIDIR%%/docs/manual/section2_1.htm
%%CACTIDIR%%/docs/manual/section2_2.htm
%%CACTIDIR%%/docs/manual/section3.htm
%%CACTIDIR%%/docs/manual/section4.htm
%%CACTIDIR%%/docs/manual/section4_1.htm
%%CACTIDIR%%/docs/manual/section4_2.htm
%%CACTIDIR%%/docs/manual/section4_3.htm
%%CACTIDIR%%/docs/manual/section5.htm
%%CACTIDIR%%/docs/manual/section5_1.htm
%%CACTIDIR%%/docs/manual/section5_2.htm
%%CACTIDIR%%/docs/manual/section6.htm
%%CACTIDIR%%/docs/manual/section6_1.htm
%%CACTIDIR%%/docs/manual/section6_2.htm
%%CACTIDIR%%/docs/manual/section7.htm
%%CACTIDIR%%/docs/manual/section8.htm
%%CACTIDIR%%/docs/manual/section8_1.htm
%%CACTIDIR%%/docs/manual/section8_2.htm
%%CACTIDIR%%/docs/manual/section8_3.htm
%%CACTIDIR%%/gprint_presets.php
%%CACTIDIR%%/graph.php
%%CACTIDIR%%/graph_image.php
%%CACTIDIR%%/graph_settings.php
%%CACTIDIR%%/graph_templates.php
%%CACTIDIR%%/graph_templates_inputs.php
%%CACTIDIR%%/graph_templates_items.php
%%CACTIDIR%%/graph_view.php
%%CACTIDIR%%/graphs.php
%%CACTIDIR%%/graphs_items.php
%%CACTIDIR%%/graphs_new.php
%%CACTIDIR%%/host.php
%%CACTIDIR%%/host_templates.php
%%CACTIDIR%%/images/arrow.gif
%%CACTIDIR%%/images/auth_deny.gif
%%CACTIDIR%%/images/auth_login.gif
%%CACTIDIR%%/images/button_add.gif
%%CACTIDIR%%/images/button_cancel.gif
%%CACTIDIR%%/images/button_cancel2.gif
%%CACTIDIR%%/images/button_create.gif
%%CACTIDIR%%/images/button_delete.gif
%%CACTIDIR%%/images/button_go.gif
%%CACTIDIR%%/images/button_no.gif
%%CACTIDIR%%/images/button_save.gif
%%CACTIDIR%%/images/button_view.gif
%%CACTIDIR%%/images/button_yes.gif
%%CACTIDIR%%/images/cacti_backdrop.gif
%%CACTIDIR%%/images/cacti_backdrop2.gif
%%CACTIDIR%%/images/cacti_logo.gif
%%CACTIDIR%%/images/delete_icon.gif
%%CACTIDIR%%/images/delete_icon_large.gif
%%CACTIDIR%%/images/gray_line.gif
%%CACTIDIR%%/images/hide.gif
%%CACTIDIR%%/images/left_border.gif
%%CACTIDIR%%/images/menu_line.gif
%%CACTIDIR%%/images/move_down.gif
%%CACTIDIR%%/images/move_up.gif
%%CACTIDIR%%/images/raxnet_logo.gif
%%CACTIDIR%%/images/reload_icon_small.gif
%%CACTIDIR%%/images/shadow.gif
%%CACTIDIR%%/images/shadow_gray.gif
%%CACTIDIR%%/images/show.gif
%%CACTIDIR%%/images/tab_cacti.gif
%%CACTIDIR%%/images/tab_console.gif
%%CACTIDIR%%/images/tab_graphs.gif
%%CACTIDIR%%/images/tab_mode_list.gif
%%CACTIDIR%%/images/tab_mode_list_down.gif
%%CACTIDIR%%/images/tab_mode_preview.gif
%%CACTIDIR%%/images/tab_mode_preview_down.gif
%%CACTIDIR%%/images/tab_mode_tree.gif
%%CACTIDIR%%/images/tab_mode_tree_down.gif
%%CACTIDIR%%/images/tab_settings.gif
%%CACTIDIR%%/images/tab_settings_down.gif
%%CACTIDIR%%/images/transparent_line.gif
%%CACTIDIR%%/include/auth.php
%%CACTIDIR%%/include/bottom_footer.php
%%CACTIDIR%%/include/config.php
%%CACTIDIR%%/include/config_arrays.php
%%CACTIDIR%%/include/config_form.php
%%CACTIDIR%%/include/config_settings.php
%%CACTIDIR%%/include/layout.js
%%CACTIDIR%%/include/main.css
%%CACTIDIR%%/include/top_graph_header.php
%%CACTIDIR%%/include/top_header.php
%%CACTIDIR%%/include/treeview/ftiens4.js
%%CACTIDIR%%/include/treeview/ftv2blank.gif
%%CACTIDIR%%/include/treeview/ftv2lastnode.gif
%%CACTIDIR%%/include/treeview/ftv2mlastnode.gif
%%CACTIDIR%%/include/treeview/ftv2mnode.gif
%%CACTIDIR%%/include/treeview/ftv2node.gif
%%CACTIDIR%%/include/treeview/ftv2plastnode.gif
%%CACTIDIR%%/include/treeview/ftv2pnode.gif
%%CACTIDIR%%/include/treeview/ftv2vertline.gif
%%CACTIDIR%%/include/treeview/ua.js
%%CACTIDIR%%/index.php
%%CACTIDIR%%/install/0_8_1_to_0_8_2.php
%%CACTIDIR%%/install/0_8_2_to_0_8_2a.php
%%CACTIDIR%%/install/0_8_2a_to_0_8_3.php
%%CACTIDIR%%/install/0_8_3_to_0_8_4.php
%%CACTIDIR%%/install/0_8_to_0_8_1.php
%%CACTIDIR%%/install/index.php
%%CACTIDIR%%/install/install_finish.gif
%%CACTIDIR%%/install/install_next.gif
%%CACTIDIR%%/lib/adodb/adodb-connection.inc.php
%%CACTIDIR%%/lib/adodb/adodb-cryptsession.php
%%CACTIDIR%%/lib/adodb/adodb-csvlib.inc.php
%%CACTIDIR%%/lib/adodb/adodb-datadict.inc.php
%%CACTIDIR%%/lib/adodb/adodb-errorhandler.inc.php
%%CACTIDIR%%/lib/adodb/adodb-errorpear.inc.php
%%CACTIDIR%%/lib/adodb/adodb-lib.inc.php
%%CACTIDIR%%/lib/adodb/adodb-pager.inc.php
%%CACTIDIR%%/lib/adodb/adodb-pear.inc.php
%%CACTIDIR%%/lib/adodb/adodb-recordset.inc.php
%%CACTIDIR%%/lib/adodb/adodb-session.php
%%CACTIDIR%%/lib/adodb/adodb-time.inc.php
%%CACTIDIR%%/lib/adodb/adodb.inc.php
%%CACTIDIR%%/lib/adodb/crypt.inc.php
%%CACTIDIR%%/lib/adodb/datadict/datadict-mssql.inc.php
%%CACTIDIR%%/lib/adodb/datadict/datadict-mysql.inc.php
%%CACTIDIR%%/lib/adodb/datadict/datadict-oci8.inc.php
%%CACTIDIR%%/lib/adodb/datadict/datadict-postgres.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-access.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-ado.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-ado_access.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-ado_mssql.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-borland_ibase.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-csv.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-db2.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-fbsql.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-firebird.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-ibase.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-informix.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-informix72.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-mssql.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-mssqlpo.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-mysql.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-mysqlt.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-oci8.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-oci805.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-oci8po.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-odbc.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-odbc_mssql.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-odbc_oracle.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-oracle.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-postgres.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-postgres64.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-postgres7.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-proxy.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-sqlanywhere.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-sybase.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-vfp.inc.php
%%CACTIDIR%%/lib/adodb/license.txt
%%CACTIDIR%%/lib/adodb/pivottable.inc.php
%%CACTIDIR%%/lib/adodb/rsfilter.inc.php
%%CACTIDIR%%/lib/adodb/server.php
%%CACTIDIR%%/lib/adodb/toexport.inc.php
%%CACTIDIR%%/lib/adodb/tohtml.inc.php
%%CACTIDIR%%/lib/auth.php
%%CACTIDIR%%/lib/cdef.php
%%CACTIDIR%%/lib/database.php
%%CACTIDIR%%/lib/export.php
%%CACTIDIR%%/lib/form.php
%%CACTIDIR%%/lib/functions.php
%%CACTIDIR%%/lib/graph_export.php
%%CACTIDIR%%/lib/import.php
%%CACTIDIR%%/lib/rrd.php
%%CACTIDIR%%/lib/snmp.php
%%CACTIDIR%%/lib/template.php
%%CACTIDIR%%/lib/tree.php
%%CACTIDIR%%/lib/tree_view.php
%%CACTIDIR%%/lib/utility.php
%%CACTIDIR%%/lib/xml.php
%%CACTIDIR%%/log/rrd.log
%%CACTIDIR%%/logout.php
%%CACTIDIR%%/resource/script_queries/host_cpu.xml
%%CACTIDIR%%/resource/script_queries/host_disk.xml
%%CACTIDIR%%/resource/script_queries/unix_disk.xml
%%CACTIDIR%%/resource/snmp_queries/host_disk.xml
%%CACTIDIR%%/resource/snmp_queries/interface.xml
%%CACTIDIR%%/resource/snmp_queries/kbridge.xml
%%CACTIDIR%%/resource/snmp_queries/net-snmp_disk.xml
%%CACTIDIR%%/resource/snmp_queries/netware_cpu.xml
%%CACTIDIR%%/resource/snmp_queries/netware_disk.xml
%%CACTIDIR%%/rra.php
%%CACTIDIR%%/rra/.placeholder
%%CACTIDIR%%/scripts/3com_cable_modem.pl
%%CACTIDIR%%/scripts/diskfree.pl
%%CACTIDIR%%/scripts/linux_memory.pl
%%CACTIDIR%%/scripts/loadavg.pl
%%CACTIDIR%%/scripts/loadavg_multi.pl
%%CACTIDIR%%/scripts/ping.pl
%%CACTIDIR%%/scripts/query_host_cpu.php
%%CACTIDIR%%/scripts/query_host_partitions.php
%%CACTIDIR%%/scripts/query_unix_partitions.pl
%%CACTIDIR%%/scripts/sql.php
%%CACTIDIR%%/scripts/unix_processes.pl
%%CACTIDIR%%/scripts/unix_tcp_connections.pl
%%CACTIDIR%%/scripts/unix_users.pl
%%CACTIDIR%%/scripts/weatherbug.pl
%%CACTIDIR%%/scripts/webhits.pl
%%CACTIDIR%%/settings.php
%%CACTIDIR%%/snmp.php
%%CACTIDIR%%/templates_export.php
%%CACTIDIR%%/templates_import.php
%%CACTIDIR%%/tree.php
%%CACTIDIR%%/user_admin.php
%%CACTIDIR%%/utilities.php
@dirrm %%CACTIDIR%%/scripts
@dirrm %%CACTIDIR%%/rra
@dirrm %%CACTIDIR%%/resource/snmp_queries
@dirrm %%CACTIDIR%%/resource/script_queries
@dirrm %%CACTIDIR%%/resource
@dirrm %%CACTIDIR%%/log
@dirrm %%CACTIDIR%%/lib/adodb/drivers
@dirrm %%CACTIDIR%%/lib/adodb/datadict
@dirrm %%CACTIDIR%%/lib/adodb
@dirrm %%CACTIDIR%%/lib
@dirrm %%CACTIDIR%%/install
@dirrm %%CACTIDIR%%/include/treeview
@dirrm %%CACTIDIR%%/include
@dirrm %%CACTIDIR%%/images
@dirrm %%CACTIDIR%%/docs/manual
@dirrm %%CACTIDIR%%/docs
@dirrm %%CACTIDIR%%/cactid/config
@dirrm %%CACTIDIR%%/cactid/.deps
@dirrm %%CACTIDIR%%/cactid
@dirrm %%CACTIDIR%%

View File

@ -53,6 +53,7 @@
SUBDIR += braa
SUBDIR += bsd-airtools
SUBDIR += bsdproxy
SUBDIR += cacti
SUBDIR += cap
SUBDIR += ccmsn
SUBDIR += cdonkey

47
net/cacti/Makefile Normal file
View File

@ -0,0 +1,47 @@
# New ports collection makefile for: cacti
# Date created: 6 December 2003
# Whom: Vincent Tantardini <vinc@freebsd-fr.org>
#
# $FreeBSD$
#
PORTNAME= cacti
PORTVERSION= 0.8.4
CATEGORIES= net
MASTER_SITES= http://www.raxnet.net/downloads/
MAINTAINER= vinc@freebsd-fr.org
COMMENT= Web-driven graphing interface for RRDTool
RUN_DEPENDS= php:${PORTSDIR}/lang/php4 \
rrdtool:${PORTSDIR}/net/rrdtool \
net-snmp-config:${PORTSDIR}/net/net-snmp
USE_MYSQL= yes
NO_BUILD= yes
PKGMESSAGE= ${WRKDIR}/pkg-message
CACTIDIR?= share/cacti
CACTIUSER?= cacti
CACTIGROUP?= ${CACTIUSER}
PLIST_SUB+= CACTIDIR=${CACTIDIR}
post-patch:
@${CAT} pkg-message | ${SED} -e 's|%%PREFIX%%|${PREFIX}| ; \
s|%%CACTIDIR%%|${CACTIDIR}| ; \
s|%%CACTIUSER%%|${CACTIUSER}|' > ${PKGMESSAGE}
pre-install:
@PREFIX=${PREFIX} CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} CACTIGROUP=${CACTIGROUP} \
${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
do-install:
@${MKDIR} ${PREFIX}/${CACTIDIR}/
@${CP} -R ${WRKSRC}/* ${PREFIX}/${CACTIDIR}/
post-install:
@PREFIX=${PREFIX} CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} CACTIGROUP=${CACTIGROUP} \
${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>

1
net/cacti/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (cacti-0.8.4.tar.gz) = afa100acd57db792dd65f4443268a64d

6
net/cacti/pkg-descr Normal file
View File

@ -0,0 +1,6 @@
One drawback to RRDTool, is that by itself it is not a complete package for
users wanting to graph their own networks. This is where cacti's job comes
in. Cacti brings the power of RRDTool to a friendly web interface making it
easy to graph anything using RRDTool.
WWW: http://www.raxnet.net/products/cacti/

43
net/cacti/pkg-install Normal file
View File

@ -0,0 +1,43 @@
#!/bin/sh
PW=/usr/sbin/pw
case $2 in
PRE-INSTALL)
if ${PW} group show "${CACTIGROUP}" 2>/dev/null; then
echo "You already have a group \"${CACTIGROUP}\", so I will use it."
else
if ${PW} groupadd ${CACTIGROUP}; then
echo "Added group \"${CACTIGROUP}\"."
else
echo "Adding group \"${CACTIGROUP}\" failed..."
exit 1
fi
fi
if ${PW} user show "${CACTIUSER}" 2>/dev/null; then
echo "You already have a user \"${CACTIUSER}\", so I will use it."
else
if ${PW} useradd ${CACTIUSER} -g ${CACTIGROUP} -h - \
-d "/nonexistent" -s /sbin/nologin -c "Cacti Sandbox"
then
echo "Added user \"${CACTIUSER}\"."
else
echo "Adding user \"${CACTIUSER}\" failed..."
exit 1
fi
fi
;;
POST-INSTALL)
chown ${CACTIUSER}:${CACTIGROUP} ${PREFIX}/${CACTIDIR}/log/
chown ${CACTIUSER}:${CACTIGROUP} ${PREFIX}/${CACTIDIR}/rra/
;;
*)
exit 1
;;
esac
exit

21
net/cacti/pkg-message Normal file
View File

@ -0,0 +1,21 @@
==========================================================
Cacti is now installed. You may have to follow this steps
to make it work correctly.
1: Create the MySQL database
# mysqladmin --user=root create cacti
2: Create a mysql user/password for cacti
# echo "CREATE DATABASE cacti;
GRANT ALL ON cacti.* TO cactiuser at localhost IDENTIFIED BY 'cactiuser';
FLUSH PRIVILEGES;" | mysql &&
3: Import the default cacti database
# mysql cacti < %%PREFIX%%/%%CACTIDIR%%/cacti.sql
4: Edit your config.php
Specify the MySQL user, password and database for
your cacti configuration.
5: Add a line to your /etc/crontab file similar to:
*/5 * * * * %%CACTIUSER%% php %%PREFIX%%/%%CACTIDIR%%/cmd.php > /dev/null 2>&1
6: Point your web browser to the cacti dir
Have fun!
==========================================================

294
net/cacti/pkg-plist Normal file
View File

@ -0,0 +1,294 @@
%%CACTIDIR%%/LICENSE
%%CACTIDIR%%/README
%%CACTIDIR%%/about.php
%%CACTIDIR%%/auth_changepassword.php
%%CACTIDIR%%/auth_login.php
%%CACTIDIR%%/cacti.sql
%%CACTIDIR%%/cactid/.deps/cactid.Po
%%CACTIDIR%%/cactid/.deps/locks.Po
%%CACTIDIR%%/cactid/.deps/poller.Po
%%CACTIDIR%%/cactid/.deps/rrd.Po
%%CACTIDIR%%/cactid/.deps/snmp.Po
%%CACTIDIR%%/cactid/.deps/sql.Po
%%CACTIDIR%%/cactid/.deps/util.Po
%%CACTIDIR%%/cactid/AUTHORS
%%CACTIDIR%%/cactid/COPYING
%%CACTIDIR%%/cactid/ChangeLog
%%CACTIDIR%%/cactid/INSTALL
%%CACTIDIR%%/cactid/Makefile.am
%%CACTIDIR%%/cactid/Makefile.in
%%CACTIDIR%%/cactid/NEWS
%%CACTIDIR%%/cactid/README
%%CACTIDIR%%/cactid/aclocal.m4
%%CACTIDIR%%/cactid/cactid.c
%%CACTIDIR%%/cactid/cactid.conf
%%CACTIDIR%%/cactid/cactid.h
%%CACTIDIR%%/cactid/common.h
%%CACTIDIR%%/cactid/config/config.guess
%%CACTIDIR%%/cactid/config/config.h.in
%%CACTIDIR%%/cactid/config/config.h.in~
%%CACTIDIR%%/cactid/config/config.sub
%%CACTIDIR%%/cactid/config/depcomp
%%CACTIDIR%%/cactid/config/install-sh
%%CACTIDIR%%/cactid/config/missing
%%CACTIDIR%%/cactid/config/mkinstalldirs
%%CACTIDIR%%/cactid/config/stamp-h
%%CACTIDIR%%/cactid/config/stamp-h.in
%%CACTIDIR%%/cactid/config/stamp-h1
%%CACTIDIR%%/cactid/configure
%%CACTIDIR%%/cactid/configure.ac
%%CACTIDIR%%/cactid/locks.c
%%CACTIDIR%%/cactid/locks.h
%%CACTIDIR%%/cactid/poller.c
%%CACTIDIR%%/cactid/poller.h
%%CACTIDIR%%/cactid/rrd.c
%%CACTIDIR%%/cactid/rrd.h
%%CACTIDIR%%/cactid/snmp.c
%%CACTIDIR%%/cactid/snmp.h
%%CACTIDIR%%/cactid/sql.c
%%CACTIDIR%%/cactid/sql.h
%%CACTIDIR%%/cactid/util.c
%%CACTIDIR%%/cactid/util.h
%%CACTIDIR%%/cdef.php
%%CACTIDIR%%/cmd.php
%%CACTIDIR%%/color.php
%%CACTIDIR%%/data_input.php
%%CACTIDIR%%/data_sources.php
%%CACTIDIR%%/data_templates.php
%%CACTIDIR%%/docs/CHANGELOG
%%CACTIDIR%%/docs/CONTRIB
%%CACTIDIR%%/docs/FAQ.htm
%%CACTIDIR%%/docs/INSTALL-WIN32.htm
%%CACTIDIR%%/docs/INSTALL.htm
%%CACTIDIR%%/docs/README
%%CACTIDIR%%/docs/UPGRADE.htm
%%CACTIDIR%%/docs/manual/cacti.gif
%%CACTIDIR%%/docs/manual/index.htm
%%CACTIDIR%%/docs/manual/main.css
%%CACTIDIR%%/docs/manual/section1.htm
%%CACTIDIR%%/docs/manual/section2.htm
%%CACTIDIR%%/docs/manual/section2_1.htm
%%CACTIDIR%%/docs/manual/section2_2.htm
%%CACTIDIR%%/docs/manual/section3.htm
%%CACTIDIR%%/docs/manual/section4.htm
%%CACTIDIR%%/docs/manual/section4_1.htm
%%CACTIDIR%%/docs/manual/section4_2.htm
%%CACTIDIR%%/docs/manual/section4_3.htm
%%CACTIDIR%%/docs/manual/section5.htm
%%CACTIDIR%%/docs/manual/section5_1.htm
%%CACTIDIR%%/docs/manual/section5_2.htm
%%CACTIDIR%%/docs/manual/section6.htm
%%CACTIDIR%%/docs/manual/section6_1.htm
%%CACTIDIR%%/docs/manual/section6_2.htm
%%CACTIDIR%%/docs/manual/section7.htm
%%CACTIDIR%%/docs/manual/section8.htm
%%CACTIDIR%%/docs/manual/section8_1.htm
%%CACTIDIR%%/docs/manual/section8_2.htm
%%CACTIDIR%%/docs/manual/section8_3.htm
%%CACTIDIR%%/gprint_presets.php
%%CACTIDIR%%/graph.php
%%CACTIDIR%%/graph_image.php
%%CACTIDIR%%/graph_settings.php
%%CACTIDIR%%/graph_templates.php
%%CACTIDIR%%/graph_templates_inputs.php
%%CACTIDIR%%/graph_templates_items.php
%%CACTIDIR%%/graph_view.php
%%CACTIDIR%%/graphs.php
%%CACTIDIR%%/graphs_items.php
%%CACTIDIR%%/graphs_new.php
%%CACTIDIR%%/host.php
%%CACTIDIR%%/host_templates.php
%%CACTIDIR%%/images/arrow.gif
%%CACTIDIR%%/images/auth_deny.gif
%%CACTIDIR%%/images/auth_login.gif
%%CACTIDIR%%/images/button_add.gif
%%CACTIDIR%%/images/button_cancel.gif
%%CACTIDIR%%/images/button_cancel2.gif
%%CACTIDIR%%/images/button_create.gif
%%CACTIDIR%%/images/button_delete.gif
%%CACTIDIR%%/images/button_go.gif
%%CACTIDIR%%/images/button_no.gif
%%CACTIDIR%%/images/button_save.gif
%%CACTIDIR%%/images/button_view.gif
%%CACTIDIR%%/images/button_yes.gif
%%CACTIDIR%%/images/cacti_backdrop.gif
%%CACTIDIR%%/images/cacti_backdrop2.gif
%%CACTIDIR%%/images/cacti_logo.gif
%%CACTIDIR%%/images/delete_icon.gif
%%CACTIDIR%%/images/delete_icon_large.gif
%%CACTIDIR%%/images/gray_line.gif
%%CACTIDIR%%/images/hide.gif
%%CACTIDIR%%/images/left_border.gif
%%CACTIDIR%%/images/menu_line.gif
%%CACTIDIR%%/images/move_down.gif
%%CACTIDIR%%/images/move_up.gif
%%CACTIDIR%%/images/raxnet_logo.gif
%%CACTIDIR%%/images/reload_icon_small.gif
%%CACTIDIR%%/images/shadow.gif
%%CACTIDIR%%/images/shadow_gray.gif
%%CACTIDIR%%/images/show.gif
%%CACTIDIR%%/images/tab_cacti.gif
%%CACTIDIR%%/images/tab_console.gif
%%CACTIDIR%%/images/tab_graphs.gif
%%CACTIDIR%%/images/tab_mode_list.gif
%%CACTIDIR%%/images/tab_mode_list_down.gif
%%CACTIDIR%%/images/tab_mode_preview.gif
%%CACTIDIR%%/images/tab_mode_preview_down.gif
%%CACTIDIR%%/images/tab_mode_tree.gif
%%CACTIDIR%%/images/tab_mode_tree_down.gif
%%CACTIDIR%%/images/tab_settings.gif
%%CACTIDIR%%/images/tab_settings_down.gif
%%CACTIDIR%%/images/transparent_line.gif
%%CACTIDIR%%/include/auth.php
%%CACTIDIR%%/include/bottom_footer.php
%%CACTIDIR%%/include/config.php
%%CACTIDIR%%/include/config_arrays.php
%%CACTIDIR%%/include/config_form.php
%%CACTIDIR%%/include/config_settings.php
%%CACTIDIR%%/include/layout.js
%%CACTIDIR%%/include/main.css
%%CACTIDIR%%/include/top_graph_header.php
%%CACTIDIR%%/include/top_header.php
%%CACTIDIR%%/include/treeview/ftiens4.js
%%CACTIDIR%%/include/treeview/ftv2blank.gif
%%CACTIDIR%%/include/treeview/ftv2lastnode.gif
%%CACTIDIR%%/include/treeview/ftv2mlastnode.gif
%%CACTIDIR%%/include/treeview/ftv2mnode.gif
%%CACTIDIR%%/include/treeview/ftv2node.gif
%%CACTIDIR%%/include/treeview/ftv2plastnode.gif
%%CACTIDIR%%/include/treeview/ftv2pnode.gif
%%CACTIDIR%%/include/treeview/ftv2vertline.gif
%%CACTIDIR%%/include/treeview/ua.js
%%CACTIDIR%%/index.php
%%CACTIDIR%%/install/0_8_1_to_0_8_2.php
%%CACTIDIR%%/install/0_8_2_to_0_8_2a.php
%%CACTIDIR%%/install/0_8_2a_to_0_8_3.php
%%CACTIDIR%%/install/0_8_3_to_0_8_4.php
%%CACTIDIR%%/install/0_8_to_0_8_1.php
%%CACTIDIR%%/install/index.php
%%CACTIDIR%%/install/install_finish.gif
%%CACTIDIR%%/install/install_next.gif
%%CACTIDIR%%/lib/adodb/adodb-connection.inc.php
%%CACTIDIR%%/lib/adodb/adodb-cryptsession.php
%%CACTIDIR%%/lib/adodb/adodb-csvlib.inc.php
%%CACTIDIR%%/lib/adodb/adodb-datadict.inc.php
%%CACTIDIR%%/lib/adodb/adodb-errorhandler.inc.php
%%CACTIDIR%%/lib/adodb/adodb-errorpear.inc.php
%%CACTIDIR%%/lib/adodb/adodb-lib.inc.php
%%CACTIDIR%%/lib/adodb/adodb-pager.inc.php
%%CACTIDIR%%/lib/adodb/adodb-pear.inc.php
%%CACTIDIR%%/lib/adodb/adodb-recordset.inc.php
%%CACTIDIR%%/lib/adodb/adodb-session.php
%%CACTIDIR%%/lib/adodb/adodb-time.inc.php
%%CACTIDIR%%/lib/adodb/adodb.inc.php
%%CACTIDIR%%/lib/adodb/crypt.inc.php
%%CACTIDIR%%/lib/adodb/datadict/datadict-mssql.inc.php
%%CACTIDIR%%/lib/adodb/datadict/datadict-mysql.inc.php
%%CACTIDIR%%/lib/adodb/datadict/datadict-oci8.inc.php
%%CACTIDIR%%/lib/adodb/datadict/datadict-postgres.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-access.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-ado.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-ado_access.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-ado_mssql.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-borland_ibase.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-csv.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-db2.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-fbsql.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-firebird.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-ibase.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-informix.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-informix72.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-mssql.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-mssqlpo.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-mysql.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-mysqlt.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-oci8.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-oci805.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-oci8po.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-odbc.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-odbc_mssql.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-odbc_oracle.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-oracle.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-postgres.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-postgres64.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-postgres7.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-proxy.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-sqlanywhere.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-sybase.inc.php
%%CACTIDIR%%/lib/adodb/drivers/adodb-vfp.inc.php
%%CACTIDIR%%/lib/adodb/license.txt
%%CACTIDIR%%/lib/adodb/pivottable.inc.php
%%CACTIDIR%%/lib/adodb/rsfilter.inc.php
%%CACTIDIR%%/lib/adodb/server.php
%%CACTIDIR%%/lib/adodb/toexport.inc.php
%%CACTIDIR%%/lib/adodb/tohtml.inc.php
%%CACTIDIR%%/lib/auth.php
%%CACTIDIR%%/lib/cdef.php
%%CACTIDIR%%/lib/database.php
%%CACTIDIR%%/lib/export.php
%%CACTIDIR%%/lib/form.php
%%CACTIDIR%%/lib/functions.php
%%CACTIDIR%%/lib/graph_export.php
%%CACTIDIR%%/lib/import.php
%%CACTIDIR%%/lib/rrd.php
%%CACTIDIR%%/lib/snmp.php
%%CACTIDIR%%/lib/template.php
%%CACTIDIR%%/lib/tree.php
%%CACTIDIR%%/lib/tree_view.php
%%CACTIDIR%%/lib/utility.php
%%CACTIDIR%%/lib/xml.php
%%CACTIDIR%%/log/rrd.log
%%CACTIDIR%%/logout.php
%%CACTIDIR%%/resource/script_queries/host_cpu.xml
%%CACTIDIR%%/resource/script_queries/host_disk.xml
%%CACTIDIR%%/resource/script_queries/unix_disk.xml
%%CACTIDIR%%/resource/snmp_queries/host_disk.xml
%%CACTIDIR%%/resource/snmp_queries/interface.xml
%%CACTIDIR%%/resource/snmp_queries/kbridge.xml
%%CACTIDIR%%/resource/snmp_queries/net-snmp_disk.xml
%%CACTIDIR%%/resource/snmp_queries/netware_cpu.xml
%%CACTIDIR%%/resource/snmp_queries/netware_disk.xml
%%CACTIDIR%%/rra.php
%%CACTIDIR%%/rra/.placeholder
%%CACTIDIR%%/scripts/3com_cable_modem.pl
%%CACTIDIR%%/scripts/diskfree.pl
%%CACTIDIR%%/scripts/linux_memory.pl
%%CACTIDIR%%/scripts/loadavg.pl
%%CACTIDIR%%/scripts/loadavg_multi.pl
%%CACTIDIR%%/scripts/ping.pl
%%CACTIDIR%%/scripts/query_host_cpu.php
%%CACTIDIR%%/scripts/query_host_partitions.php
%%CACTIDIR%%/scripts/query_unix_partitions.pl
%%CACTIDIR%%/scripts/sql.php
%%CACTIDIR%%/scripts/unix_processes.pl
%%CACTIDIR%%/scripts/unix_tcp_connections.pl
%%CACTIDIR%%/scripts/unix_users.pl
%%CACTIDIR%%/scripts/weatherbug.pl
%%CACTIDIR%%/scripts/webhits.pl
%%CACTIDIR%%/settings.php
%%CACTIDIR%%/snmp.php
%%CACTIDIR%%/templates_export.php
%%CACTIDIR%%/templates_import.php
%%CACTIDIR%%/tree.php
%%CACTIDIR%%/user_admin.php
%%CACTIDIR%%/utilities.php
@dirrm %%CACTIDIR%%/scripts
@dirrm %%CACTIDIR%%/rra
@dirrm %%CACTIDIR%%/resource/snmp_queries
@dirrm %%CACTIDIR%%/resource/script_queries
@dirrm %%CACTIDIR%%/resource
@dirrm %%CACTIDIR%%/log
@dirrm %%CACTIDIR%%/lib/adodb/drivers
@dirrm %%CACTIDIR%%/lib/adodb/datadict
@dirrm %%CACTIDIR%%/lib/adodb
@dirrm %%CACTIDIR%%/lib
@dirrm %%CACTIDIR%%/install
@dirrm %%CACTIDIR%%/include/treeview
@dirrm %%CACTIDIR%%/include
@dirrm %%CACTIDIR%%/images
@dirrm %%CACTIDIR%%/docs/manual
@dirrm %%CACTIDIR%%/docs
@dirrm %%CACTIDIR%%/cactid/config
@dirrm %%CACTIDIR%%/cactid/.deps
@dirrm %%CACTIDIR%%/cactid
@dirrm %%CACTIDIR%%