update to Icinga 2 v2.4.0, featuring a new RESTful API using basic auth

or client certificates for:

- filters, types, permissions
- query/create/modify/delete config objects at runtime
- status queries for global stats
- actions (e.g. acknowledge all service problems)
- event streams
This commit is contained in:
sthen 2015-11-16 20:29:55 +00:00
parent 237839b254
commit 7bd6d99f2d
18 changed files with 101 additions and 313 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.42 2015/11/16 12:51:42 sthen Exp $
# $OpenBSD: Makefile,v 1.43 2015/11/16 20:29:55 sthen Exp $
BROKEN-hppa = needs 64-bit atomic ops; __sync_add_and_fetch_4
SHARED_ONLY = Yes
@ -7,9 +7,7 @@ COMMENT-main = network monitoring system
COMMENT-mysql = MySQL support for icinga2
COMMENT-pgsql = PostgreSQL support for icinga2
V = 2.3.11
REVISION = 1
REVISION-main = 6
V = 2.4.0
EPOCH = 0
GH_ACCOUNT = Icinga
GH_PROJECT = icinga2
@ -43,7 +41,7 @@ BUILD_DEPENDS = devel/bison \
MULTI_PACKAGES = -main -mysql -pgsql
WANTLIB-main += ${WANTLIB} c
WANTLIB-main += ${WANTLIB} c edit termcap
LIB_DEPENDS-main = devel/boost \
devel/libexecinfo \
devel/libyajl

View File

@ -1,2 +1,2 @@
SHA256 (icinga2-2.3.11.tar.gz) = tJnEa5Nx4ARgMCJvYbmwVrwW43E48xjIjNndK07fMVI=
SIZE (icinga2-2.3.11.tar.gz) = 843985
SHA256 (icinga2-2.4.0.tar.gz) = ko1r+2QHjtTYIjpLPbZ+6Nj7nQBlpDoQZCtigYHFJgU=
SIZE (icinga2-2.4.0.tar.gz) = 1338579

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-CMakeLists_txt,v 1.5 2015/05/12 09:37:03 sthen Exp $
$OpenBSD: patch-CMakeLists_txt,v 1.6 2015/11/16 20:29:55 sthen Exp $
use FindBacktrace.cmake (added in cmake 3)
--- CMakeLists.txt.orig Thu Mar 12 12:27:11 2015
+++ CMakeLists.txt Thu Mar 12 15:04:13 2015
@@ -179,15 +179,14 @@ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DI2_D
--- CMakeLists.txt.orig Mon Nov 16 09:57:03 2015
+++ CMakeLists.txt Mon Nov 16 17:00:02 2015
@@ -188,15 +188,14 @@ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DI2_D
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DI2_DEBUG")
check_function_exists(vfork HAVE_VFORK)
@ -22,4 +22,4 @@ use FindBacktrace.cmake (added in cmake 3)
+ include_directories(${Backtrace_INCLUDE_DIRS})
endif()
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h ESCAPE_QUOTES)
if(UNIX)

View File

@ -1,9 +1,21 @@
$OpenBSD: patch-config_h_cmake,v 1.4 2015/05/12 09:37:03 sthen Exp $
--- config.h.cmake.orig Mon Apr 20 10:44:20 2015
+++ config.h.cmake Mon Apr 20 16:11:52 2015
@@ -2,18 +2,17 @@
$OpenBSD: patch-config_h_cmake,v 1.5 2015/11/16 20:29:55 sthen Exp $
- use cmake's "find_package(Backtrace)" from FindBacktrace.cmake.
this covers the case of BSDs where the symbols are in libexecinfo.so
not in libc.
- compiled-in ICINGA_SYSCONFDIR needs to be the standard one (/etc),
but cmake should install files to an examples directory in our staging
dir (${PREFIX}/share/examples/icinga2), package tools copy them under
/etc at install time.
--- config.h.cmake.orig Mon Nov 16 09:57:03 2015
+++ config.h.cmake Mon Nov 16 17:04:21 2015
@@ -1,12 +1,11 @@
#ifndef CONFIG_H
#define CONFIG_H
+#cmakedefine01 Backtrace_FOUND
#cmakedefine HAVE_COUNTER_MACRO
-#cmakedefine HAVE_BACKTRACE_SYMBOLS
#cmakedefine HAVE_PIPE2
@ -12,8 +24,8 @@ $OpenBSD: patch-config_h_cmake,v 1.4 2015/05/12 09:37:03 sthen Exp $
-#cmakedefine HAVE_LIBEXECINFO
#cmakedefine HAVE_CXXABI_H
#cmakedefine HAVE_NICE
+#cmakedefine01 Backtrace_FOUND
#cmakedefine HAVE_EDITLINE
@@ -14,7 +13,7 @@
#cmakedefine ICINGA2_UNITY_BUILD
#define ICINGA_PREFIX "${CMAKE_INSTALL_PREFIX}"

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-etc_icinga2_conf_d_services_conf,v 1.2 2015/05/12 09:37:03 sthen Exp $
--- etc/icinga2/conf.d/services.conf.orig Thu Mar 12 12:27:11 2015
+++ etc/icinga2/conf.d/services.conf Thu Mar 12 15:09:03 2015
$OpenBSD: patch-etc_icinga2_conf_d_services_conf,v 1.3 2015/11/16 20:29:55 sthen Exp $
--- etc/icinga2/conf.d/services.conf.orig Mon Nov 16 09:57:03 2015
+++ etc/icinga2/conf.d/services.conf Mon Nov 16 17:02:41 2015
@@ -42,14 +42,14 @@ apply Service "ping6" {
/*
* Apply the `ssh` service to all hosts
@ -14,7 +14,7 @@ $OpenBSD: patch-etc_icinga2_conf_d_services_conf,v 1.2 2015/05/12 09:37:03 sthen
check_command = "ssh"
- assign where (host.address || host.address6) && host.vars.os == "Linux"
+ assign where (host.address || host.address6) && (host.vars.os == "OpenBSD" || host.vars.os == "Linux")
ignore where host.name == "localhost" /* for upgrade safety */
+ assign where (host.address || host.address6) && (host.vars.os == "Linux" || host.vars.os == "OpenBSD")
}

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-lib_base_CMakeLists_txt,v 1.4 2015/05/12 09:37:03 sthen Exp $
--- lib/base/CMakeLists.txt.orig Thu Mar 12 12:27:11 2015
+++ lib/base/CMakeLists.txt Thu Mar 12 15:04:13 2015
@@ -45,8 +45,8 @@ add_library(base SHARED ${base_SOURCES})
$OpenBSD: patch-lib_base_CMakeLists_txt,v 1.5 2015/11/16 20:29:55 sthen Exp $
--- lib/base/CMakeLists.txt.orig Mon Nov 16 09:57:03 2015
+++ lib/base/CMakeLists.txt Mon Nov 16 17:00:02 2015
@@ -49,8 +49,8 @@ add_library(base SHARED ${base_SOURCES})
target_link_libraries(base ${CMAKE_DL_LIBS} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${YAJL_LIBRARIES} mmatch socketpair)

View File

@ -1,25 +0,0 @@
$OpenBSD: patch-lib_base_application_cpp,v 1.3 2015/10/21 09:03:22 sthen Exp $
From e93dd3cf15dab8c63d6510334b1b27b1e208f83a Mon Sep 17 00:00:00 2001
From: Gunnar Beutner <gunnar@beutner.name>
Date: Wed, 21 Oct 2015 07:02:49 +0200
Subject: [PATCH] Ensure that the main thread pool gets re-initialized properly
after fork()
refs #10410
---
lib/base/application.cpp | 2 +-
lib/base/threadpool.cpp | 12 ++++++++++--
2 files changed, 11 insertions(+), 3 deletions(-)
--- lib/base/application.cpp.orig Wed Oct 21 09:23:05 2015
+++ lib/base/application.cpp Wed Oct 21 09:23:28 2015
@@ -142,7 +142,7 @@ void Application::InitializeBase(void)
Utility::ExecuteDeferredInitializers();
/* make sure the thread pool gets initialized */
- GetTP();
+ GetTP().Start();
Timer::Initialize();
}

View File

@ -1,56 +0,0 @@
$OpenBSD: patch-lib_base_threadpool_cpp,v 1.1 2015/10/21 09:03:22 sthen Exp $
From e93dd3cf15dab8c63d6510334b1b27b1e208f83a Mon Sep 17 00:00:00 2001
From: Gunnar Beutner <gunnar@beutner.name>
Date: Wed, 21 Oct 2015 07:02:49 +0200
Subject: [PATCH] Ensure that the main thread pool gets re-initialized properly
after fork()
refs #10410
---
lib/base/application.cpp | 2 +-
lib/base/threadpool.cpp | 12 ++++++++++--
2 files changed, 11 insertions(+), 3 deletions(-)
--- lib/base/threadpool.cpp.orig Mon Oct 19 10:14:40 2015
+++ lib/base/threadpool.cpp Wed Oct 21 09:23:30 2015
@@ -31,7 +31,7 @@ using namespace icinga;
int ThreadPool::m_NextID = 1;
ThreadPool::ThreadPool(size_t max_threads)
- : m_ID(m_NextID++), m_MaxThreads(max_threads), m_Stopped(false)
+ : m_ID(m_NextID++), m_MaxThreads(max_threads), m_Stopped(true)
{
if (m_MaxThreads != UINT_MAX && m_MaxThreads < sizeof(m_Queues) / sizeof(m_Queues[0]))
m_MaxThreads = sizeof(m_Queues) / sizeof(m_Queues[0]);
@@ -46,6 +46,11 @@ ThreadPool::~ThreadPool(void)
void ThreadPool::Start(void)
{
+ if (!m_Stopped)
+ return;
+
+ m_Stopped = false;
+
for (size_t i = 0; i < sizeof(m_Queues) / sizeof(m_Queues[0]); i++)
m_Queues[i].SpawnWorker(m_ThreadGroup);
@@ -54,6 +59,9 @@ void ThreadPool::Start(void)
void ThreadPool::Stop(void)
{
+ if (m_Stopped)
+ return;
+
{
boost::mutex::scoped_lock lock(m_MgmtMutex);
m_Stopped = true;
@@ -76,7 +84,7 @@ void ThreadPool::Stop(void)
for (size_t i = 0; i < sizeof(m_Queues) / sizeof(m_Queues[0]); i++)
m_Queues[i].Stopped = false;
- m_Stopped = false;
+ m_Stopped = true;
}
/**

View File

@ -1,75 +0,0 @@
$OpenBSD: patch-lib_base_utility_cpp,v 1.1 2015/11/09 22:36:38 sthen Exp $
commit 9ea51aa86edac407411376d2ed18a494368b9e31
Author: Gunnar Beutner <gunnar@beutner.name>
Date: Mon Nov 9 20:39:26 2015 +0100
Use non-blocking open() for the command pipe
fixes #10410
--- lib/base/utility.cpp.orig Mon Oct 19 10:14:40 2015
+++ lib/base/utility.cpp Mon Nov 9 21:42:01 2015
@@ -844,7 +844,7 @@ bool Utility::SetFileOwnership(const String& file, con
}
#ifndef _WIN32
-void Utility::SetNonBlocking(int fd)
+void Utility::SetNonBlocking(int fd, bool nb)
{
int flags = fcntl(fd, F_GETFL, 0);
@@ -854,14 +854,19 @@ void Utility::SetNonBlocking(int fd)
<< boost::errinfo_errno(errno));
}
- if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) {
+ if (nb)
+ flags |= O_NONBLOCK;
+ else
+ flags &= ~O_NONBLOCK;
+
+ if (fcntl(fd, F_SETFL, flags) < 0) {
BOOST_THROW_EXCEPTION(posix_error()
<< boost::errinfo_api_function("fcntl")
<< boost::errinfo_errno(errno));
}
}
-void Utility::SetCloExec(int fd)
+void Utility::SetCloExec(int fd, bool cloexec)
{
int flags = fcntl(fd, F_GETFD, 0);
@@ -871,7 +876,12 @@ void Utility::SetCloExec(int fd)
<< boost::errinfo_errno(errno));
}
- if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) {
+ if (cloexec)
+ flags |= FD_CLOEXEC;
+ else
+ flags &= ~FD_CLOEXEC;
+
+ if (fcntl(fd, F_SETFD, flags) < 0) {
BOOST_THROW_EXCEPTION(posix_error()
<< boost::errinfo_api_function("fcntl")
<< boost::errinfo_errno(errno));
@@ -879,13 +889,13 @@ void Utility::SetCloExec(int fd)
}
#endif /* _WIN32 */
-void Utility::SetNonBlockingSocket(SOCKET s)
+void Utility::SetNonBlockingSocket(SOCKET s, bool nb)
{
#ifndef _WIN32
- SetNonBlocking(s);
+ SetNonBlocking(s, nb);
#else /* _WIN32 */
- unsigned long lTrue = 1;
- ioctlsocket(s, FIONBIO, &lTrue);
+ unsigned long lflag = nb;
+ ioctlsocket(s, FIONBIO, &lflag);
#endif /* _WIN32 */
}

View File

@ -1,27 +0,0 @@
$OpenBSD: patch-lib_base_utility_hpp,v 1.1 2015/11/09 22:36:38 sthen Exp $
commit 9ea51aa86edac407411376d2ed18a494368b9e31
Author: Gunnar Beutner <gunnar@beutner.name>
Date: Mon Nov 9 20:39:26 2015 +0100
Use non-blocking open() for the command pipe
fixes #10410
--- lib/base/utility.hpp.orig Mon Oct 19 10:14:40 2015
+++ lib/base/utility.hpp Mon Nov 9 21:42:01 2015
@@ -101,11 +101,11 @@ class I2_BASE_API Utility (public)
static void ExecuteDeferredInitializers(void);
#ifndef _WIN32
- static void SetNonBlocking(int fd);
- static void SetCloExec(int fd);
+ static void SetNonBlocking(int fd, bool nb = true);
+ static void SetCloExec(int fd, bool cloexec = true);
#endif /* _WIN32 */
- static void SetNonBlockingSocket(SOCKET s);
+ static void SetNonBlockingSocket(SOCKET s, bool nb = true);
static String EscapeShellCmd(const String& s);
static String EscapeShellArg(const String& s);

View File

@ -1,29 +0,0 @@
$OpenBSD: patch-lib_cli_daemoncommand_cpp,v 1.3 2015/10/21 09:03:22 sthen Exp $
From 3c6f0e31d9177bf0736ad247df0bb3bf0696e969 Mon Sep 17 00:00:00 2001
From: Gunnar Beutner <gunnar@beutner.name>
Date: Tue, 20 Oct 2015 22:55:16 +0200
Subject: [PATCH] Make sure the timer thread is gone when calling fork()
refs #10410
--- lib/cli/daemoncommand.cpp.orig Tue Oct 20 22:13:39 2015
+++ lib/cli/daemoncommand.cpp Tue Oct 20 22:14:21 2015
@@ -70,7 +70,7 @@ static void SigHupHandler(int)
static bool Daemonize(void)
{
#ifndef _WIN32
- Application::GetTP().Stop();
+ Application::UninitializeBase();
pid_t pid = fork();
if (pid == -1) {
@@ -103,7 +103,7 @@ static bool Daemonize(void)
_exit(EXIT_SUCCESS);
}
- Application::GetTP().Start();
+ Application::InitializeBase();
#endif /* _WIN32 */
return true;

View File

@ -1,33 +0,0 @@
$OpenBSD: patch-lib_compat_externalcommandlistener_cpp,v 1.1 2015/11/09 22:36:38 sthen Exp $
commit 9ea51aa86edac407411376d2ed18a494368b9e31
Author: Gunnar Beutner <gunnar@beutner.name>
Date: Mon Nov 9 20:39:26 2015 +0100
Use non-blocking open() for the command pipe
fixes #10410
--- lib/compat/externalcommandlistener.cpp.orig Mon Oct 19 10:14:40 2015
+++ lib/compat/externalcommandlistener.cpp Mon Nov 9 21:42:01 2015
@@ -93,17 +93,15 @@ void ExternalCommandListener::CommandPipeThread(const
}
for (;;) {
- int fd;
+ int fd = open(commandPath.CStr(), O_RDONLY | O_NONBLOCK);
- do {
- fd = open(commandPath.CStr(), O_RDONLY);
- } while (fd < 0 && errno == EINTR);
-
if (fd < 0) {
Log(LogCritical, "ExternalCommandListener")
<< "open() for fifo path '" << commandPath << "' failed with error code " << errno << ", \"" << Utility::FormatErrorNumber(errno) << "\"";
return;
}
+
+ Utility::SetNonBlocking(fd, false);
FILE *fp = fdopen(fd, "r");

View File

@ -1,13 +1,17 @@
Icinga monitors network resources such as servers, routers, switches,
applications and services and notifies administrators or responsible
persons.
Icinga 2 is an open source monitoring system which checks the
availability of your network resources, notifies users of outages,
and generates performance data for reporting.
Icinga 2 is a parallel development branch to Icinga 1. Written from
scratch, it builds on the success of Icinga 1 and deals with shortcomings
inherited from Nagios as a fork.
Scalable and extensible, Icinga 2 can monitor large, complex
environments across multiple locations.
* Easy to install with soft link activation of functions and packages
* Multithreaded and very fast: Capable of thousands of checks per second
* Intuitive to configure, using new object-based, template-driven format
* Easy to extend with native support for Livestatus and Graphite
* Cluster-enabled for distributed monitoring out of the box
* object-based, rule-driven configuration format, offering user-friendly
features such as "apply" rules for dynamic object generation.
* native support for Graphite, transmitting performance data directly
via TCP socket connection.
* REST API allowing access to objects and attributes and creation of
objects at runtime (without restart).
* clustering support for high-availability and distributed monitoring.

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-main,v 1.15 2015/11/16 12:51:42 sthen Exp $
@comment $OpenBSD: PLIST-main,v 1.16 2015/11/16 20:29:55 sthen Exp $
@newgroup _icinga:667
@newgroup _icingaweb2:762
@newuser _icinga:667:_icinga:daemon:Icinga user:/var/icinga:/sbin/nologin
@ -22,8 +22,10 @@ lib/icinga2/libnotification.so
lib/icinga2/libperfdata.so
lib/icinga2/libremote.so
lib/icinga2/libsocketpair.so
lib/icinga2/sbin/
@bin lib/icinga2/sbin/icinga2
@man man/man8/icinga2.8
@bin sbin/icinga2
sbin/icinga2
share/doc/icinga2/
share/doc/icinga2/AUTHORS
share/doc/icinga2/COPYING
@ -33,34 +35,41 @@ share/doc/icinga2/NEWS
share/doc/icinga2/README.md
share/doc/icinga2/markdown/
share/doc/icinga2/markdown/1-about.md
share/doc/icinga2/markdown/10-icinga2-client.md
share/doc/icinga2/markdown/11-agent-based-checks.md
share/doc/icinga2/markdown/12-distributed-monitoring-ha.md
share/doc/icinga2/markdown/13-addons-plugins.md
share/doc/icinga2/markdown/14-alternative-frontends.md
share/doc/icinga2/markdown/15-livestatus.md
share/doc/icinga2/markdown/10-monitoring-remote-systems.md
share/doc/icinga2/markdown/11-icinga2-client.md
share/doc/icinga2/markdown/12-agent-based-checks.md
share/doc/icinga2/markdown/13-distributed-monitoring-ha.md
share/doc/icinga2/markdown/14-addons-plugins.md
share/doc/icinga2/markdown/15-features.md
share/doc/icinga2/markdown/16-troubleshooting.md
share/doc/icinga2/markdown/17-upgrading-icinga-2.md
share/doc/icinga2/markdown/18-migrating-from-icinga-1x.md
share/doc/icinga2/markdown/19-language-reference.md
share/doc/icinga2/markdown/18-language-reference.md
share/doc/icinga2/markdown/19-library-reference.md
share/doc/icinga2/markdown/2-getting-started.md
share/doc/icinga2/markdown/20-library-reference.md
share/doc/icinga2/markdown/21-debug.md
share/doc/icinga2/markdown/22-appendix.md
share/doc/icinga2/markdown/20-script-debugger.md
share/doc/icinga2/markdown/21-development.md
share/doc/icinga2/markdown/22-migrating-from-icinga-1x.md
share/doc/icinga2/markdown/23-appendix.md
share/doc/icinga2/markdown/3-monitoring-basics.md
share/doc/icinga2/markdown/4-configuring-icinga-2.md
share/doc/icinga2/markdown/5-advanced-topics.md
share/doc/icinga2/markdown/6-object-types.md
share/doc/icinga2/markdown/7-icinga-template-library.md
share/doc/icinga2/markdown/8-cli-commands.md
share/doc/icinga2/markdown/9-monitoring-remote-systems.md
share/doc/icinga2/markdown/9-icinga2-api.md
share/doc/pkg-readmes/${FULLPKGNAME}
share/examples/bash_completion.d/
share/examples/bash_completion.d/icinga2
share/examples/icinga2/
@mode 750
@group _icinga
@sample ${SYSCONFDIR}/icinga2/
@group
@mode
share/examples/icinga2/conf.d/
@sample ${SYSCONFDIR}/icinga2/conf.d/
share/examples/icinga2/conf.d/app.conf
@sample ${SYSCONFDIR}/icinga2/conf.d/app.conf
share/examples/icinga2/conf.d/commands.conf
@sample ${SYSCONFDIR}/icinga2/conf.d/commands.conf
share/examples/icinga2/conf.d/downtimes.conf

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-mysql,v 1.4 2015/05/12 09:37:03 sthen Exp $
@comment $OpenBSD: PLIST-mysql,v 1.5 2015/11/16 20:29:55 sthen Exp $
@conflict icinga2-<2.2.4v0
lib/icinga2/libdb_ido_mysql.so
share/examples/icinga2/features-available/ido-mysql.conf
@ -11,3 +11,4 @@ share/icinga2-ido-mysql/schema/upgrade/2.0.2.sql
share/icinga2-ido-mysql/schema/upgrade/2.1.0.sql
share/icinga2-ido-mysql/schema/upgrade/2.2.0.sql
share/icinga2-ido-mysql/schema/upgrade/2.3.0.sql
share/icinga2-ido-mysql/schema/upgrade/2.4.0.sql

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-pgsql,v 1.4 2015/05/12 09:37:03 sthen Exp $
@comment $OpenBSD: PLIST-pgsql,v 1.5 2015/11/16 20:29:55 sthen Exp $
@conflict icinga2-<2.2.4v0
lib/icinga2/libdb_ido_pgsql.so
share/examples/icinga2/features-available/ido-pgsql.conf
@ -11,3 +11,4 @@ share/icinga2-ido-pgsql/schema/upgrade/2.0.2.sql
share/icinga2-ido-pgsql/schema/upgrade/2.1.0.sql
share/icinga2-ido-pgsql/schema/upgrade/2.2.0.sql
share/icinga2-ido-pgsql/schema/upgrade/2.3.0.sql
share/icinga2-ido-pgsql/schema/upgrade/2.4.0.sql

View File

@ -1,11 +1,11 @@
$OpenBSD: README-main,v 1.10 2015/07/07 14:44:59 sthen Exp $
$OpenBSD: README-main,v 1.11 2015/11/16 20:29:55 sthen Exp $
+-----------------------------------------------------------------------
| Running ${FULLPKGNAME} on OpenBSD
+-----------------------------------------------------------------------
Notes about Icinga2
===================
Upgrading from Icinga 1.x
=========================
Icinga2 is not a drop-in replacement for Icinga (or Nagios)!
@ -14,14 +14,17 @@ Read the "Migration from Icinga 1.x" and the "Differences between Icinga
A migration script exists (see the "icinga2-migration" package), but it
has several limitations (see the Known Caveats section in the information
at https://github.com/Icinga/icinga2-migration).
at https://github.com/Icinga/icinga2-migration). In most cases it would
be better to write a new configuration based on your existing one, rather
than try to migrate via the script.
Getting Started
===============
The main documentation for Icinga2 is provided in markdown format.
See ${LOCALBASE}/share/doc/icinga2/markdown or at
The following sections only consider details relating to use of Icinga 2
on OpenBSD. Consult the main documentation for Icinga2 which is available
in ${LOCALBASE}/share/doc/icinga2/markdown or online at
http://docs.icinga.org/icinga2/latest/doc.
The included sample configuration carries out some simple checks
@ -39,10 +42,15 @@ Enable icinga2 at boot and start it as usual:
# rcctl enable icinga2
# rcctl start icinga2
Web User-Interfaces
===================
Web User Interface
==================
A new web-based user interface for Icinga2 is in beta, instructions will
be added to this file in the future. Until its release you can use the
classic or the API based user interfaces, please consult the upstream
documentation and the README for icinga 1.x.
The optional Icinga Web 2 user interface can be installed separately,
# pkg_add icingaweb2
Consult the upstream documentation and the separate pkg-readme for
Icinga Web 2.
It is also possible to use Icinga 2 with the legacy CGI interface,
or with Icinga Web 1, however this has not been tested by the maintainer.

View File

@ -1,13 +1,13 @@
#!/bin/sh
#
# $OpenBSD: icinga2.rc,v 1.9 2015/11/16 12:51:42 sthen Exp $
# $OpenBSD: icinga2.rc,v 1.10 2015/11/16 20:29:55 sthen Exp $
daemon="${TRUEPREFIX}/sbin/icinga2 daemon -d"
daemon_user="_icinga"
. /etc/rc.d/rc.subr
pexp="${daemon}${daemon_flags:+ ${daemon_flags}}.*"
pexp="${TRUEPREFIX}/lib/icinga2/sbin/icinga2 daemon.*"
rc_pre() {
install -d -o ${daemon_user} -g _icingaweb2 /var/www/var/run/icinga2{,/cmd}