ports/146081: [MANTAINER UPDATE] net-mgmt/nagiosgraph to 1.4.2

Hizbulin Ildar hizel at vyborg.ru
Tue Apr 27 09:20:03 UTC 2010

>Number:         146081
>Category:       ports
>Synopsis:       [MANTAINER UPDATE] net-mgmt/nagiosgraph to 1.4.2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 27 09:20:02 UTC 2010
>Originator:     Hizbulin Ildar
>Release:        7.3-RELEASE
Ariadna-Link, ISP
FreeBSD test1.vyborg.ru 7.3-RELEASE FreeBSD 7.3-RELEASE #0: Tue Mar 23 11:37:49 MSK 2010     root at serv4:/usr/obj/usr/src/sys/SERV472  i386
* new configuration options (see nagiosgraph.conf for details):
     colormax (optional)
     colormin (optional)
     language (optional)
     showprocessingtime (optional)
     default_geometry (optional)
     cgilogfile (optional)
     authzmethod (optional)
* added access control.  there are two ways to define access controls.  the
   default is to use the access control built in to nagios.  this works for
   nagios 3 and perhaps for older nagios releases.  the other way is to use
   an access control file specific to nagiosgraph.
* added i18n.  this is a very basic, no-dependencies implementation.  the
   intent is to be completely self contained, add minimal overhead, and not
   break existing installations.  error messages are not translated.  the
   language is detected from the HTTP_ACCEPT_LANGUAGE variable.  this can
   be overridden by explicit cgi argument.  language can be forced by
   specifying it in the nagiosgraph configuration file.
* added labels file.  labels can be specified individually via cgi arguments
   or via configuration files for specific combinations of host/service/data.
   labels can be overridden for individual languages, independenly of i18n.
   labels in nagiosgraph.conf are now ignored.  move them to the labels file.
* recognize relative paths for configuration filenames.  prepend the config
   dir when relative paths are specified.
* include a line with the hostname in the input to the map rules.  this
   enables the use of map rules that are host-specific.  this is a significant
   change from the previous 3-line behavior, but it will not break existing
   map rules unless they depend on the line count.  having the host information
   also makes it easier to diagnose parsing issues when processing data.
* remove trailing newline from perfdata string.
* prevent name clashes between data set names by using qualified identifiers
   rather than just data names in graph definitions.  this enables graphing
   of data sources from multiple databases even if the data sources have the
   same name.
* optionally specify max/min colors that will be used for the withmaximums
   and withminimums services, respectively.
* optionally report processing time.  processing time does *not* include the
   time required by showgraph.cgi to generate all of the graphs.
* optionally specify a default width and height.
* hostdb.conf and servdb.conf are now optional.  if these files are not 
   specified, or if they contain no entries, then data for every service
   (showhost.cgi) and data for every host (showservice.cgi) will be
   displayed.  use the hostdb and servdb files to filter graphs and
   control the order in which graphs are shown.
* started refactoring of code to eliminate redundant trips to disk for 
   host/service/dataset listings and to enable pattern matching in
   the *db.conf files.
* contents of README.map are now in INSTALL
* display rrdgraph and other error messages if GD is installed.  log the
   error messages whether or not GD is installed.
* do not create data directories unless we really have to do so (fixes a
   longstanding permissions bug)
* use separate cgi log file to avoid permissions conflicts.  attempt to
   fallback gracefully when permissions are not configured properly.
* consolidated log file initialization.
* refactored error handling and reporting, should be more consistent now.
* refer to 'new style' and 'old style' processing as 'batch' and 'immediate'
* removed fixedscale from GUI.  it remains as a cgi argument for backward
   compatibility, but it is better to define fixed scale using rrdopts.
   the syntax is '-X 0'.
* check data source name when creating rrd files.  complain loudly and bail
   out if the name is invalid.
* be consistent in code and documentation for database and data source.
* added div to warn when nagiosgraph.js is not installed or wrong version.


Patch attached with submission follows:

diff --git a/net-mgmt/nagiosgraph/Makefile b/net-mgmt/nagiosgraph/Makefile
index 0f036ea..4425f33 100644
--- a/net-mgmt/nagiosgraph/Makefile
+++ b/net-mgmt/nagiosgraph/Makefile
@@ -6,8 +6,7 @@
 PORTNAME=	nagiosgraph
 CATEGORIES=	net-mgmt
@@ -20,11 +19,13 @@ RUN_DEPENDS=	${LOCALBASE}/bin/nagios:${PORTSDIR}/net-mgmt/nagios \
 NO_BUILD=	yes
 NAGIOSWWWDIR?=	www/nagios
 CGIFILES=	show.cgi showgraph.cgi showhost.cgi showservice.cgi testcolor.cgi showgroup.cgi
 LIBFILES=	insert.pl
-CFGFILES=	nagiosgraph.conf servdb.conf groupdb.conf hostdb.conf map
+CFGFILES=	nagiosgraph.conf nagiosgraph_de.conf nagiosgraph_es.conf nagiosgraph_fr.conf \
+                servdb.conf groupdb.conf hostdb.conf datasetdb.conf map access.conf labels.conf \
+		rrdopts.conf
@@ -59,7 +60,7 @@ do-install:
-.for i in share/nagiosgraph.css share/nagiosgraph.js
+.for i in share/nagiosgraph.css share/nagiosgraph.js share/nagiosgraph.ssi
@@ -68,7 +69,7 @@ do-install:
 .if !defined(NOPORTEXAMPLES)
-.for i in utils/authz.pl utils/testentry.pl utils/upgrade.pl
+.for i in utils/testentry.pl utils/upgrade.pl
diff --git a/net-mgmt/nagiosgraph/distinfo b/net-mgmt/nagiosgraph/distinfo
index a4e5a20..8cc076d 100644
--- a/net-mgmt/nagiosgraph/distinfo
+++ b/net-mgmt/nagiosgraph/distinfo
@@ -1,3 +1,3 @@
-MD5 (nagiosgraph-1.4.1.tar.gz) = 4b9d7d81d1e6f3c1cabc2a76c6d8fd3e
-SHA256 (nagiosgraph-1.4.1.tar.gz) = 078ec882758e3a56fb2705494e72f38ca9232658d1e7c3d7c3c7afd1f66c6b49
-SIZE (nagiosgraph-1.4.1.tar.gz) = 79340
+MD5 (nagiosgraph-1.4.2.tar.gz) = 085c01c1f2534d050b21815af1986282
+SHA256 (nagiosgraph-1.4.2.tar.gz) = 798509946bbfc0d4f63fbf0d988dde4a40dcea9c5f935ee9c1ebd27158dff210
+SIZE (nagiosgraph-1.4.2.tar.gz) = 108561
diff --git a/net-mgmt/nagiosgraph/files/patch-etc-nagiosgraph.conf.in b/net-mgmt/nagiosgraph/files/patch-etc-nagiosgraph.conf.in
index 5000852..e570386 100644
--- a/net-mgmt/nagiosgraph/files/patch-etc-nagiosgraph.conf.in
+++ b/net-mgmt/nagiosgraph/files/patch-etc-nagiosgraph.conf.in
@@ -1,54 +1,72 @@
---- etc/nagiosgraph.conf.orig	2010-03-05 10:24:25.000000000 +0000
-+++ etc/nagiosgraph.conf	2010-03-05 10:44:53.000000000 +0000
-@@ -8,41 +8,41 @@
+--- etc/nagiosgraph.conf.orig	2010-04-27 08:14:25.000000000 +0000
++++ etc/nagiosgraph.conf	2010-04-27 08:18:16.000000000 +0000
+@@ -8,19 +8,19 @@
  # Author:  (c) 2010 Matthew Wall
  # Location of nagiosgraph log file.  Debug output ends up here.
 -logfile = /var/log/nagiosgraph.log
 +logfile = /var/spool/nagios/nagiosgraph.log
+ # Optionally keep logging from CGI scripts in a separate file.
+ #cgilogfile = /var/log/nagiosgraph-cgi.log
  # Location of nagios performance data log file. Comment out if not used.
 -perflog = /var/nagios/perfdata.log
 +perflog = /var/spool/nagios/perfdata.log
  # Directory to store rrd database files
--rrddir = /var/nagiosgraph/rrd
-+rrddir = /var/spool/nagios/rrd
+ rrddir = /var/nagiosgraph/rrd
  # File containing regular expressions to identify service and perf data
 -mapfile = /etc/nagiosgraph/map
 +mapfile = %%PREFIX%%/etc/nagios/nagiosgraph/map
- # Location of showhost control file
--hostdb = /etc/nagiosgraph/hostdb.conf
-+hostdb = %%PREFIX%%/etc/nagios/nagiosgraph/hostdb.conf
- # Location of showservice control file
--servdb = /etc/nagiosgraph/servdb.conf
-+servdb = %%PREFIX%%/etc/nagios/nagiosgraph/servdb.conf
- # Location of showgroup control file
--groupdb = /etc/nagiosgraph/groupdb.conf
-+groupdb = %%PREFIX%%/etc/nagios/nagiosgraph/groupdb.conf
- # File containing data sets that should be selected in service queries.
- #datasetdb = /opt/nagiosgraph/etc/datasetdb.conf
  # Nagiosgraph CGI URL.
--nagiosgraphcgiurl = /nagiosgraph/cgi-bin
-+nagiosgraphcgiurl = /nagios/cgi-bin/nagiosgraph
- # Nagios CGI URL.  If the Nagiosgraph CGI scripts are in a directory other
- # than the Nagios CGI directory, then specify the Nagios CGI URL here.
+ nagiosgraphcgiurl = /nagiosgraph/cgi-bin
+@@ -30,36 +30,36 @@
  #nagioscgiurl = /nagios/cgi-bin
  # JavaScript: URL to the nagiosgraph javascript file.
 -javascript = /nagiosgraph/nagiosgraph.js
 +javascript = /nagios/stylesheets/nagiosgraph.js
- # Stylesheet: URL to the nagiosgraph stylesheet.  Comment out if not used.
+ # Stylesheet: URL to the nagiosgraph stylesheet.
 -stylesheet = /nagiosgraph/nagiosgraph.css
 +stylesheet = /nagios/stylesheets/nagiosgraph.css
+ # File containing labels for services and data (optional)
+-#labelfile = /etc/nagiosgraph/labels.conf
++#labelfile = %%PREFIX%%/etc/nagios/nagiosgraph/labels.conf
+ # Location of showhost control file (optional)
+-#hostdb = /etc/nagiosgraph/hostdb.conf
++#hostdb = %%PREFIX%%/etc/nagios/nagiosgraph/hostdb.conf
+ # Location of showservice control file (optional)
+-#servdb = /etc/nagiosgraph/servdb.conf
++#servdb = %%PREFIX%%/etc/nagios/nagiosgraph/servdb.conf
+ # Location of showgroup control file (required for showgroup.cgi)
+-groupdb = /etc/nagiosgraph/groupdb.conf
++groupdb = %%PREFIX%%/etc/nagios/nagiosgraph/groupdb.conf
+ # File containing data sets that should be selected in queries (optional)
+-#datasetdb = /etc/nagiosgraph/datasetdb.conf
++#datasetdb = %%PREFIX%%/etc/nagios/nagiosgraph/datasetdb.conf
+ # Access control configuration (optional)
+ # The authorization method can be one of nagios3 or nagiosgraph.  If no
+ # method is defined, access will be granted to all hosts and services.
+ # For access control via nagios, specify the nagios configuration files.
+ #authzmethod = nagios3
+-#authznagios_cfg = /etc/nagios/nagios.cfg
+-#authzcgi_cfg = /etc/nagios/cgi.cfg
++#authznagios_cfg = %%PREFIX%%/etc/nagios/nagios.cfg
++#authzcgi_cfg = %%PREFIX%%/etc/nagios/cgi.cfg
+ # For access control via nagiosgraph, specify a single access control file.
+ #authzmethod = nagiosgraph
+-#authzfile = /etc/nagiosgraph/access.conf
++#authzfile = %%PREFIX%%/etc/nagios/nagiosgraph/access.conf
- # Debug can be enabled for a specific CGI script and/or specific hosts or
+ # Logging can be enabled for a specific CGI script and/or specific hosts or
diff --git a/net-mgmt/nagiosgraph/pkg-plist b/net-mgmt/nagiosgraph/pkg-plist
index b31a740..7fa567b 100644
--- a/net-mgmt/nagiosgraph/pkg-plist
+++ b/net-mgmt/nagiosgraph/pkg-plist
@@ -10,10 +10,31 @@ etc/nagios/%%PORTNAME%%/map.sample
 @unexec if cmp -s %D/etc/nagios/%%PORTNAME%%/nagiosgraph.conf.sample %D/etc/nagios/%%PORTNAME%%/nagiosgraph.conf; then rm -f %D/etc/nagios/%%PORTNAME%%/nagiosgraph.conf; fi
 @exec if [ ! -f %D/etc/nagios/%%PORTNAME%%/nagiosgraph.conf ] ; then cp -p %D/%F %B/nagiosgraph.conf; fi
+ at unexec if cmp -s %D/etc/nagios/%%PORTNAME%%/nagiosgraph_de.conf.sample %D/etc/nagios/%%PORTNAME%%/nagiosgraph_de.conf; then rm -f %D/etc/nagios/%%PORTNAME%%/nagiosgraph_de.conf; fi
+ at exec if [ ! -f %D/etc/nagios/%%PORTNAME%%/nagiosgraph_de.conf ] ; then cp -p %D/%F %B/nagiosgraph_de.conf; fi
+ at unexec if cmp -s %D/etc/nagios/%%PORTNAME%%/nagiosgraph_es.conf.sample %D/etc/nagios/%%PORTNAME%%/nagiosgraph_es.conf; then rm -f %D/etc/nagios/%%PORTNAME%%/nagiosgraph_es.conf; fi
+ at exec if [ ! -f %D/etc/nagios/%%PORTNAME%%/nagiosgraph_es.conf ] ; then cp -p %D/%F %B/nagiosgraph_es.conf; fi
+ at unexec if cmp -s %D/etc/nagios/%%PORTNAME%%/nagiosgraph_fr.conf.sample %D/etc/nagios/%%PORTNAME%%/nagiosgraph_fr.conf; then rm -f %D/etc/nagios/%%PORTNAME%%/nagiosgraph_fr.conf; fi
+ at exec if [ ! -f %D/etc/nagios/%%PORTNAME%%/nagiosgraph_fr.conf ] ; then cp -p %D/%F %B/nagiosgraph_fr.conf; fi
 @unexec if cmp -s %D/etc/nagios/%%PORTNAME%%/servdb.conf.sample %D/etc/nagios/%%PORTNAME%%/servdb.conf; then rm -f %D/etc/nagios/%%PORTNAME%%/servdb.conf; fi
 @exec if [ ! -f %D/etc/nagios/%%PORTNAME%%/servdb.conf ] ; then cp -p %D/%F %B/servdb.conf; fi
+ at unexec if cmp -s %D/etc/nagios/%%PORTNAME%%/datasetdb.conf.sample %D/etc/nagios/%%PORTNAME%%/datasetdb.conf; then rm -f %D/etc/nagios/%%PORTNAME%%/datasetdb.conf; fi
+ at exec if [ ! -f %D/etc/nagios/%%PORTNAME%%/datasetdb.conf ] ; then cp -p %D/%F %B/datasetdb.conf; fi
+ at unexec if cmp -s %D/etc/nagios/%%PORTNAME%%/access.conf.sample %D/etc/nagios/%%PORTNAME%%/access.conf; then rm -f %D/etc/nagios/%%PORTNAME%%/access.conf; fi
+ at exec if [ ! -f %D/etc/nagios/%%PORTNAME%%/access.conf ] ; then cp -p %D/%F %B/access.conf; fi
+ at unexec if cmp -s %D/etc/nagios/%%PORTNAME%%/labels.conf.sample %D/etc/nagios/%%PORTNAME%%/labels.conf; then rm -f %D/etc/nagios/%%PORTNAME%%/labels.conf; fi
+ at exec if [ ! -f %D/etc/nagios/%%PORTNAME%%/labels.conf ] ; then cp -p %D/%F %B/labels.conf; fi
+ at unexec if cmp -s %D/etc/nagios/%%PORTNAME%%/rrdopts.conf.sample %D/etc/nagios/%%PORTNAME%%/rrdopts.conf; then rm -f %D/etc/nagios/%%PORTNAME%%/rrdopts.conf; fi
+ at exec if [ ! -f %D/etc/nagios/%%PORTNAME%%/rrdopts.conf ] ; then cp -p %D/%F %B/rrdopts.conf; fi
@@ -26,7 +47,7 @@ libexec/%%PORTNAME%%/insert.pl
 @unexec mv %D/%%NAGIOSWWWDIR%%%/images/action.gif.bak %D/%%NAGIOSWWWDIR%%/images/action.gif
 @dirrm libexec/%%PORTNAME%%


More information about the freebsd-ports-bugs mailing list