Re: [CFT]: net-mgmt/icinga2

2014-06-29 Thread Lars Engels
On Sat, Jun 28, 2014 at 09:49:52PM -0600, Warren Block wrote:
 I've just been setting this up, and had a question and a couple of notes.
 
 Originally, I just installed icinga2.  The icinga2 port does not depend on 
 icinga, but appears to need it.  Is this really a dependency, or are the 
 two ports meant to be separate?

Icinga 2 itself doesn't need a web interface to work. The Icinga 1 port
includes the classic (cgi) web interface which can be used for Icinga 2,
so it's not a hard dependency.
When I find the time I'm going to create a new port for the classic web
interface.

 
 The icinga.conf-sample does not appear to be installed anywhere by the 
 current port.  It can be found in the staging directory,
 stage/usr/local/share/examples/icinga/apache22/.

It's installed by the Icinga 1 port. From pkg-plist:
%%PORTEXAMPLESEXAMPLESDIR%%/apache22/icinga.conf-sample

Maybe you have NO_PORTEXAMPLES set?

 
 The embedded documentation shown is for 1.11, and it's not clear whether 
 the Javascript client for icinga 2 is available, or whether it will make 
 the CGI interface unnecessary.  Actually, given the config file, and both 
 versions installed, the older version might be the one that is running.  I 
 have not experimented with it much yet.

Yes, the classic web interface still links to the Icinga 1 docs. I think
this should be fixed upstream, so I created a bug report.

Apart from the Classic UI there are two other interfaces for Icinga.
Icinga Web and Icinga Web 2.x. The former isn't too good and will be
deprecated eventually.  The latter is much more straight forward but
isn't ready for production yet.

 
 Thank you for your work on this!

Thanks for testing it. :)


pgpSIjRqmLUtj.pgp
Description: PGP signature


Re: [CFT]: net-mgmt/icinga2

2014-06-29 Thread Warren Block

On Sun, 29 Jun 2014, Lars Engels wrote:

On Sat, Jun 28, 2014 at 09:49:52PM -0600, Warren Block wrote:



The icinga.conf-sample does not appear to be installed anywhere by the
current port.  It can be found in the staging directory,
stage/usr/local/share/examples/icinga/apache22/.


It's installed by the Icinga 1 port. From pkg-plist:
%%PORTEXAMPLESEXAMPLESDIR%%/apache22/icinga.conf-sample

Maybe you have NO_PORTEXAMPLES set?


Doh, that's exactly right.  Works as intended. :)

Thanks!
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: [CFT]: net-mgmt/icinga2

2014-06-28 Thread Warren Block

I've just been setting this up, and had a question and a couple of notes.

Originally, I just installed icinga2.  The icinga2 port does not depend on 
icinga, but appears to need it.  Is this really a dependency, or are the 
two ports meant to be separate?


The icinga.conf-sample does not appear to be installed anywhere by the 
current port.  It can be found in the staging directory,

stage/usr/local/share/examples/icinga/apache22/.

The embedded documentation shown is for 1.11, and it's not clear whether 
the Javascript client for icinga 2 is available, or whether it will make 
the CGI interface unnecessary.  Actually, given the config file, and both 
versions installed, the older version might be the one that is running.  I 
have not experimented with it much yet.


Thank you for your work on this!
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: [CFT]: net-mgmt/icinga2

2014-06-19 Thread Marco Steinbach

Lars Engels wrote on 18.06.2014 16:36:

Hey folks,

I proudly present a CFT for the shiny new monitoring software Icinga 2,
a completely rewritten, multi-threaded, flexible and scalable successor
to Icinga 1.
Although it is completely new it still can run with your Icinga / Nagios
plugins and addons.

To use Icinga 2 with the Classic Web interface do the following:

% Download and extract shar file 


# fetch -o /tmp http://bsd-geek.de/FreeBSD/icinga2_1.shar
# cd /usr/ports  sh /tmp/icinga2_1.shar

% Install net-mgmt/icinga2
% Install net-mgmt/icinga 
% Install www/apache22


% Configure Apache and Icinga Classic Web

# cp /usr/local/share/examples/icinga/apache22/icinga.conf-sample 
/usr/local/etc/apache2/Includes/icinga.conf
# cp /usr/local/etc/icinga/cgi.cfg-sample /usr/local/etc/icinga/cgi.cfg

% Make changes to cgi.cfg:

standalone_installation=1
object_cache_file=/var/cache/icinga2/objects.cache
status_file=/var/cache/icinga2/status.dat
command_file=/var/run/icinga2/cmd/icinga2.cmd
log_file=/var/log/icinga2/compat/icinga.log
log_archive_path=/var/log/icinga2/compat/archives

% Create a basic auth file 


# htpasswd -c -s /usr/local/etc/icinga/htpasswd.users icingaadmin
 (enter some password)

% Enable Apache and Icinga 2

# sysrc apache22_enable=YES
# sysrc icinga2_enable=YES

% Enable additional Icinga 2 features

# icinga2-enable-feature checker command compatlog icingastatus livestatus 
mainlog notification statusdata

% Start Apache and Icinga 2

# service apache22 start
# service icinga2 start

% Check /var/log/icinga2/icinga2.log and error.log for any errors
% Browse to http://localhost/icinga
% Log in as icingaadmin

% Read http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc

% (Hopefully) have fun!

Please share your experience with me. :)


# uname -a
FreeBSD jail008.c0c0.intra 9.3-BETA2 FreeBSD 9.3-BETA2 #0 r267346:
# which flex
/usr/bin/flex
# flex --version
flex version 2.5.4

# make
[...]
-- Found FLEX: /usr/bin/flex version 2.5.4 (Required is at least version 
2.5.31)

[...]
[  3%] [FLEX][class_lexer] Building scanner with flex /usr/bin/flex 
version 2.5.4

class_lexer.ll, line 92: unrecognized %option: reentrant
class_lexer.ll, line 93: unrecognized %option: bison-bridge
class_lexer.ll, line 94: unrecognized %option: unistd
*** [tools/mkclass/class_lexer.cc] Error code 1
1 error
*** [tools/mkclass/CMakeFiles/mkclass.dir/all] Error code 2
[  3%] Built target execvpe
1 error
*** [all] Error code 2
1 error


Depending on flex from ports (flex-2.5.39_1) fixes this from me.

.if ${OSVERSION}  133
BUILD_DEPENDS+= flex=2.5.31:${PORTSDIR}/textproc/flex
CMAKE_ARGS+=-DFLEX_EXECUTABLE:STRING=${LOCALBASE}/bin/flex
CXXFLAGS+=  -I${LOCALBASE}/include/flex
.endif

MfG CoCo
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: [CFT]: net-mgmt/icinga2

2014-06-19 Thread Lars Engels
On Thu, Jun 19, 2014 at 03:51:20PM +0200, Marco Steinbach wrote:
 Lars Engels wrote on 18.06.2014 16:36:
  Hey folks,
  
  I proudly present a CFT for the shiny new monitoring software Icinga 2,
  a completely rewritten, multi-threaded, flexible and scalable successor
  to Icinga 1.
  Although it is completely new it still can run with your Icinga / Nagios
  plugins and addons.
  
  To use Icinga 2 with the Classic Web interface do the following:
  
  % Download and extract shar file 
  
  # fetch -o /tmp http://bsd-geek.de/FreeBSD/icinga2_1.shar
  # cd /usr/ports  sh /tmp/icinga2_1.shar
  
  % Install net-mgmt/icinga2
  % Install net-mgmt/icinga 
  % Install www/apache22
  
  % Configure Apache and Icinga Classic Web
  
  # cp /usr/local/share/examples/icinga/apache22/icinga.conf-sample 
  /usr/local/etc/apache2/Includes/icinga.conf
  # cp /usr/local/etc/icinga/cgi.cfg-sample /usr/local/etc/icinga/cgi.cfg
  
  % Make changes to cgi.cfg:
  
  standalone_installation=1
  object_cache_file=/var/cache/icinga2/objects.cache
  status_file=/var/cache/icinga2/status.dat
  command_file=/var/run/icinga2/cmd/icinga2.cmd
  log_file=/var/log/icinga2/compat/icinga.log
  log_archive_path=/var/log/icinga2/compat/archives
  
  % Create a basic auth file 
  
  # htpasswd -c -s /usr/local/etc/icinga/htpasswd.users icingaadmin
   (enter some password)
  
  % Enable Apache and Icinga 2
  
  # sysrc apache22_enable=YES
  # sysrc icinga2_enable=YES
  
  % Enable additional Icinga 2 features
  
  # icinga2-enable-feature checker command compatlog icingastatus livestatus 
  mainlog notification statusdata
  
  % Start Apache and Icinga 2
  
  # service apache22 start
  # service icinga2 start
  
  % Check /var/log/icinga2/icinga2.log and error.log for any errors
  % Browse to http://localhost/icinga
  % Log in as icingaadmin
  
  % Read http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc
  
  % (Hopefully) have fun!
  
  Please share your experience with me. :)
 
 # uname -a
 FreeBSD jail008.c0c0.intra 9.3-BETA2 FreeBSD 9.3-BETA2 #0 r267346:
 # which flex
 /usr/bin/flex
 # flex --version
 flex version 2.5.4
 
 # make
 [...]
 -- Found FLEX: /usr/bin/flex version 2.5.4 (Required is at least version 
 2.5.31)
 [...]
 [  3%] [FLEX][class_lexer] Building scanner with flex /usr/bin/flex 
 version 2.5.4
 class_lexer.ll, line 92: unrecognized %option: reentrant
 class_lexer.ll, line 93: unrecognized %option: bison-bridge
 class_lexer.ll, line 94: unrecognized %option: unistd
 *** [tools/mkclass/class_lexer.cc] Error code 1
 1 error
 *** [tools/mkclass/CMakeFiles/mkclass.dir/all] Error code 2
 [  3%] Built target execvpe
 1 error
 *** [all] Error code 2
 1 error
 
 
 Depending on flex from ports (flex-2.5.39_1) fixes this from me.
 
 .if ${OSVERSION}  133
 BUILD_DEPENDS+= flex=2.5.31:${PORTSDIR}/textproc/flex
 CMAKE_ARGS+=-DFLEX_EXECUTABLE:STRING=${LOCALBASE}/bin/flex
 CXXFLAGS+=  -I${LOCALBASE}/include/flex
 .endif
 
 MfG CoCo
 

Good catch, thanks for this!

I just updated the shar file and also added WWW to pkg-descr.

Lars




pgpeH9GtAjAX4.pgp
Description: PGP signature


Re: [CFT]: net-mgmt/icinga2

2014-06-19 Thread Marco Steinbach

Lars Engels wrote on 19.06.2014 16:08:

On Thu, Jun 19, 2014 at 03:51:20PM +0200, Marco Steinbach wrote:

Lars Engels wrote on 18.06.2014 16:36:

Hey folks,


[Icinga2 port, patch]



Good catch, thanks for this!

I just updated the shar file and also added WWW to pkg-descr.



This patch tries to make Icinga2 only link to what database client the 
user selected, instead of linking to whatever database client cmake 
stumbles over in addition to the users selection.


MfG CoCo

diff -Naur net-mgmt.orig/icinga2/Makefile net-mgmt/icinga2/Makefile
--- net-mgmt.orig/icinga2/Makefile  2014-06-19 14:12:45.0 +
+++ net-mgmt/icinga2/Makefile   2014-06-19 14:11:14.0 +
@@ -25,6 +25,9 @@
 
 OPTIONS_DEFAULT=   MYSQL
 
+MYSQL_CMAKE_ON= -DWITH_MYSQL:BOOL=true
+PGSQL_CMAKE_ON= -DWITH_PGSQL:BOOL=true
+
 ICINGA2USER?=  icinga
 ICINGA2GROUP?= icinga
 USERS= ${ICINGA2USER}
diff -Naur net-mgmt.orig/icinga2/files/patch-CMakeLists.txt 
net-mgmt/icinga2/files/patch-CMakeLists.txt
--- net-mgmt.orig/icinga2/files/patch-CMakeLists.txt1970-01-01 
00:00:00.0 +
+++ net-mgmt/icinga2/files/patch-CMakeLists.txt 2014-06-16 23:21:34.0 
+
@@ -0,0 +1,12 @@
+--- CMakeLists.txt.orig2014-06-16 23:18:51.0 +
 CMakeLists.txt 2014-06-16 23:19:01.0 +
+@@ -27,6 +27,9 @@
+   FORCE)
+ endif()
+ 
++option(WITH_MYSQL MySQL support OFF)
++option(WITH_PGSQL PostgreSQL support OFF)
++
+ file(STRINGS icinga2.spec VERSION_LINE REGEX ^Version: )
+ string(REPLACE Version:   ICINGA2_VERSION ${VERSION_LINE})
+ 
diff -Naur net-mgmt.orig/icinga2/files/patch-components__CMakeLists.txt 
net-mgmt/icinga2/files/patch-components__CMakeLists.txt
--- net-mgmt.orig/icinga2/files/patch-components__CMakeLists.txt
1970-01-01 00:00:00.0 +
+++ net-mgmt/icinga2/files/patch-components__CMakeLists.txt 2014-06-16 
23:21:47.0 +
@@ -0,0 +1,19 @@
+--- components/CMakeLists.txt.orig 2014-06-16 23:20:12.0 +
 components/CMakeLists.txt  2014-06-16 23:20:18.0 +
+@@ -1,7 +1,14 @@
+ add_subdirectory(checker)
+ add_subdirectory(compat)
+-add_subdirectory(db_ido_mysql)
+-add_subdirectory(db_ido_pgsql)
++
++if(WITH_MYSQL)
++  add_subdirectory(db_ido_mysql)
++endif()
++
++if(WITH_PGSQL)
++  add_subdirectory(db_ido_pgsql)
++endif()
++
+ add_subdirectory(demo)
+ add_subdirectory(livestatus)
+ add_subdirectory(notification)
diff -Naur 
net-mgmt.orig/icinga2/files/patch-components__db_ido_mysql__CMakeLists.txt 
net-mgmt/icinga2/files/patch-components__db_ido_mysql__CMakeLists.txt
--- net-mgmt.orig/icinga2/files/patch-components__db_ido_mysql__CMakeLists.txt  
1970-01-01 00:00:00.0 +
+++ net-mgmt/icinga2/files/patch-components__db_ido_mysql__CMakeLists.txt   
2014-06-16 23:33:59.0 +
@@ -0,0 +1,9 @@
+--- components/db_ido_mysql/CMakeLists.txt.orig2014-06-16 
23:31:26.0 +
 components/db_ido_mysql/CMakeLists.txt 2014-06-16 23:31:37.0 
+
+@@ -38,4 +38,6 @@
+   RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
+   LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
+ )
++else()
++message( FATAL_ERROR You have selected MySQL support, but MySQL could 
not be found. )
+ endif()
diff -Naur 
net-mgmt.orig/icinga2/files/patch-components__db_ido_pgsql__CMakeLists.txt 
net-mgmt/icinga2/files/patch-components__db_ido_pgsql__CMakeLists.txt
--- net-mgmt.orig/icinga2/files/patch-components__db_ido_pgsql__CMakeLists.txt  
1970-01-01 00:00:00.0 +
+++ net-mgmt/icinga2/files/patch-components__db_ido_pgsql__CMakeLists.txt   
2014-06-16 23:34:55.0 +
@@ -0,0 +1,9 @@
+--- components/db_ido_pgsql/CMakeLists.txt.orig2014-06-16 
23:27:15.0 +
 components/db_ido_pgsql/CMakeLists.txt 2014-06-16 23:29:03.0 
+
+@@ -40,4 +40,6 @@
+   RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
+   LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
+ )
++else()
++message( FATAL_ERROR You have selected PostgreSQL support, but 
PostgreSQL could not be found. )
+ endif()
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org

Re: [CFT]: net-mgmt/icinga2

2014-06-19 Thread Lars Engels
On Thu, Jun 19, 2014 at 05:27:29PM +0200, Marco Steinbach wrote:
 Lars Engels wrote on 19.06.2014 16:08:
  On Thu, Jun 19, 2014 at 03:51:20PM +0200, Marco Steinbach wrote:
  Lars Engels wrote on 18.06.2014 16:36:
  Hey folks,
 
 [Icinga2 port, patch]
 
  
  Good catch, thanks for this!
  
  I just updated the shar file and also added WWW to pkg-descr.
  
 
 This patch tries to make Icinga2 only link to what database client the 
 user selected, instead of linking to whatever database client cmake 
 stumbles over in addition to the users selection.
 
 MfG CoCo
 

Perfect, thank you! I'll try to get this patch upstream.
Meanwhile I updated the sharfile.


pgpyiEpuGyv5D.pgp
Description: PGP signature


[CFT]: net-mgmt/icinga2

2014-06-18 Thread Lars Engels
Hey folks,

I proudly present a CFT for the shiny new monitoring software Icinga 2,
a completely rewritten, multi-threaded, flexible and scalable successor
to Icinga 1.
Although it is completely new it still can run with your Icinga / Nagios
plugins and addons.

To use Icinga 2 with the Classic Web interface do the following:

% Download and extract shar file 

# fetch -o /tmp http://bsd-geek.de/FreeBSD/icinga2_1.shar
# cd /usr/ports  sh /tmp/icinga2_1.shar

% Install net-mgmt/icinga2
% Install net-mgmt/icinga 
% Install www/apache22

% Configure Apache and Icinga Classic Web

# cp /usr/local/share/examples/icinga/apache22/icinga.conf-sample 
/usr/local/etc/apache2/Includes/icinga.conf
# cp /usr/local/etc/icinga/cgi.cfg-sample /usr/local/etc/icinga/cgi.cfg

% Make changes to cgi.cfg:

standalone_installation=1
object_cache_file=/var/cache/icinga2/objects.cache
status_file=/var/cache/icinga2/status.dat
command_file=/var/run/icinga2/cmd/icinga2.cmd
log_file=/var/log/icinga2/compat/icinga.log
log_archive_path=/var/log/icinga2/compat/archives

% Create a basic auth file 

# htpasswd -c -s /usr/local/etc/icinga/htpasswd.users icingaadmin
 (enter some password)

% Enable Apache and Icinga 2

# sysrc apache22_enable=YES
# sysrc icinga2_enable=YES

% Enable additional Icinga 2 features

# icinga2-enable-feature checker command compatlog icingastatus livestatus 
mainlog notification statusdata

% Start Apache and Icinga 2

# service apache22 start
# service icinga2 start

% Check /var/log/icinga2/icinga2.log and error.log for any errors
% Browse to http://localhost/icinga
% Log in as icingaadmin

% Read http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc

% (Hopefully) have fun!

Please share your experience with me. :)


Lars


pgpX0JR7eLs6z.pgp
Description: PGP signature


Re: [CFT]: net-mgmt/icinga2

2014-06-18 Thread Kurt Jaeger
Hi!

 I proudly present a CFT for the shiny new monitoring software Icinga 2,
 a completely rewritten, multi-threaded, flexible and scalable successor
 to Icinga 1.

Thanks. The port builds, and I'm currently preparing a test server
for it.

 Although it is completely new it still can run with your Icinga / Nagios
 plugins and addons.
 
 To use Icinga 2 with the Classic Web interface do the following:

Is it able to run standalone, without net-mgmt/icinga ?
Or is that not recommended ?

-- 
p...@opsec.eu+49 171 3101372 6 years to go !
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: [CFT]: net-mgmt/icinga2

2014-06-18 Thread Kurt Jaeger
Hi!

  Although it is completely new it still can run with your Icinga / Nagios
  plugins and addons.
  
  To use Icinga 2 with the Classic Web interface do the following:
 
 Is it able to run standalone, without net-mgmt/icinga ?
 Or is that not recommended ?

The reason I'm asking: The is a new deployment and I want to
start without legacy setups from the start.

-- 
p...@opsec.eu+49 171 3101372 6 years to go !
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: [CFT]: net-mgmt/icinga2

2014-06-18 Thread Lars Engels
On Wed, Jun 18, 2014 at 09:10:46PM +0200, Kurt Jaeger wrote:
 Hi!
 
   Although it is completely new it still can run with your Icinga / Nagios
   plugins and addons.
   
   To use Icinga 2 with the Classic Web interface do the following:
  
  Is it able to run standalone, without net-mgmt/icinga ?
  Or is that not recommended ?
 
 The reason I'm asking: The is a new deployment and I want to
 start without legacy setups from the start.

Icinga 2 doesn't depend on Icinga 1 but the net-mgmt/icinga port
includes the Classic Web interface. I plan to separate it, so you don't
need the icinga1 port. But it doesn't hurt, both ports do not conflict
with each other.


pgpv9yvyoQBFF.pgp
Description: PGP signature


Re: [CFT]: net-mgmt/icinga2

2014-06-18 Thread Lars Engels
On Wed, Jun 18, 2014 at 09:36:09PM +0200, Lars Engels wrote:
 On Wed, Jun 18, 2014 at 09:10:46PM +0200, Kurt Jaeger wrote:
  Hi!
  
Although it is completely new it still can run with your Icinga / Nagios
plugins and addons.

To use Icinga 2 with the Classic Web interface do the following:
   
   Is it able to run standalone, without net-mgmt/icinga ?
   Or is that not recommended ?
  
  The reason I'm asking: The is a new deployment and I want to
  start without legacy setups from the start.
 
 Icinga 2 doesn't depend on Icinga 1 but the net-mgmt/icinga port
 includes the Classic Web interface. I plan to separate it, so you don't
 need the icinga1 port. But it doesn't hurt, both ports do not conflict
 with each other.

To ease a migration from 1.x to 2, there's a migration script:

https://github.com/Icinga/icinga2-migration

But I haven't tried this one, yet.


pgpEMoZFiQMAN.pgp
Description: PGP signature