syweb is a web interface that shows graphs for measurement data
gathered by symon/symux. ok and additional patches by sthen@
This commit is contained in:
parent
f72e1e2bdb
commit
d55df663ea
36
www/syweb/Makefile
Normal file
36
www/syweb/Makefile
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# $OpenBSD: Makefile,v 1.1.1.1 2007/10/05 13:32:32 winiger Exp $
|
||||||
|
|
||||||
|
COMMENT= web frontend to symon
|
||||||
|
DISTNAME= syweb-0.55
|
||||||
|
CATEGORIES= www sysutils
|
||||||
|
|
||||||
|
HOMEPAGE= http://www.xs4all.nl/~wpd/symon
|
||||||
|
MAINTAINER= Marc Winiger <winiger@openbsd.org>
|
||||||
|
|
||||||
|
# BSD
|
||||||
|
PERMIT_PACKAGE_CDROM= Yes
|
||||||
|
PERMIT_PACKAGE_FTP= Yes
|
||||||
|
PERMIT_DISTFILES_CDROM= Yes
|
||||||
|
PERMIT_DISTFILES_FTP= Yes
|
||||||
|
|
||||||
|
MASTER_SITES= ${HOMEPAGE}/philes/
|
||||||
|
|
||||||
|
NO_REGRESS= Yes
|
||||||
|
NO_BUILD= Yes
|
||||||
|
|
||||||
|
PREFIX= /var/www
|
||||||
|
|
||||||
|
RUN_DEPENDS= :rrdtool-*:net/rrdtool \
|
||||||
|
:php5-core->=5.2:www/php5/core
|
||||||
|
|
||||||
|
WRKDIST= ${WRKDIR}/syweb
|
||||||
|
|
||||||
|
do-install:
|
||||||
|
find ${WRKDIR} -name \*.orig -exec rm {} \;
|
||||||
|
${TAR} -C ${WRKDIST} -cf - htdocs symon | ${TAR} -C ${PREFIX} -xpf -
|
||||||
|
${INSTALL_DATA_DIR} ${PREFIX}/symon
|
||||||
|
${INSTALL_SCRIPT} ${WRKDIST}/install_rrdtool.sh ${PREFIX}/symon
|
||||||
|
mkdir ${PREFIX}/symon/rrds
|
||||||
|
mkdir ${PREFIX}/symon/cache
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
5
www/syweb/distinfo
Normal file
5
www/syweb/distinfo
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
MD5 (syweb-0.55.tar.gz) = FTFhXBTW1wqAq01TXUg2/g==
|
||||||
|
RMD160 (syweb-0.55.tar.gz) = ZM2KtPxFqQbHa7c0BeIihNmJJEE=
|
||||||
|
SHA1 (syweb-0.55.tar.gz) = gyAaxaRc2wBW7RncluycHjiXhs8=
|
||||||
|
SHA256 (syweb-0.55.tar.gz) = NN85yH44J0TrsJhcs98UL7xr4XIcHJde/I2eeYwKCc0=
|
||||||
|
SIZE (syweb-0.55.tar.gz) = 40960
|
12
www/syweb/patches/patch-htdocs_syweb_class_graph_inc
Normal file
12
www/syweb/patches/patch-htdocs_syweb_class_graph_inc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
$OpenBSD: patch-htdocs_syweb_class_graph_inc,v 1.1.1.1 2007/10/05 13:32:32 winiger Exp $
|
||||||
|
--- htdocs/syweb/class_graph.inc.orig Fri Oct 5 10:22:24 2007
|
||||||
|
+++ htdocs/syweb/class_graph.inc Fri Oct 5 10:23:47 2007
|
||||||
|
@@ -109,7 +109,7 @@ class Graph {
|
||||||
|
}
|
||||||
|
|
||||||
|
function _parse_filename($filename, $index='') {
|
||||||
|
- if (preg_match("/^(.*\/)?((cpu|if|io|mem|pf|pfq|proc|debug|mbuf|sensor|df)([0-9]{0,2}))(_([a-z\.]+))?([0-9]{0,4}[a-z]{0,1}[0-9]{0,1}[a-z]{0,1}).rrd$/",
|
||||||
|
+ if (preg_match("/^(.*\/)?((cpu|if|io|mem|pf|pfq|proc|debug|mbuf|sensor|df)([0-9]{0,2}))(_{0,1}([a-z0-9\.-]+))?([0-9]{0,4}[a-z]{0,1}[0-9]{0,1}[a-z]{0,1}).rrd$/",
|
||||||
|
$filename, $match)) {
|
||||||
|
$this->vars->def('rrdtype'. $index, $match[2]);
|
||||||
|
$this->vars->def('rrdwhat'. $index, $match[6]);
|
31
www/syweb/patches/patch-htdocs_syweb_setup_inc
Normal file
31
www/syweb/patches/patch-htdocs_syweb_setup_inc
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
$OpenBSD: patch-htdocs_syweb_setup_inc,v 1.1.1.1 2007/10/05 13:32:32 winiger Exp $
|
||||||
|
--- htdocs/syweb/setup.inc.orig Tue Oct 2 15:31:49 2007
|
||||||
|
+++ htdocs/syweb/setup.inc Tue Oct 2 15:32:04 2007
|
||||||
|
@@ -18,12 +18,11 @@
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
-/* running OpenBSD, apache chrooted:
|
||||||
|
+/* running OpenBSD, apache chrooted: */
|
||||||
|
$symon['rrdtool_path']='/bin/rrdtool';
|
||||||
|
$symon['cache_dir']='/symon/cache';
|
||||||
|
$symon['host_tree']='/symon/rrds';
|
||||||
|
$symon['layout_dir']='/symon';
|
||||||
|
-*/
|
||||||
|
|
||||||
|
/* running OpenBSD, apache not chrooted:
|
||||||
|
$symon['rrdtool_path']='/usr/local/bin/rrdtool';
|
||||||
|
@@ -32,11 +31,12 @@ $symon['host_tree']='/var/www/symon/rrds';
|
||||||
|
$symon['layout_dir']='/var/www/symon';
|
||||||
|
*/
|
||||||
|
|
||||||
|
-/* running FreeBSD, apache not chrooted: */
|
||||||
|
+/* running FreeBSD, apache not chrooted:
|
||||||
|
$symon['rrdtool_path']='/usr/local/bin/rrdtool';
|
||||||
|
$symon['cache_dir']='/usr/local/www/symon/cache';
|
||||||
|
$symon['host_tree']='/usr/local/www/symon/rrds';
|
||||||
|
$symon['layout_dir']='/usr/local/www/symon';
|
||||||
|
+*/
|
||||||
|
|
||||||
|
$symon['cache_duration']=20;
|
||||||
|
$symon['isolate_hosts']=1;
|
12
www/syweb/patches/patch-htdocs_syweb_tools_inc
Normal file
12
www/syweb/patches/patch-htdocs_syweb_tools_inc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
$OpenBSD: patch-htdocs_syweb_tools_inc,v 1.1.1.1 2007/10/05 13:32:32 winiger Exp $
|
||||||
|
--- htdocs/syweb/tools.inc.orig Fri Oct 5 10:10:05 2007
|
||||||
|
+++ htdocs/syweb/tools.inc Fri Oct 5 10:10:36 2007
|
||||||
|
@@ -60,7 +60,7 @@ function normalise_filename($filename) {
|
||||||
|
$filename = $match[1];
|
||||||
|
}
|
||||||
|
/* remove all but lowercase and digits */
|
||||||
|
- $filename = preg_replace("/[^a-z0-9_]/", '', $filename);
|
||||||
|
+ $filename = preg_replace("/[^a-z0-9_-]/", '', $filename);
|
||||||
|
|
||||||
|
return $filename;
|
||||||
|
}
|
16
www/syweb/patches/patch-install_rrdtool_sh
Normal file
16
www/syweb/patches/patch-install_rrdtool_sh
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
$OpenBSD: patch-install_rrdtool_sh,v 1.1.1.1 2007/10/05 13:32:32 winiger Exp $
|
||||||
|
--- install_rrdtool.sh.orig Fri Oct 5 10:51:01 2007
|
||||||
|
+++ install_rrdtool.sh Fri Oct 5 10:51:56 2007
|
||||||
|
@@ -31,10 +31,11 @@ if [ "${LIBS}x" = x ]; then
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd ${PREFIX}
|
||||||
|
-mkdir -p bin usr/lib usr/libexec
|
||||||
|
+mkdir -p bin usr/lib usr/libexec usr/local/share/rrdtool/fonts
|
||||||
|
cp -f $LIBS usr/lib
|
||||||
|
cp -f ${RRD_CMD} bin
|
||||||
|
cp -f /usr/libexec/ld.so usr/libexec
|
||||||
|
cp -f /bin/sh bin/sh
|
||||||
|
+cp /usr/local/share/rrdtool/fonts/*.ttf usr/local/share/rrdtool/fonts/
|
||||||
|
echo rrdtool and libs installed in apache root
|
||||||
|
exit 1
|
2
www/syweb/pkg/DESCR
Normal file
2
www/syweb/pkg/DESCR
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
syweb is a web interface that shows graphs for measurement data
|
||||||
|
gathered by symon/symux.
|
10
www/syweb/pkg/MESSAGE
Normal file
10
www/syweb/pkg/MESSAGE
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
syweb's default install assumes that:
|
||||||
|
- apache is chrooted at ${PREFIX}
|
||||||
|
- rrdtool is installed in the chroot
|
||||||
|
- symux rrd files are kept in ${PREFIX}/symon/rrds/<host>/*.rrd
|
||||||
|
|
||||||
|
rrdtool can be installed in the chroot using
|
||||||
|
${PREFIX}/symon/install_rrdtool.sh
|
||||||
|
|
||||||
|
Customise ${PREFIX}/htdocs/syweb/setup.inc if these assumptions are
|
||||||
|
incorrect.
|
30
www/syweb/pkg/PLIST
Normal file
30
www/syweb/pkg/PLIST
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
@comment $OpenBSD: PLIST,v 1.1.1.1 2007/10/05 13:32:32 winiger Exp $
|
||||||
|
@owner root
|
||||||
|
@group www
|
||||||
|
htdocs/syweb/
|
||||||
|
htdocs/syweb/class_cache.inc
|
||||||
|
htdocs/syweb/class_graph.inc
|
||||||
|
htdocs/syweb/class_layout.inc
|
||||||
|
htdocs/syweb/class_lexer.inc
|
||||||
|
htdocs/syweb/class_rrdtool.inc
|
||||||
|
htdocs/syweb/class_session.inc
|
||||||
|
htdocs/syweb/class_text.inc
|
||||||
|
htdocs/syweb/class_vars.inc
|
||||||
|
htdocs/syweb/configtest.php
|
||||||
|
htdocs/syweb/graph.php
|
||||||
|
htdocs/syweb/graph_defaults.inc
|
||||||
|
htdocs/syweb/index.php
|
||||||
|
htdocs/syweb/setup.inc
|
||||||
|
htdocs/syweb/spacer.png
|
||||||
|
htdocs/syweb/symon.css
|
||||||
|
htdocs/syweb/symon.png
|
||||||
|
htdocs/syweb/tools.inc
|
||||||
|
symon/
|
||||||
|
@mode 775
|
||||||
|
symon/cache/
|
||||||
|
@mode
|
||||||
|
symon/hifn_test.layout
|
||||||
|
symon/install_rrdtool.sh
|
||||||
|
symon/pf.layout
|
||||||
|
symon/rrds/
|
||||||
|
symon/total_firewall.layout
|
Loading…
Reference in New Issue
Block a user