summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Steel2015-06-08 18:30:26 +0100
committerJonathan Steel2015-06-08 18:30:26 +0100
commit86e4e53114d3ea4b6e3d8044f48f6afd3f091931 (patch)
treecb16db7058748922bbe6680b69992c7af0d25776
downloadaur-86e4e53114d3ea4b6e3d8044f48f6afd3f091931.tar.gz
Initial commit
-rw-r--r--.SRCINFO35
-rw-r--r--PKGBUILD38
-rw-r--r--nagvis.conf59
-rw-r--r--nagvis.install13
4 files changed, 145 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..118477b9c279
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,35 @@
+pkgbase = nagvis
+ pkgdesc = Visualization addon for the well known network managment system Nagios
+ pkgver = 1.7.10
+ pkgrel = 3
+ url = http://www.nagvis.org
+ install = nagvis.install
+ arch = any
+ license = GPL
+ depends = graphviz
+ depends = php-sqlite
+ depends = apache
+ depends = php-apache
+ backup = usr/share/nagvis/etc/geomap/links.xml
+ backup = usr/share/nagvis/etc/geomap/viewpoints.xml
+ backup = usr/share/nagvis/etc/geomap/locations.xml
+ backup = usr/share/nagvis/etc/geomap/settings.xml
+ backup = usr/share/nagvis/etc/geomap/demo-locations.csv
+ backup = usr/share/nagvis/etc/maps/demo-overview.cfg
+ backup = usr/share/nagvis/etc/maps/demo-automap2.cfg
+ backup = usr/share/nagvis/etc/maps/demo-load.cfg
+ backup = usr/share/nagvis/etc/maps/demo-germany.cfg
+ backup = usr/share/nagvis/etc/maps/demo-geomap.cfg
+ backup = usr/share/nagvis/etc/maps/demo-ham-racks.cfg
+ backup = usr/share/nagvis/etc/maps/demo-muc-srv1.cfg
+ backup = usr/share/nagvis/etc/maps/demo-automap.cfg
+ backup = usr/share/nagvis/etc/.htaccess
+ backup = usr/share/nagvis/etc/conf.d/demo.ini.php
+ backup = etc/httpd/conf/extra/nagvis.conf
+ source = http://downloads.sourceforge.net/nagvis/nagvis-1.7.10.tar.gz
+ source = nagvis.conf
+ md5sums = b9defcf6153525c9927a7e631fc0ff5c
+ md5sums = 05fe86ccd6e950105532bed926164f3c
+
+pkgname = nagvis
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..46797839d236
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Jonathan Steel <jsteel at aur.archlinux.org>
+# Contributor: Mariusz Derela <mariusz.derela@gmail.com>
+
+pkgname=nagvis
+pkgver=1.7.10
+pkgrel=3
+pkgdesc="Visualization addon for the well known network managment system Nagios"
+license=('GPL')
+arch=('any')
+url="http://www.nagvis.org"
+depends=('graphviz' 'php-sqlite' 'apache' 'php-apache')
+install=$pkgname.install
+backup=('usr/share/nagvis/etc/geomap/links.xml' 'usr/share/nagvis/etc/geomap/viewpoints.xml'
+ 'usr/share/nagvis/etc/geomap/locations.xml' 'usr/share/nagvis/etc/geomap/settings.xml'
+ 'usr/share/nagvis/etc/geomap/demo-locations.csv' 'usr/share/nagvis/etc/maps/demo-overview.cfg'
+ 'usr/share/nagvis/etc/maps/demo-automap2.cfg' 'usr/share/nagvis/etc/maps/demo-load.cfg'
+ 'usr/share/nagvis/etc/maps/demo-germany.cfg' 'usr/share/nagvis/etc/maps/demo-geomap.cfg'
+ 'usr/share/nagvis/etc/maps/demo-ham-racks.cfg' 'usr/share/nagvis/etc/maps/demo-muc-srv1.cfg'
+ 'usr/share/nagvis/etc/maps/demo-automap.cfg' 'usr/share/nagvis/etc/.htaccess'
+ 'usr/share/nagvis/etc/conf.d/demo.ini.php' 'etc/httpd/conf/extra/nagvis.conf')
+source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
+ $pkgname.conf)
+md5sums=('b9defcf6153525c9927a7e631fc0ff5c'
+ '05fe86ccd6e950105532bed926164f3c')
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+
+ install -d "$pkgdir"/usr/share/$pkgname/
+
+ cp -a etc share "$pkgdir"/usr/share/$pkgname/
+ cp -a docs "$pkgdir"/usr/share/$pkgname/share/
+
+ install -d "$pkgdir"/usr/share/$pkgname/{etc/profiles,var/tmpl/{compile,cache}}
+
+ install -Dm 644 "$srcdir"/$pkgname.conf \
+ "$pkgdir"/etc/httpd/conf/extra/$pkgname.conf
+}
diff --git a/nagvis.conf b/nagvis.conf
new file mode 100644
index 000000000000..bdbba673f306
--- /dev/null
+++ b/nagvis.conf
@@ -0,0 +1,59 @@
+# NagVis Apache2 sample configuration file
+#
+# #############################################################################
+
+Alias /nagvis "/usr/share/nagvis/share/"
+
+<Directory "/usr/share/nagvis/share/">
+ Options FollowSymLinks
+ AllowOverride None
+ Require all granted
+ php_admin_value open_basedir "/usr/share/nagvis/:/tmp/"
+
+ # To enable Nagios basic auth on NagVis use the following options
+ # Just uncomment it. Maybe you need to adjust the path to the
+ # Auth user file.
+ #
+ # If you use the NagVis internal auth mechanism based on the web
+ # for you won't need this.
+ #
+ #AuthName "NagVis Access"
+ #AuthType Basic
+ #AuthUserFile @NAGIOS_PATH@/etc/htpasswd.users
+ #Require valid-user
+
+ # With installed and enabled mod_rewrite there are several redirections
+ # available to fix deprecated and/or wrong urls. None of those rules is
+ # mandatory to get NagVis working.
+ <IfModule mod_rewrite.c>
+ RewriteEngine On
+ RewriteBase /nagvis
+
+ # Use mod_rewrite for old url redirection even if there are php files which
+ # redirect the queries itselfs. In some cases the mod_rewrite redirect
+ # is better than the php redirect.
+ #
+ # Using the php redirect seems to be better in some cases where https/http servers
+ # are mixed. For example in OMD setups where using apache own mode and https in the
+ # frontend and http in the backend apache servers.
+ #
+ # Disabling this redirect by default in the hope that the php direct works better.
+ #RewriteCond %{REQUEST_URI} ^/nagvis(/config\.php|/index\.php|/|)(\?.*|)$
+ #RewriteRule ^(.*)$ /nagvis/frontend/nagvis-js/%1%2 [R=301,L]
+
+ # Redirect old regular map links
+ RewriteCond %{REQUEST_URI} ^/nagvis/frontend/(wui|nagvis-js)
+ RewriteCond %{QUERY_STRING} map=(.*)
+ RewriteRule ^(.*)$ /nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=%1 [R=301,L]
+
+ # Without map= param
+ RewriteCond %{REQUEST_URI} ^/nagvis/frontend(/wui)?/?(index.php)?$
+ RewriteRule ^(.*)$ /nagvis/frontend/nagvis-js/index.php [R=301,L]
+
+ # Redirect old rotation calls
+ RewriteCond %{REQUEST_URI} ^/nagvis/frontend/nagvis-js
+ RewriteCond %{QUERY_STRING} !mod
+ RewriteCond %{QUERY_STRING} rotation=(.*)
+ RewriteRule ^(.*)$ /nagvis/frontend/nagvis-js/index.php?mod=Rotation&act=view&show=%1 [R=301,L]
+ </IfModule>
+</Directory>
diff --git a/nagvis.install b/nagvis.install
new file mode 100644
index 000000000000..423f28fc22c8
--- /dev/null
+++ b/nagvis.install
@@ -0,0 +1,13 @@
+post_install() {
+ chown -R 33:33 /usr/share/nagvis/
+
+ echo '==> Enable php and uncomment extension=pdo_sqlite.so in /etc/php/php.ini
+ Include conf/extra/nagvis.conf in httpd.conf, then copy
+ /usr/share/nagvis/etc/nagvis.ini.php-sample to /usr/share/nagvis/etc/nagvis.ini.php
+ Restart Apache and browse to http://localhost/nagvis
+ The default logins are "admin, admin" and "guest, guest"'
+}
+
+post_upgrade() {
+ post_install
+}