Index: head/net-mgmt/pnp/Makefile =================================================================== --- head/net-mgmt/pnp/Makefile (revision 490479) +++ head/net-mgmt/pnp/Makefile (revision 490480) @@ -1,104 +1,105 @@ # Created by: rea-fbsd@codelabs.ru # $FreeBSD$ PORTNAME= pnp PORTVERSION= 0.6.26 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= SF/pnp4nagios/PNP-0.6 DISTNAME= pnp4nagios-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} MAINTAINER?= lme@FreeBSD.org COMMENT?= Nagios / Icinga performance data collector and grapher LICENSE= GPLv2 BUILD_DEPENDS= ${LOCALBASE}/bin/rrdtool:databases/rrdtool RUN_DEPENDS?= ${LOCALBASE}/bin/rrdtool:databases/rrdtool \ nagios:net-mgmt/nagios MAKE_JOBS_UNSAFE= yes USES= dos2unix perl5 php php:web OPTIONS_DEFINE= PDF EXAMPLES OPTIONS_DEFAULT= PDF PDF_DESC= Use built-in fpdf library to produce PDF views .include USE_PHP= gd iconv json pcre session simplexml sockets xml zlib USE_RC_SUBR= npcd DOS2UNIX_REGEX= '.*\.\(php\|js\|txt\)$$' NAGIOSDIR?= /var/spool/nagios NAGIOSHTMURL?= /nagios NAGIOSUSER?= nagios NAGIOSGROUP?= nagios PNP_STATE= ${NAGIOSDIR}/pnp PNP_RRDS= ${PNP_STATE}/rrd PNP_SPOOL= ${PNP_STATE}/perfspool PNP_URL?= ${NAGIOSHTMURL}/pnp FPDF_DIR?= share/fpdf PDF_EXTRA_PATCHES_OFF+= ${FILESDIR}/extra-patch-disable-pdf GNU_CONFIGURE= yes CONFIGURE_ARGS+= \ --sysconfdir=${ETCDIR} \ --datarootdir=${WWWDIR} \ --datadir=${WWWDIR} \ --localstatedir=/var/log \ --with-rrdtool=${LOCALBASE}/bin/rrdtool \ --with-perfdata-dir=${PNP_RRDS} \ --with-perfdata-spool-dir=${PNP_SPOOL} \ --with-nagios-user=${NAGIOSUSER} \ --with-nagios-group=${NAGIOSGROUP} # Get rid of INSTALL_OPTS that are set by configure -- # we want the things to be installed with root:wheel and # NAGIOSUSER:NAGIOSGROUP are going to the configuration files. MAKE_ARGS= INSTALL_OPTS= INSTALL_TARGET= install install-config PLIST_SUB+= NAGIOSDIR=${NAGIOSDIR} \ NAGIOSUSER=${NAGIOSUSER} \ NAGIOSGROUP=${NAGIOSGROUP} \ WWWOWN=${WWWOWN} \ WWWGRP=${WWWGRP} SUB_FILES= pkg-message SUB_LIST= PNP_RRDS=${PNP_RRDS} \ PNP_URL=${PNP_URL} \ NAGIOSUSER=${NAGIOSUSER} \ NAGIOSGROUP=${NAGIOSGROUP} SAMPLE_CONFIGS= lighttpd.pnp4nagios.conf nginx.pnp4nagios.conf httpd.conf .if ${PORT_OPTIONS:MPDF} PNP_USE_FPDF= 1 .else PNP_USE_FPDF= 0 .endif post-patch: @${REINPLACE_CMD} \ -e's|^\$$conf\['\''use_fpdf'\''\] = [[:digit:]];|$$conf['\''use_fpdf'\''] = ${PNP_USE_FPDF};|' \ -e's|^\$$conf\['\''nagios_base'\''\] = "/nagios/cgi-bin";|$$conf\['\''nagios_base'\''\] = "${NAGIOSHTMURL}/cgi-bin";|' \ -e's|/usr/local/check_mk/|/usr/local/share/check_mk/|g' \ -e's|/usr/local/nagios/var/rw/live|/${NAGIOSDIR}/rw/live|' \ "${WRKSRC}/sample-config/pnp/config.php.in" .for f in ${SAMPLE_CONFIGS} @${REINPLACE_CMD} -e 's|@BASE_URL@|${PNP_URL}|g' -e 's|@datarootdir@|${WWWDIR}|g' \ -e 's|/usr/local/nagios/etc|${PREFIX}/etc/${NAGIOSUSER}|' -e 's|Nagios|${NAGIOSUSER}|' \ "${WRKSRC}/sample-config/${f}.in" .endfor @${LN} -fs ../en_US/dwnld.html ${WRKSRC}/share/pnp/documents/de_DE/dwnld.html post-install: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} .for f in ${SAMPLE_CONFIGS} ${INSTALL_DATA} ${WRKSRC}/sample-config/${f} ${STAGEDIR}${EXAMPLESDIR} .endfor ${INSTALL_MAN} ${WRKSRC}/man/npcd.8 ${STAGEDIR}${MAN8PREFIX}/man/man8 .include Index: head/net-mgmt/pnp/files/patch-share_pnp_application_controllers_ajax.php =================================================================== --- head/net-mgmt/pnp/files/patch-share_pnp_application_controllers_ajax.php (nonexistent) +++ head/net-mgmt/pnp/files/patch-share_pnp_application_controllers_ajax.php (revision 490480) @@ -0,0 +1,20 @@ +--- share/pnp/application/controllers/ajax.php.orig 2017-08-21 15:52:37 UTC ++++ share/pnp/application/controllers/ajax.php +@@ -59,7 +59,7 @@ class Ajax_Controller extends System_Controller { + + if($action == "list"){ + $basket = $this->session->get("basket"); +- if(is_array($basket) && sizeof($basket) > 0){ ++ if(is_array($basket) && (!empty($basket))){ + foreach($basket as $item){ + printf("
  • %s
  • \n", + "basket_action_remove", +@@ -135,7 +135,7 @@ class Ajax_Controller extends System_Controller { + echo "Action $action not known"; + } + $basket = $this->session->get("basket"); +- if(is_array($basket) && sizeof($basket) == 0){ ++ if(is_array($basket) && empty($basket)){ + echo Kohana::lang('common.basket-empty'); + }else{ + echo "
    \n"; Property changes on: head/net-mgmt/pnp/files/patch-share_pnp_application_controllers_ajax.php ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/pnp/files/patch-share_pnp_application_controllers_image.php =================================================================== --- head/net-mgmt/pnp/files/patch-share_pnp_application_controllers_image.php (nonexistent) +++ head/net-mgmt/pnp/files/patch-share_pnp_application_controllers_image.php (revision 490480) @@ -0,0 +1,11 @@ +--- share/pnp/application/controllers/image.php.orig 2017-08-21 15:52:37 UTC ++++ share/pnp/application/controllers/image.php +@@ -47,7 +47,7 @@ class Image_Controller extends System_Controller { + $this->rrdtool->streamImage("ERROR: NOT_AUTHORIZED"); + + #print Kohana::debug($this->data->STRUCT); +- if(sizeof($this->data->STRUCT) > 0){ ++ if(!empty($this->data->STRUCT)){ + $image = $this->rrdtool->doImage($this->data->STRUCT[0]['RRD_CALL']); + }else{ + $image = FALSE; Property changes on: head/net-mgmt/pnp/files/patch-share_pnp_application_controllers_image.php ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/pnp/files/patch-share_pnp_application_controllers_page.php =================================================================== --- head/net-mgmt/pnp/files/patch-share_pnp_application_controllers_page.php (nonexistent) +++ head/net-mgmt/pnp/files/patch-share_pnp_application_controllers_page.php (revision 490480) @@ -0,0 +1,11 @@ +--- share/pnp/application/controllers/page.php.orig 2017-08-21 15:52:37 UTC ++++ share/pnp/application/controllers/page.php +@@ -58,7 +58,7 @@ class Page_Controller extends System_Controller { + + public function basket(){ + $basket = $this->session->get("basket"); +- if(is_array($basket) && sizeof($basket) > 0){ ++ if(is_array($basket) && (!empty($basket))){ + $this->data->buildBasketStruct($basket,$this->view); + $this->template->page->basket_box = $this->add_view('basket_box'); + $this->template->page->header->title = Kohana::lang('common.page-basket'); Property changes on: head/net-mgmt/pnp/files/patch-share_pnp_application_controllers_page.php ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/pnp/files/patch-share_pnp_application_controllers_pdf.php =================================================================== --- head/net-mgmt/pnp/files/patch-share_pnp_application_controllers_pdf.php (nonexistent) +++ head/net-mgmt/pnp/files/patch-share_pnp_application_controllers_pdf.php (revision 490480) @@ -0,0 +1,11 @@ +--- share/pnp/application/controllers/pdf.php.orig 2017-08-21 15:52:37 UTC ++++ share/pnp/application/controllers/pdf.php +@@ -202,7 +202,7 @@ class Pdf_Controller extends System_Controller { + } + $this->data->getTimeRange($this->start,$this->end,$this->view); + $basket = $this->session->get("basket"); +- if(is_array($basket) && sizeof($basket) > 0){ ++ if(is_array($basket) && (!empty($basket))){ + $this->data->buildBasketStruct($basket,$this->view); + } + //echo Kohana::debug($this->data->STRUCT); Property changes on: head/net-mgmt/pnp/files/patch-share_pnp_application_controllers_pdf.php ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/pnp/files/patch-share_pnp_application_helpers_rrd.php =================================================================== --- head/net-mgmt/pnp/files/patch-share_pnp_application_helpers_rrd.php (nonexistent) +++ head/net-mgmt/pnp/files/patch-share_pnp_application_helpers_rrd.php (revision 490480) @@ -0,0 +1,20 @@ +--- share/pnp/application/helpers/rrd.php.orig 2017-08-21 15:52:37 UTC ++++ share/pnp/application/helpers/rrd.php +@@ -207,7 +207,7 @@ class rrd_Core { + if(is_array($cf)){ + foreach($cf as $key => $val){ + $line .= sprintf("GPRINT:%s:%s:",$vname,$val); +- if($key == sizeof($cf)-1){ ++ if($key == count($cf)-1){ + $line .= '"'.$text.' '.ucfirst(strtolower($val)).'\\l" '; + }else{ + $line .= '"'.$text.' '.ucfirst(strtolower($val)).'" '; +@@ -234,7 +234,7 @@ class rrd_Core { + if(is_array($cf)){ + foreach($cf as $key => $val){ + $line .= sprintf("GPRINT:%s:%s:",$vname,$val); +- if(($key == sizeof($cf)-1)and($align != "")){ ++ if(($key == count($cf)-1)and($align != "")){ + $line .= '"'.$text.' '.ucfirst(strtolower($val)).$align.'" '; + }else{ + $line .= '"'.$text.' '.ucfirst(strtolower($val)).'" '; Property changes on: head/net-mgmt/pnp/files/patch-share_pnp_application_helpers_rrd.php ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/pnp/files/patch-share_pnp_application_lib_json.php =================================================================== --- head/net-mgmt/pnp/files/patch-share_pnp_application_lib_json.php (nonexistent) +++ head/net-mgmt/pnp/files/patch-share_pnp_application_lib_json.php (revision 490480) @@ -0,0 +1,11 @@ +--- share/pnp/application/lib/json.php.orig 2017-08-21 15:52:37 UTC ++++ share/pnp/application/lib/json.php +@@ -375,7 +375,7 @@ class Services_JSON + */ + + // treat as a JSON object +- if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) { ++ if (is_array($var) && count($var) && (array_keys($var) !== range(0, count($var) - 1))) { + $properties = array_map(array($this, 'name_value'), + array_keys($var), + array_values($var)); Property changes on: head/net-mgmt/pnp/files/patch-share_pnp_application_lib_json.php ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/pnp/files/patch-share_pnp_application_models_auth.php =================================================================== --- head/net-mgmt/pnp/files/patch-share_pnp_application_models_auth.php (nonexistent) +++ head/net-mgmt/pnp/files/patch-share_pnp_application_models_auth.php (revision 490480) @@ -0,0 +1,15 @@ +--- share/pnp/application/models/auth.php.orig 2017-08-21 15:52:37 UTC ++++ share/pnp/application/models/auth.php +@@ -116,11 +116,7 @@ class Auth_Model extends System_Model { + $result = $this->queryLivestatus($query); + } + +- if(sizeof($result) > 0){ +- return TRUE; +- }else{ +- return FALSE; +- } ++ return (!empty($result)); + } + + Property changes on: head/net-mgmt/pnp/files/patch-share_pnp_application_models_auth.php ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/pnp/files/patch-share_pnp_application_models_config.php =================================================================== --- head/net-mgmt/pnp/files/patch-share_pnp_application_models_config.php (nonexistent) +++ head/net-mgmt/pnp/files/patch-share_pnp_application_models_config.php (revision 490480) @@ -0,0 +1,11 @@ +--- share/pnp/application/models/config.php.orig 2017-08-21 15:52:37 UTC ++++ share/pnp/application/models/config.php +@@ -68,7 +68,7 @@ class Config_Model extends System_Model + $views = array(); + include ($config_file); + $array_b = $views; +- if(sizeof($views) == 0 ){ ++ if(empty($views)){ + $views = $array_a; + } + } Property changes on: head/net-mgmt/pnp/files/patch-share_pnp_application_models_config.php ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/pnp/files/patch-share_pnp_application_models_data.php =================================================================== --- head/net-mgmt/pnp/files/patch-share_pnp_application_models_data.php (nonexistent) +++ head/net-mgmt/pnp/files/patch-share_pnp_application_models_data.php (revision 490480) @@ -0,0 +1,193 @@ +--- share/pnp/application/models/data.php.orig 2017-08-21 15:52:37 UTC ++++ share/pnp/application/models/data.php +@@ -45,11 +45,11 @@ class Data_Model extends System_Model + } + } + } +- if(sizeof($templates) > 0){ ++ if(empty($templates)){ ++ return FALSE; ++ }else{ + sort($templates); + return $templates; +- }else{ +- return FALSE; + } + } + +@@ -97,7 +97,9 @@ class Data_Model extends System_Model + throw new Kohana_User_Exception('Perfdata Dir', "Can not open $path"); + } + } +- if(sizeof($hosts)>0){ ++ if(empty($hosts)){ ++ throw new Kohana_Exception('error.perfdata-dir-empty', $conf['rrdbase'] ); ++ }else{ + # Obtain a list of columns + foreach ($hosts as $key => $row) { + $sort[$key] = $row['sort']; +@@ -105,8 +107,6 @@ class Data_Model extends System_Model + # Sort the data with volume descending, edition ascending + # Add $data as the last parameter, to sort by the common key + array_multisort($sort, SORT_ASC, $hosts); +- }else{ +- throw new Kohana_Exception('error.perfdata-dir-empty', $conf['rrdbase'] ); + } + return $hosts; + } +@@ -147,7 +147,7 @@ class Data_Model extends System_Model + }else{ + throw new Kohana_Exception('error.perfdata-dir-for-host', $path, $hostname ); + } +- if( is_array($services) && sizeof($services) > 0){ ++ if( is_array($services) && (!empty($services))){ + # Obtain a list of columns + foreach ($services as $key => $row) { + $sort[$key] = $row['name']; +@@ -205,7 +205,7 @@ class Data_Model extends System_Model + $i++; + } + #print Kohana::debug($services); +- if( is_array($services) && sizeof($services) > 0){ ++ if( is_array($services) && (!empty($services))){ + # Obtain a list of columns + foreach ($services as $key => $row) { + $sort[$key] = $row['sort']; +@@ -214,7 +214,7 @@ class Data_Model extends System_Model + # Add $data as the last parameter, to sort by the common key + array_multisort($sort, SORT_STRING, $services); + } +- if(is_array($host) && sizeof($host) > 0 ){ ++ if(is_array($host) && (!empty($host))){ + array_unshift($services, $host[0]); + } + return $services; +@@ -232,7 +232,7 @@ class Data_Model extends System_Model + break; + } + } +- if(sizeof($srv) == 0){ ++ if(empty($srv)){ + throw new Kohana_Exception('error.get-first-service', $hostname ); + } + return $srv['name']; +@@ -250,7 +250,7 @@ class Data_Model extends System_Model + break; + } + } +- if(sizeof($host) == 0){ ++ if(empty($host)){ + throw new Kohana_Exception('error.get-first-host'); + } + return $host['name']; +@@ -693,7 +693,7 @@ class Data_Model extends System_Model + } + + $view=intval( pnp::clean($view) ); +- if($view >= sizeof($this->config->views)){ ++ if($view >= count($this->config->views)){ + $view = 1; + } + +@@ -735,7 +735,7 @@ class Data_Model extends System_Model + $timerange['f_end'] = date($this->config->conf['date_fmt'],$end); + $timerange['cmd'] = " --start $start --end $end "; + $timerange['type'] = "views"; +- for ($i = 0; $i < sizeof($this->config->views); $i++) { ++ for ($i = 0; $i < count($this->config->views); $i++) { + $timerange[$i]['title'] = $this->config->views[$i]['title']; + $timerange[$i]['start'] = $end - $this->config->views[$i]['start']; + $timerange[$i]['f_start'] = date($this->config->conf['date_fmt'],$end - $this->config->views[$i]['start']); +@@ -747,7 +747,7 @@ class Data_Model extends System_Model + } + + public function buildBasketStruct($basket,$view = NULL){ +- if(is_array($basket) && sizeof($basket) > 0){ ++ if(is_array($basket) && (!empty($basket))){ + if($view == ""){ + $views = array_keys($this->config->views); + }else{ +@@ -757,9 +757,9 @@ class Data_Model extends System_Model + foreach($basket as $item){ + # explode host::service::source + $slices = explode("::",$item); +- if(sizeof($slices) == 2) ++ if(count($slices) == 2) + $this->buildDataStruct($slices[0], $slices[1], $view); +- if(sizeof($slices) == 3) ++ if(count($slices) == 3) + $this->buildDataStruct($slices[0], $slices[1], $view, $slices[2]); + } + # break on custom time ranges +@@ -806,12 +806,12 @@ class Data_Model extends System_Model + } + } + #print Kohana::debug($servicelist); +- if(sizeof($servicelist) > 0 ){ ++ if(empty($servicelist)){ ++ $this->ERROR = "ERROR: ". Kohana::lang('error.no-data-for-page', $page.".cfg" ); ++ }else{ + foreach($servicelist as $s){ + $this->buildDataStruct($s['host'],$s['service'],$view,$s['source']); + } +- }else{ +- $this->ERROR = "ERROR: ". Kohana::lang('error.no-data-for-page', $page.".cfg" ); + } + } + +@@ -962,11 +962,11 @@ class Data_Model extends System_Model + die("Cannot open directory: $path"); + } + } +- if(sizeof($pages)>0){ ++ if(empty($pages)){ ++ return FALSE; ++ }else{ + + natsort($pages); +- }else{ +- return FALSE; + } + return $pages; + } +@@ -976,10 +976,10 @@ class Data_Model extends System_Model + */ + public function getFirstPage(){ + $pages = $this->getPages(); +- if(sizeof($pages) > 0 ){ +- return urldecode($pages[0]); +- }else{ ++ if(empty($pages)){ + return FALSE; ++ }else{ ++ return urldecode($pages[0]); + } + } + +@@ -1093,7 +1093,7 @@ class Data_Model extends System_Model + } + } + +- if(sizeof($new_hosts) == 0){ ++ if(empty($new_hosts)){ + throw new Kohana_Exception('error.tpl-no-hosts-found', $hostregex); + } + +@@ -1101,7 +1101,7 @@ class Data_Model extends System_Model + $new_services = array(); + foreach($new_hosts as $host){ + $services = $this->getRawServices($host); +- if(sizeof($services) == 0){ ++ if(empty($services)){ + throw new Kohana_Exception('error.tpl-no-services-found', $serviceregex); + } + foreach($services as $service){ +@@ -1115,7 +1115,7 @@ class Data_Model extends System_Model + } + } + +- if(sizeof($new_services) == 0){ ++ if(empty($new_services)){ + throw new Kohana_Exception('error.tpl-no-services-found', $serviceregex); + } + Property changes on: head/net-mgmt/pnp/files/patch-share_pnp_application_models_data.php ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/pnp/files/patch-share_pnp_application_views_basket__box.php =================================================================== --- head/net-mgmt/pnp/files/patch-share_pnp_application_views_basket__box.php (nonexistent) +++ head/net-mgmt/pnp/files/patch-share_pnp_application_views_basket__box.php (revision 490480) @@ -0,0 +1,20 @@ +--- share/pnp/application/views/basket_box.php.orig 2017-08-21 15:52:37 UTC ++++ share/pnp/application/views/basket_box.php +@@ -6,7 +6,7 @@ echo "
    \n"; + echo "
    \n"; + echo "
    \n"; +-if(is_array($basket) && sizeof($basket) > 0 ){ ++if(is_array($basket) && !empty($basket)){ + foreach($basket as $key=>$item){ + echo "
  • 0 ){ + pnp::shorten($item)."
  • \n"; + } + } +-if(is_array($basket) && sizeof($basket) > 0 ){ ++if(is_array($basket) && !empty($basket)){ + echo "
    \n"; + echo "\n"; + echo "\n"; Property changes on: head/net-mgmt/pnp/files/patch-share_pnp_application_views_basket__box.php ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/pnp/files/patch-share_pnp_templates.dist_pnp-runtime.php =================================================================== --- head/net-mgmt/pnp/files/patch-share_pnp_templates.dist_pnp-runtime.php (nonexistent) +++ head/net-mgmt/pnp/files/patch-share_pnp_templates.dist_pnp-runtime.php (revision 490480) @@ -0,0 +1,11 @@ +--- share/pnp/templates.dist/pnp-runtime.php.orig 2017-08-21 15:52:37 UTC ++++ share/pnp/templates.dist/pnp-runtime.php +@@ -34,7 +34,7 @@ $opt[2] = "--vertical-label \"Counter\" --title \"Numb + # + $ds_name[2] = "Errors and updates"; + $def[2] = ''; +-for($i=2; $i <= sizeof($DS); $i++) { ++for($i=2; $i <= count($DS); $i++) { + $def[2] .= rrd::def("var$i", $RRDFILE[$i], $DS[$i] , "AVERAGE") ; + $def[2] .= rrd::line1("var$i", rrd::color($i), rrd::cut(ucfirst($LABEL[$i]),12) ); + $def[2] .= rrd::gprint("var$i", array('LAST', 'MAX', 'AVERAGE'), "%4.0lf$UNIT[$i]"); Property changes on: head/net-mgmt/pnp/files/patch-share_pnp_templates.dist_pnp-runtime.php ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/pnp-icinga2/Makefile =================================================================== --- head/net-mgmt/pnp-icinga2/Makefile (revision 490479) +++ head/net-mgmt/pnp-icinga2/Makefile (revision 490480) @@ -1,19 +1,19 @@ # $FreeBSD$ -PORTREVISION= 1 +PORTREVISION= 2 PKGNAMESUFFIX= -icinga2 MAINTAINER= lme@FreeBSD.org COMMENT= Icinga2 performance data collector and grapher MASTERDIR= ${.CURDIR}/../pnp RUN_DEPENDS= ${LOCALBASE}/bin/rrdtool:databases/rrdtool \ ${LOCALBASE}/www/icingaweb2/public/index.php:net-mgmt/icingaweb2 NAGIOSDIR?= /var/spool/icinga2 NAGIOSHTMURL?= /icingaweb2 NAGIOSUSER?= icinga NAGIOSGROUP?= icinga .include "${MASTERDIR}/Makefile"