mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-01 05:45:45 +00:00
net-mgmt/observium: multiple changes
* Fix license * Improve post install message * Add Apache config PR: 214515 Submitted by: dirkx@webweaving.org (maintainer) (with slight modification)
This commit is contained in:
parent
0ee1a7d1b6
commit
155eb4d28c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=448544
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= observium
|
||||
PORTVERSION= 0.16.10.8128
|
||||
PORTREVISION= 4
|
||||
PORTREVISION= 5
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= http://www.observium.org/
|
||||
DISTNAME= ${PORTNAME}-community-latest
|
||||
@ -12,47 +12,55 @@ DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}
|
||||
MAINTAINER= dirkx@webweaving.org
|
||||
COMMENT= Autodiscovering PHP/MySQL/SNMP based network monitoring
|
||||
|
||||
LICENSE= GPLv3
|
||||
LICENSE= EULA
|
||||
LICENSE_NAME= "Observium License Version 1.0"
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE.COMMUNITY
|
||||
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
|
||||
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}
|
||||
|
||||
USES= php:cli python shebangfix
|
||||
SHEBANG_FILES= mibs/process.pl \
|
||||
scripts/agent-local/areca-hw \
|
||||
scripts/agent-local/asterisk \
|
||||
scripts/agent-local/bind \
|
||||
scripts/agent-local/crashplan \
|
||||
scripts/agent-local/edac \
|
||||
scripts/agent-local/exim-mailqueue.sh \
|
||||
scripts/agent-local/hdarray \
|
||||
scripts/agent-local/ipmitool-sensor \
|
||||
scripts/agent-local/kamailio \
|
||||
scripts/agent-local/ksm \
|
||||
scripts/agent-local/lighttpd \
|
||||
scripts/agent-local/lmsensors \
|
||||
scripts/agent-local/lvs_stats \
|
||||
scripts/agent-local/postfix_mailgraph \
|
||||
scripts/agent-local/postfix_qshape \
|
||||
scripts/agent-local/postgresql.pl \
|
||||
scripts/agent-local/proxmox-qemu \
|
||||
scripts/agent-local/sabnzbd-qstatus \
|
||||
scripts/agent-local/temperature \
|
||||
scripts/agent-local/virt-what \
|
||||
scripts/agent-local/vmwaretools \
|
||||
scripts/agent-local/zimbra \
|
||||
scripts/add_ds.pl \
|
||||
scripts/add_ds_to_rrd.pl \
|
||||
scripts/get-geshi.sh \
|
||||
scripts/get-jpgraph.sh \
|
||||
scripts/ifAlias \
|
||||
scripts/ifAlias_persist \
|
||||
scripts/makecss.sh \
|
||||
scripts/observium_agent \
|
||||
scripts/removespikes.php \
|
||||
scripts/removespikes.pl \
|
||||
scripts/rename-mibs.pl \
|
||||
scripts/rrdtoolx.py \
|
||||
poller-wrapper.py
|
||||
SHEBANG_FILES= \
|
||||
mibs/process.pl \
|
||||
poller-wrapper.py \
|
||||
scripts/add_ds_to_rrd.pl \
|
||||
scripts/add_ds.pl \
|
||||
scripts/agent-local/areca-hw \
|
||||
scripts/agent-local/asterisk \
|
||||
scripts/agent-local/bind \
|
||||
scripts/agent-local/crashplan \
|
||||
scripts/agent-local/edac \
|
||||
scripts/agent-local/exim-mailqueue.sh \
|
||||
scripts/agent-local/hdarray \
|
||||
scripts/agent-local/ipmitool-sensor \
|
||||
scripts/agent-local/kamailio \
|
||||
scripts/agent-local/ksm \
|
||||
scripts/agent-local/lighttpd \
|
||||
scripts/agent-local/lmsensors \
|
||||
scripts/agent-local/lvs_stats \
|
||||
scripts/agent-local/memcached \
|
||||
scripts/agent-local/nginx \
|
||||
scripts/agent-local/postfix_mailgraph \
|
||||
scripts/agent-local/postfix_qshape \
|
||||
scripts/agent-local/postgresql.pl \
|
||||
scripts/agent-local/proxmox-qemu \
|
||||
scripts/agent-local/sabnzbd-qstatus \
|
||||
scripts/agent-local/temperature \
|
||||
scripts/agent-local/virt-what \
|
||||
scripts/agent-local/vmwaretools \
|
||||
scripts/agent-local/zimbra \
|
||||
scripts/get-geshi.sh \
|
||||
scripts/get-jpgraph.sh \
|
||||
scripts/glue.py \
|
||||
scripts/ifAlias \
|
||||
scripts/ifAlias_persist \
|
||||
scripts/logparser \
|
||||
scripts/makecss.sh \
|
||||
scripts/observium_agent \
|
||||
scripts/removespikes.php \
|
||||
scripts/removespikes.pl \
|
||||
scripts/rename-mibs.pl \
|
||||
scripts/rrdtoolx.py
|
||||
|
||||
USE_PHP= ctype filter gd iconv json mcrypt mysqli openssl posix session snmp tokenizer xml zlib
|
||||
IGNORE_WITH_PHP= 71
|
||||
@ -88,7 +96,7 @@ WMIC_RUN_DEPENDS= wmic:net-mgmt/wmi-client
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
SUB_FILES+= pkg-message
|
||||
SUB_FILES+= pkg-message observium.conf.sample
|
||||
SUB_LIST+= PHP="${PHPBASE}/bin/php" PYTHON=${PHPBASE}/bin/python
|
||||
|
||||
ROOT_FILES= rename_device.php snmptrap.php add_device.php \
|
||||
@ -100,9 +108,11 @@ ROOT_DIRS= html scripts includes update mibs libs
|
||||
PORTDOCS= INSTALL README
|
||||
PORTEXAMPLES= snmp.conf.example snmpd.conf.example
|
||||
|
||||
.if ${PORT_OPTIONS:MAPACHEMOD} && !defined(PACKAGE_BUILDING)
|
||||
USES+= php:mod
|
||||
.if ${PORT_OPTIONS:MAPACHEMOD}
|
||||
USE_APACHE_RUN= 22+
|
||||
.endif
|
||||
.if !defined(PACKAGE_BUILDING)
|
||||
USES+= php:mod
|
||||
.else
|
||||
# Package builder doesn't create php5 with module
|
||||
USES+= php:web
|
||||
@ -118,7 +128,7 @@ post-patch:
|
||||
${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/poller-wrapper.py ${WRKSRC}/poller.php
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${STAGEDIR}/${WWWDIR}
|
||||
${MKDIR} ${STAGEDIR}/${WWWDIR} ${STAGEDIR}/${PREFIX}/${APACHEETCDIR}/Includes
|
||||
.for dir in ${ROOT_DIRS}
|
||||
${MKDIR} ${STAGEDIR}/${WWWDIR}/${dir}
|
||||
cd ${WRKSRC}/${dir} && ${COPYTREE_SHARE} . ${STAGEDIR}/${WWWDIR}/${dir}
|
||||
@ -147,5 +157,6 @@ do-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}/${EXAMPLESDIR}
|
||||
.endfor
|
||||
.endif
|
||||
${INSTALL_DATA} ${WRKDIR}/observium.conf.sample ${STAGEDIR}/${PREFIX}/${APACHEETCDIR}/Includes
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
66
net-mgmt/observium/files/observium.conf.sample.in
Normal file
66
net-mgmt/observium/files/observium.conf.sample.in
Normal file
@ -0,0 +1,66 @@
|
||||
|
||||
# Observium cannot be ran on a sub-uri (See the FAQ
|
||||
# http://observium.org/docs/faq/). Hence this strawman
|
||||
# config runs it as a virtual host on port 8080.
|
||||
#
|
||||
# Replace the '*:8080' by the actual virtual host(name)
|
||||
# you will be using; and consider enabling SSL. An example
|
||||
# can be fund at e /usr/local/etc/apache24/extra/httpd-ssl.conf
|
||||
#
|
||||
|
||||
Listen *:8080
|
||||
<VirtualHost *:8080>
|
||||
Documentroot "%%WWWDIR%%/html"
|
||||
AddHandler application/x-httpd-php .php
|
||||
#
|
||||
# CustomLog "/var/log/httpd-observium-access.log" common
|
||||
|
||||
DirectoryIndex index.php
|
||||
<Directory "%%WWWDIR%%/html">
|
||||
Options Indexes FollowSymLinks Multiviews
|
||||
AllowOverride None
|
||||
|
||||
# These:w statement mirror the .htaccess
|
||||
# files that are part of the normal
|
||||
# Observium distribution. See the URL:
|
||||
#
|
||||
# https://httpd.apache.org/docs/current/howto/htaccess.html#when
|
||||
#
|
||||
# for the various reasons to promote
|
||||
# these to an apache config file.
|
||||
#
|
||||
RedirectMatch 404 /\.
|
||||
|
||||
RewriteEngine on
|
||||
RewriteBase /
|
||||
|
||||
# Block access to hidden files/dirs
|
||||
RewriteRule ^\..*$ - [F,L]
|
||||
# Don't favicon!
|
||||
RewriteCond %{REQUEST_FILENAME} !^favicon\.ico
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} !\.(js|ico|txt|gif|jpg|png|css|php)
|
||||
RewriteCond %{REQUEST_URI} !^api/
|
||||
RewriteCond %{REQUEST_URI} !^rrd/
|
||||
RewriteCond %{REQUEST_URI} !=/server-status
|
||||
RewriteRule ^(.*)$ index.php/$1/
|
||||
|
||||
AcceptPathInfo On
|
||||
Require all granted
|
||||
</directory>
|
||||
|
||||
<Directory "%%WWWDIR%%/pages">
|
||||
deny from all
|
||||
</Directory>
|
||||
|
||||
<Directory "%%WWWDIR%%/html/print">
|
||||
deny from all
|
||||
</Directory>
|
||||
|
||||
<Directory "%%WWWDIR%%/includes">
|
||||
deny from all
|
||||
</Directory>
|
||||
|
||||
</VirtualHost>
|
||||
|
@ -56,7 +56,20 @@ sudo -u www %%WWWDIR%%/poller.php -h all -d
|
||||
|
||||
5: Install the above crontabs.
|
||||
|
||||
6: Edit the file
|
||||
|
||||
%%PREFIX%%/%%APACHEETCDIR%%/Includes/observium.conf
|
||||
|
||||
and fill out a port number and hostname.
|
||||
|
||||
7: restart the webserver with
|
||||
|
||||
apachectl restart
|
||||
|
||||
or stop/start if in case of IP or SSL changes.
|
||||
|
||||
6: log in with a web browser; using the username 'admin' and the
|
||||
password 'SomeInsecureAdminPassword'.
|
||||
|
||||
Hosts can be added from the webinterface or from the commandline.
|
||||
|
||||
|
@ -11549,3 +11549,4 @@
|
||||
@dir(www,www,) %%WWWDIR%%/logs
|
||||
@dir(www,www,) %%WWWDIR%%/rrd
|
||||
@dir %%WWWDIR%%/scripts/agent-local/munin-scripts
|
||||
@sample %%APACHEETCDIR%%/Includes/observium.conf.sample
|
||||
|
Loading…
Reference in New Issue
Block a user