On Fri, March 11, 2016 12:16, Kirill Bychkov wrote:
> On Thu, March 10, 2016 23:22, Vadim Zhukov wrote:
>> 2016-03-09 17:08 GMT+03:00 Kirill Bychkov <ki...@linklevel.net>:
>>> On Thu, March 3, 2016 16:57, Kirill Bychkov wrote:
>>>> Him guys!
>>>> This is a port of PNP4Nagios, an addon for Nafios and Oconga for analyzing
>>>> performance data and storing it in RRD.
>>>> Current port is partially based on an old one from henning@ [1] and tested
>>>> for more than a month with Icinga 1.x processing data from about 400
>>>> hosts.
>>>> It could be splitted to Nagios and Icinga 2.x flavors if there are some
>>>> interest in them and one can test it with.
>>>>
>>>> [1] http://marc.info/?l=openbsd-ports&m=140803165912579&w=2
>>>>
>>>> Comments? OKs?
>>> Objections? :)

ping

>>>
>>> Updated tarball with fixed typos.
>>
>> Here are some more nits:
>>
>> ... in Makefile:
>>
>>> INSTALL_OPTS="-o roog -g bin" \
>>
>> One more tyop. ;)
>>
>>> SYSCONFDIR =            ${BASESYSCONFDIR}/pnp4nagios/
>>> LOCALSTATEDIR =         ${BASELOCALSTATEDIR}/pnp4nagios
>>
>> Why slash is added in one case but not in the other?
>>
>>
>>> # fix broken symlink in tarball
>>
>> If this symlink gets packaged, then it should be relative one, like:
>>
>>         ln -sf ../en_US/dwnld.html \
>>                 ${WRKSRC}/share/pnp/documents/de_DE/dwnld.html
>>
>> ... in patches:
>>
>> At least patch-sample-config_httpd_conf_in needs justification, why it's
>> needed.
>>
>> ... in pkg/README-cgi:
>>
>>> Apache2 configuration for PNP4Nagios is stored under:
>>>     /var/conf/modules.sample/pnp4nagios.conf
>>
>> /var/conf? I suppose this should be ${LOCALSTATEDIR}/apache2/conf, or
>> something like that.
>>
>> ... in pkg/PLIST-main:
>>
>> Is it intended that not all share/example/* stuff has its @sample
>> counterpart under ${SYSCONFDIR}?
>>
>>> share/doc/pkg-readmes/${FULLPKGNAME}
>>> @owner _icinga
>>> @sample ${LOCALSTATEDIR}/
>>> @sample ${LOCALSTATEDIR}/stats/
>>> @sample /var/log/pnp4nagios.log
>>
>> I'm not sure the latter is supposed to work, or won't fail at some
>> point in the future. @sample, when applied to a file, mean "take the
>> file from the line above and copy it here". And you have a non-files
>> line above up to README one. If you want to create an empty file owned
>> by someone, you may either use something like:
>>
>> @exec-add test -e /var/log/pnp4nagios.log || install -o _nagios -g
>> _nagios -m 0640 /dev/null /var/log/pnp4nagios.log
>> @extraunexec test -s /var/log/pnp4nagios || rm -f /var/log/pnp4nagios.log
>>
>> or use /var/log/pnp4nagios/ directory instead, owned by _nagios, where
>> application could create/rename/remove files without problem. I'd
>> recommend go the 2nd way, as we usually do.
>>
>> --
>>   WBR,
>>   Vadim Zhukov
>>
> Updated tarball attached. Also added some extraunexec lines.
> Diff to illustrate changes:
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/www/pnp4nagios/Makefile,v
> retrieving revision 1.8
> diff -u -r1.8 Makefile
> --- Makefile    3 Mar 2016 21:38:50 -0000       1.8
> +++ Makefile    11 Mar 2016 09:14:15 -0000
> @@ -29,10 +29,10 @@
>                         net/icinga/web \
>                         www/pnp4nagios,-main
>
> -FAKE_FLAGS =           INSTALL_OPTS="-o roog -g bin" \
> -                       SYSCONFDIR=${PREFIX}/share/examples/pnp4nagios/
> +FAKE_FLAGS =           INSTALL_OPTS="-o root -g bin" \
> +                       SYSCONFDIR=${PREFIX}/share/examples/pnp4nagios
>
> -SYSCONFDIR =           ${BASESYSCONFDIR}/pnp4nagios/
> +SYSCONFDIR =           ${BASESYSCONFDIR}/pnp4nagios
>  LOCALSTATEDIR =        ${BASELOCALSTATEDIR}/pnp4nagios
>
>  CONFIGURE_STYLE =      gnu
> @@ -41,7 +41,7 @@
>                         --libexecdir=${PREFIX}/libexec/nagios \
>                         --with-perfdata-dir=/var/www/pnp4nagios/rrd \
>                         --with-perfdata-spool-dir=/var/spool/icinga \
> -                       --with-perfdata-logfile=/var/log/pnp4nagios.log
> +
> --with-perfdata-logfile=/var/log/pnp4nagios/pnp4nagios.log
>
>  MULTI_PACKAGES =       -main -cgi
>  PREFIX-cgi =           ${VARBASE}/www
> cvs server: Diffing patches
> Index: patches/patch-sample-config_httpd_conf_in
> ===================================================================
> RCS file:
> /cvs/ports/www/pnp4nagios/patches/patch-sample-config_httpd_conf_in,v
> retrieving revision 1.1
> diff -u -r1.1 patch-sample-config_httpd_conf_in
> --- patches/patch-sample-config_httpd_conf_in   8 Feb 2016 22:31:55 -0000
>  1.1
> +++ patches/patch-sample-config_httpd_conf_in   11 Mar 2016 09:14:15 -0000
> @@ -1,4 +1,7 @@
>  $OpenBSD$
> +
> +Do not block access by default.
> +
>  --- sample-config/httpd.conf.in.orig   Sun Feb  7 15:00:14 2016
>  +++ sample-config/httpd.conf.in        Sun Feb  7 15:02:35 2016
>  @@ -12,7 +12,7 @@ Alias @BASE_URL@ "@datarootdir@"
> cvs server: Diffing pkg
> Index: pkg/PLIST-cgi
> ===================================================================
> RCS file: /cvs/ports/www/pnp4nagios/pkg/PLIST-cgi,v
> retrieving revision 1.4
> diff -u -r1.4 PLIST-cgi
> --- pkg/PLIST-cgi       8 Feb 2016 22:31:55 -0000       1.4
> +++ pkg/PLIST-cgi       11 Mar 2016 09:14:15 -0000
> @@ -1,4 +1,5 @@
>  @comment $OpenBSD$
> +@extraunexec rm -rf %D/pnp4nagios/rrd
>  conf/modules.sample/pnp4nagios.conf.dist
>  @sample conf/modules.sample/pnp4nagios.conf
>  pnp4nagios/
> @@ -236,7 +237,7 @@
>  pnp4nagios/documents/images/smileys/icon_twisted.gif
>  pnp4nagios/documents/images/smileys/icon_wink.gif
>  pnp4nagios/index.php
> -pnp4nagios/install.php
> +@comment pnp4nagios/install.php
>  pnp4nagios/media/
>  pnp4nagios/media/css/
>  pnp4nagios/media/css/autocomplete.css
> Index: pkg/PLIST-main
> ===================================================================
> RCS file: /cvs/ports/www/pnp4nagios/pkg/PLIST-main,v
> retrieving revision 1.6
> diff -u -r1.6 PLIST-main
> --- pkg/PLIST-main      25 Feb 2016 18:51:47 -0000      1.6
> +++ pkg/PLIST-main      11 Mar 2016 09:14:15 -0000
> @@ -1,15 +1,21 @@
>  @comment $OpenBSD$
> +@extraunexec rm -rf /var/log/pnp4nagios
> +@extraunexec rm -rf ${LOCALSTATEDIR}/stats/*
>  @bin bin/npcd
>  share/examples/pnp4nagios/
>  @sample ${SYSCONFDIR}/
>  share/examples/pnp4nagios/background.pdf
> +@sample ${SYSCONFDIR}/background.pdf
>  share/examples/pnp4nagios/check_commands/
>  @sample ${SYSCONFDIR}/check_commands/
>  share/examples/pnp4nagios/check_commands/check_all_local_disks.cfg-sample
> +@sample ${SYSCONFDIR}/check_commands/check_all_local_disks.cfg
>  share/examples/pnp4nagios/check_commands/check_nrpe.cfg-sample
>  @sample ${SYSCONFDIR}/check_commands/check_nrpe.cfg
>  share/examples/pnp4nagios/check_commands/check_nwstat.cfg-sample
> +@sample ${SYSCONFDIR}/check_commands/check_nwstat.cfg
>  share/examples/pnp4nagios/config.d/
> +@sample ${SYSCONFDIR}/config.d/
>  share/examples/pnp4nagios/config.php
>  @sample ${SYSCONFDIR}/config.php
>  @comment share/examples/pnp4nagios/config.php.0.6.25
> @@ -20,7 +26,9 @@
>  share/examples/pnp4nagios/npcd.cfg
>  @sample ${SYSCONFDIR}/npcd.cfg
>  share/examples/pnp4nagios/pages/
> +@sample ${SYSCONFDIR}/pages/
>  share/examples/pnp4nagios/pages/web_traffic.cfg-sample
> +@sample ${SYSCONFDIR}/pages/web_traffic.cfg
>  @comment share/examples/pnp4nagios/pnp4nagios_release
>  share/examples/pnp4nagios/process_perfdata.cfg
>  @sample ${SYSCONFDIR}/process_perfdata.cfg
> @@ -318,4 +326,4 @@
>  @owner _icinga
>  @sample ${LOCALSTATEDIR}/
>  @sample ${LOCALSTATEDIR}/stats/
> -@sample /var/log/pnp4nagios.log
> +@sample /var/log/pnp4nagios/
> Index: pkg/README-cgi
> ===================================================================
> RCS file: /cvs/ports/www/pnp4nagios/pkg/README-cgi,v
> retrieving revision 1.2
> diff -u -r1.2 README-cgi
> --- pkg/README-cgi      25 Feb 2016 18:51:47 -0000      1.2
> +++ pkg/README-cgi      11 Mar 2016 09:14:15 -0000
> @@ -7,7 +7,7 @@
>  Apache2
>  -------
>  Apache2 configuration for PNP4Nagios is stored under:
> -    /var/conf/modules.sample/pnp4nagios.conf
> +    /var/www/conf/modules.sample/pnp4nagios.conf
>
>  It needs to be enabled by running the following command:
>  # ln -s ../modules.sample/pnp4nagios.conf /var/www/conf/modules
> Index: pkg/README-main
> ===================================================================
> RCS file: /cvs/ports/www/pnp4nagios/pkg/README-main,v
> retrieving revision 1.1
> diff -u -r1.1 README-main
> --- pkg/README-main     25 Feb 2016 18:51:47 -0000      1.1
> +++ pkg/README-main     11 Mar 2016 09:14:15 -0000
> @@ -4,7 +4,7 @@
>  | Running ${FULLPKGNAME} on OpenBSD
>  +-----------------------------------------------------------------------
>
> -Log file in /var/log will need to be rotated. Here is a sample line for
> -newsyslog.conf:
> +Log file in /var/log/pnp4nagios will need to be rotated. Here is a sample
> +line for newsyslog.conf:
>
> -/var/log/pnp4nagios.log  _icinga:_icinga   644  7     250  *     Z
> +/var/log/pnp4nagios/pnp4nagios.log _icinga:_icinga 644 7  250  * Z


Reply via email to