116 changes: 116 additions & 0 deletions .github/workflows/rpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: .rpm

on:
push:
branches:
- master
- 'support/*'
pull_request: {}

concurrency:
group: rpm-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
rpm:
name: .rpm (${{ matrix.distro.name }}, ${{ matrix.distro.release }})

strategy:
fail-fast: false
max-parallel: 1
matrix:
distro:
- name: sles
release: '12.5'
subscription: true

runs-on: ubuntu-latest

steps:
- name: Vars
id: vars
env:
GITLAB_RO_TOKEN: '${{ secrets.GITLAB_RO_TOKEN }}'
run: |
if [ ${{ matrix.distro.subscription }} = true ]; then
if [ "$(tr -d '\n' <<<"$GITLAB_RO_TOKEN" |wc -c)" -eq 0 ]; then
echo '::set-output name=CAN_BUILD::false'
echo '::set-output name=NEED_LOGIN::false'
else
echo '::set-output name=CAN_BUILD::true'
echo '::set-output name=NEED_LOGIN::true'
fi
else
echo '::set-output name=CAN_BUILD::true'
echo '::set-output name=NEED_LOGIN::false'
fi
- name: Checkout HEAD
if: "steps.vars.outputs.CAN_BUILD == 'true'"
uses: actions/checkout@v1

- name: Login
if: "steps.vars.outputs.NEED_LOGIN == 'true'"
env:
GITLAB_RO_TOKEN: '${{ secrets.GITLAB_RO_TOKEN }}'
run: |
docker login registry.icinga.com -u github-actions --password-stdin <<<"$GITLAB_RO_TOKEN"
- name: rpm-icinga2
if: "steps.vars.outputs.CAN_BUILD == 'true' && !matrix.distro.subscription"
run: |
set -exo pipefail
git clone https://git.icinga.com/packaging/rpm-icinga2.git
chmod o+w rpm-icinga2
- name: subscription-rpm-icinga2
if: "steps.vars.outputs.CAN_BUILD == 'true' && matrix.distro.subscription"
env:
GITLAB_RO_TOKEN: '${{ secrets.GITLAB_RO_TOKEN }}'
run: |
set -exo pipefail
git config --global credential.helper store
cat <<EOF >~/.git-credentials
https://github-actions:${GITLAB_RO_TOKEN}@git.icinga.com
EOF
git clone https://git.icinga.com/packaging/subscription-rpm-icinga2.git rpm-icinga2
chmod o+w rpm-icinga2
- name: Restore/backup ccache
if: "steps.vars.outputs.CAN_BUILD == 'true'"
id: ccache
uses: actions/cache@v1
with:
path: rpm-icinga2/ccache
key: |-
${{ matrix.distro.name }}/${{ matrix.distro.release }}-ccache-${{ hashFiles('rpm-icinga2/ccache') }}
- name: Binary
if: "steps.vars.outputs.CAN_BUILD == 'true'"
run: |
set -exo pipefail
git checkout -B master
if [ -e rpm-icinga2/ccache ]; then
chmod -R o+w rpm-icinga2/ccache
fi
docker run --rm \
-v "$(pwd)/rpm-icinga2:/rpm-icinga2" \
-v "$(pwd)/.git:/icinga2.git:ro" \
-w /rpm-icinga2 \
-e ICINGA_BUILD_PROJECT=icinga2 \
-e ICINGA_BUILD_TYPE=snapshot \
-e UPSTREAM_GIT_URL=file:///icinga2.git \
registry.icinga.com/build-docker/${{ matrix.distro.name }}/${{ matrix.distro.release }} \
icinga-build-package
- name: Test
if: "steps.vars.outputs.CAN_BUILD == 'true'"
run: |
set -exo pipefail
docker run --rm \
-v "$(pwd)/rpm-icinga2:/rpm-icinga2" \
-w /rpm-icinga2 \
-e ICINGA_BUILD_PROJECT=icinga2 \
-e ICINGA_BUILD_TYPE=snapshot \
registry.icinga.com/build-docker/${{ matrix.distro.name }}/${{ matrix.distro.release }} \
icinga-build-test
53 changes: 53 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Windows

on:
push:
branches:
- master
- 'support/*'
pull_request: {}

concurrency:
group: windows-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
windows:
name: Windows

strategy:
fail-fast: false
max-parallel: 1
matrix:
bits: [32, 64]

runs-on: windows-2019

env:
BITS: '${{ matrix.bits }}'
ICINGA_BUILD_TYPE: snapshot
UPSTREAM_GIT_URL: file://D:/a/icinga2/icinga2/.git

steps:
- name: Checkout HEAD
uses: actions/checkout@v1

- name: windows-icinga2
run: |
git clone https://git.icinga.com/packaging/windows-icinga2.git
- name: Build tools
run: |
& .\doc\win-dev.ps1
- name: Source
run: |
git checkout -B master
cd windows-icinga2
& .\source.ps1
- name: Binary
working-directory: windows-icinga2
run: |
New-Item -ItemType Directory -Path 'C:\Program Files\Icinga2\WillBeRemoved' -ErrorAction SilentlyContinue
& .\build.ps1
19 changes: 19 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<alexander.klimov@icinga.com> <alexander.klimov@netways.de>
Alexander A. Klimov <alexander.klimov@icinga.com> <alexander.klimov@icinga.com>
<alexander.klimov@icinga.com> <grandmaster@al2klimov.de>
Alexander A. Klimov <alexander.klimov@icinga.com> <al2klimov@gmail.com>
<assaf@aikilinux.com> <assaf.flatto@livepopuli.com>
<atj@pulsewidth.org.uk> <adam.james@transitiv.co.uk>
<bernd.erk@icinga.com> <bernd.erk@icinga.org>
<blerim.sheqa@icinga.com> <blerim.sheqa@netways.de>
<cycloon@is-root.org> <christian.gut@trendswm.de>
<dirk.goetz@icinga.com> <dirk.goetz@netways.de>
<eric.lippmann@icinga.com> <eric.lippmann@netways.de>
<gunnar.beutner@icinga.com> <gunnar.beutner@netways.de>
Expand All @@ -12,18 +15,27 @@ Alexander A. Klimov <alexander.klimov@icinga.com> <alexander.klimov@icinga.com>
<jason.young@velaspan.com> <jyoung15@gmail.com>
<jo.goossens@hosted-power.com> <sales@hosted-power.com>
<johannes.meyer@icinga.com> <johannes.meyer@netways.de>
<julian.brost@icinga.com> <julian@0x4a42.net>
<julian.brost@icinga.com> <julian.brost@gmail.com>
<lars.engels@0x20.net> <lars@0x20.net>
<lennart.betz@icinga.com> <lennart.betz@netways.de>
<mail@fabian-roehl.de> <FRoehl@freicon.de>
<MarcusCaepio@users.noreply.github.com> <7324088+MarcusCaepio@users.noreply.github.com>
<marius@graylog.com> <marius@torch.sh>
<markus.frosch@icinga.com> <lazyfrosch@icinga.org>
<markus.frosch@icinga.com> <markus@lazyfrosch.de>
<mathias.aerts@delta.blue> <mathiasaerts@users.noreply.github.com>
<michael.friedrich@icinga.com> <michael.friedrich@gmail.com>
<michael.friedrich@icinga.com> <Michael.Friedrich@netways.de>
<nicole.lang@icinga.com> <nicole.lang@netways.de>
<noah.hilverling@icinga.com> <noah@hilverling.com>
<sftw@leeclemens.net> <java@leeclemens.net>
<thomas.widhalm@icinga.com> <thomas.widhalm@netways.de>
<thomas.widhalm@icinga.com> <widhalmt@widhalmt.or.at>
<tobias.vonderkrone@profitbricks.com> <tobias@vonderkrone.info>
<yonas.habteab@icinga.com> <yonas.habteab@netways.de>
Alex <alexp710@hotmail.com> <alexp710@hotmail.com>
Baptiste Beauplat <lyknode@cilg.org> <lyknode@cilg.org>
Carsten Köbke <carsten.koebke@gmx.de> Carsten Koebke <carsten.koebke@koebbes.de>
Claudio Kuenzler <ck@claudiokuenzler.com>
Diana Flach <diana.flach@icinga.com> <crunsher@bamberg.ccc.de>
Expand All @@ -32,15 +44,22 @@ Diana Flach <diana.flach@icinga.com> <jean-marcel.flach@netways.de>
Diana Flach <diana.flach@icinga.com> Jean Flach <jean-marcel.flach@icinga.com>
Dolf Schimmel <dolf@transip.nl> <dolf@dolfschimmel.nl>
Gunnar Beutner <gunnar.beutner@icinga.com> <icinga@net-icinga2.adm.netways.de>
Henrik Triem <henrik.triem@icinga.com> <henrik.triem@netways.de>
Henrik Triem <henrik.triem@icinga.com> Henrik Triem <43344334+htriem@users.noreply.github.com>
<henrik.triem@icinga.com> <Henrik.Triem@icinga.com>
Jens Schanz <jens.schanz@mueller.de> <mail@jensschanz.de>
Jens Schanz <jens.schanz@mueller.de> Schanz, Jens <jens.schanz@mueller.de>
Kálmán „KAMI” Szalai <kami911@gmail.com> <kami911@gmail.com>
Lorenz Kästle <lorenz.kaestle@netways.de> <12514511+RincewindsHat@users.noreply.github.com>
Marianne Spiller <github@spiller.me>
Markus Waldmüller <markus.waldmueller@netways.de>
Mattia Codato <mattia.codato@wuerth-phoenix.com> mcodato <64135571+mcodato@users.noreply.github.com>
Michael Insel <mcktr55@gmail.com> <mcktr55@gmail.com>
Michael Insel <mcktr55@gmail.com> <michael@email.de>
Michael Insel <mcktr55@gmail.com> <michael@insel.email>
nemtrif <ntrifunovic@hotmail.com> <nemtrif@users.noreply.github.com>
nemtrif <ntrifunovic@hotmail.com> <ntrifunovic@hotmail.com>
Robin O'Brien <robin@labs.epiuse.com> <robinjohnobrien@gmail.com>
Roman Gerhardt <roman.gerhardt@cbc-x.com> <roman.gerhardt@cbc-x.com>
Sebastian Chrostek <sebastian@chrostek.net> <sebastian@chrostek.net>
Thomas Gelf <thomas.gelf@icinga.com> <thomas@gelf.net>
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

68 changes: 53 additions & 15 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Aaron Bishop <erroneous@gmail.com>
Adam Bolte <abolte@systemsaviour.com>
Adam James <adam.james@transitiv.co.uk>
Adam James <atj@pulsewidth.org.uk>
akrus <akrus@flygroup.st>
Alan Jenkins <alan.christopher.jenkins@gmail.com>
Alan Litster <alan.litster@twentyci.co.uk>
Expand All @@ -11,7 +11,10 @@ Alexander Fuhr <alexander.fuhr@netways.de>
Alexander Schomburg <script.acc@alex.schomb.org>
Alexander Stoll <astoll@netways.de>
Alexander Wirt <formorer@debian.org>
Alvar Penning <alvar.penning@icinga.com>
Andrea Avancini <andrea.avancini@wuerth-phoenix.com>
Andrea Kao <eirinikos@gmail.com>
Andreas Maus <maus@badphish.ypbind.de>
Andreas Scherbaum <andreas@scherbaum.biz>
Andreas Unterkircher <unki@netshadow.net>
Andres Ivanov <andres@andres.wtf>
Expand All @@ -22,12 +25,16 @@ Ant1x <37016240+Ant1x@users.noreply.github.com>
Arnd Hannemann <arnd@arndnet.de>
Assaf Flatto <assaf@aikilinux.com>
azthec <azthec@users.noreply.github.com>
Baptiste Beauplat <lyknode@cilg.org>
BarbUk <julien.virey@gmail.com>
Bård Dahlmo-Lerbæk <bard.dahlmo-lerbaek@skatteetaten.no>
Bas Couwenberg <sebastic@xs4all.nl>
bascarsija <bascarsija.dev@gmail.com>
Bastian Guse <bguse@nocopy.de>
Bauerheim, Marcus <mbauerheim@spirit21.com>
BausPhi <philipp.baus.studium@googlemail.com>
Benedikt Heine <bebe@bebehei.de>
Benjamin Groeber <Benjamin.Groeber@wuerth-phoenix.com>
Bernd Arnold <wopfel@gmail.com>
Bernd Erk <bernd.erk@icinga.com>
Berthold Cogel <cogel@uni-koeln.de>
Expand All @@ -36,24 +43,26 @@ Brendan Jurd <direvus@gmail.com>
Brian De Wolf <git@bldewolf.com>
Brian Dockter <specus@gmail.com>
Bruno Lingner <mail@hugo.ro>
Bård Dahlmo-Lerbæk <bard.dahlmo-lerbaek@skatteetaten.no>
C C Magnus Gustavsson <magnus@gustavsson.se>
Carlos Cesario <carloscesario@gmail.com>
Carsten Köbke <carsten.koebke@gmx.de>
Chris Boot <crb@tiger-computing.co.uk>
Christian Birk <mail@birkc.de>
Christian Gut <christian.gut@trendswm.de>
Christian Gut <cycloon@is-root.org>
Christian Harke <ch.harke@gmail.com>
Christian Jonak <christian@jonak.org>
Christian Lehmann <christian_lehmann@gmx.de>
Christian Loos <cloos@netsandbox.de>
Christian Schmidt <github@chsc.dk>
Christopher Peterson <3893680+cspeterson@users.noreply.github.com>
Christopher Schirner <schinken@bamberg.ccc.de>
chrostek <sebastian@chrostek.net>
Claudio Bilotta <bilottalove@gmail.com>
Claudio Kuenzler <ck@claudiokuenzler.com>
Conrad Clement <cclement@printeron.com>
cstegm <cstegm@users.noreply.github.com>
ctrlaltca <ctrlaltca@gmail.com>
Damiano Chini <damiano.chini@wuerth-phoenix.com>
Daniel Bodky <daniel.bodky@netways.de>
Daniel Helgenberger <daniel.helgenberger@m-box.de>
Daniel Kesselberg <mail@danielkesselberg.de>
Daniil Yaroslavtsev <dyaroslavtsev@confyrm.com>
Expand All @@ -63,30 +72,33 @@ Denis <zaharden@gmail.com>
Dennis Lichtenthäler <dennis.lichtenthaeler@stiftung-tannenhof.de>
dh.harald <dh.harald@gmail.com>
Diana Flach <diana.flach@icinga.com>
Didier 'OdyX' Raboud <didier.raboud@liip.ch>
Dinesh Majrekar <dinesh.majrekar@serverchoice.com>
Dirk Goetz <dirk.goetz@icinga.com>
Dirk Melchers <dirk@dirk-melchers.de>
Dolf Schimmel <dolf@transip.nl>
Dominik Riva <driva@protonmail.com>
dominik-r-s <43005480+dominik-r-s@users.noreply.github.com>
Edgar Fuß <ef@math.uni-bonn.de>
Eduard Güldner <eduard.gueldner@gmail.com>
Edvin Seferovic <edvin@seferovic.net>
Elias Ohm <eohm@novomind.com>
Élie Bouttier <elie@bouttier.eu>
Eric Lippmann <eric.lippmann@icinga.com>
Evgeni Golov <evgeni@golov.de>
Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
Fabian Röhl <FRoehl@freicon.de>
Fabian Röhl <mail@fabian-roehl.de>
Fabian Werner <47595490+fabieins@users.noreply.github.com>
fbachmann <bachmann.f@gmail.com>
Federico Cuello <federico.cuello@sociomantic.com>
Federico Pires <federico.pires@upsight.com>
Ferdi Gueran <ferdi.gueran@nextevolution.de>
fluxX04 <alexp710@hotmail.com>
Feu Mourek <feu.mourek@icinga.com>
Francesco Colista <fcolista@alpinelinux.org>
Gaël Beaudoin <gaboo@gaboo.org>
Georg Faerber <georg@riseup.net>
Georg Haas <hax404foogit@hax404.de>
Gerd von Egidy <gerd@egidy.de>
Gerhardt Roman <roman.gerhardt@cbc-x.com>
gitmopp <mopp@gmx.net>
Glauco Vinicius <gl4uc0@gmail.com>
Greg Hewgill <greg@hewgill.com>
Expand All @@ -98,10 +110,11 @@ Harald Laabs <github@dasr.de>
Heike Jurzik <icinga@huhnix.org>
Hendrik Röder <hendrik.biz@gmail.com>
Henrik Triem <henrik.triem@icinga.com>
htriem <henrik.triem@netways.de>
Ian Kelling <ian@iankelling.org>
Ildar Hizbulin <hizel@vyborg.ru>
Irina Kaprizkina <ikapriz@gmail.com>
Iustin Pop <iustin@k1024.org>
Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
Jack <jackdev@mailbox.org>
James Pharaoh <james@pharaoh.uk>
Jan Andres <jan.andres@berenberg.de>
Expand All @@ -115,38 +128,47 @@ Jens Link <jenslink@quux.de>
Jens Schanz <jens.schanz@mueller.de>
Jeon Sang Wan <maxswjeon@naver.com>
Jeremy Armstrong <lepubel@gmail.com>
Jérôme Drouet <jerome.drouet@gmail.com>
Jesse Morgan <morgajel@gmail.com>
Jo Goossens <jo.goossens@hosted-power.com>
Jochen Friedrich <j.friedrich@nwe.de>
Johannes Meyer <johannes.meyer@icinga.com>
Jonas Meurer <jonas@freesources.org>
Jordi van Scheijen <jordi.vanscheijen@solvinity.com>
Josef Friedrich <josef@friedrich.rocks>
Joseph L. Casale <jcasale@activenetwerx.com>
jre3brg <jorge.rebelo@pt.bosch.com>
Julian Brost <julian@0x4a42.net>
Jérôme Drouet <jerome.drouet@gmail.com>
Julian Brost <julian.brost@icinga.com>
K0nne <34264690+K0nne@users.noreply.github.com>
Kai Goller <kai.goller@netways.de>
Kálmán „KAMI” Szalai <kami911@gmail.com>
kiba <zombie32@gmail.com>
Konstantin Kelemen <konstantin@kel.mn>
krishna <gskrishna44@gmail.com>
Kálmán Szalai - KAMI <kami911@gmail.com>
Kálmán „KAMI” Szalai <kami911@gmail.com>
Lara <lara@uwu.is>
Lars Engels <lars.engels@0x20.net>
Lars Krüger <krueger-lars@web.de>
Lars Vogdt <lrupp@users.noreply.github.com>
Leah Oswald <mail@leahoswald.de>
Lee Clemens <java@leeclemens.net>
Lee Clemens <sftw@leeclemens.net>
Lee Garrett <lgarrett@rocketjump.eu>
Lennart Betz <lennart.betz@icinga.com>
Leon Stringer <leon@priorsvle.com>
lihan <tclh123@gmail.com>
log1-c <24474580+log1-c@users.noreply.github.com>
Lord Hepipud <contact@lordhepipud.de>
Lorenz Kästle <lorenz.kaestle@netways.de>
Louis Sautier <sautier.louis@gmail.com>
Luca Lesinigo <luca@lm-net.it>
Lucas Bremgartner <breml@users.noreply.github.com>
Lucas Fairchild-Madar <lucas.madar@gmail.com>
Luiz Amaral <luiz.amaral@innogames.com>
Maciej Dems <maciej.dems@p.lodz.pl>
Magnus Bäck <magnus@noun.se>
Maik Stuebner <maik@stuebner.info>
Malte Rabenseifner <mail@malte-rabenseifner.de>
Manuel Reiter <reiter@csc.uni-frankfurt.de>
Marc Rupprecht <marc.rupprecht@netways.de>
Marcus van Dam <marcus@marcusvandam.nl>
MarcusCaepio <MarcusCaepio@users.noreply.github.com>
Marianne Spiller <github@spiller.me>
Expand All @@ -155,19 +177,23 @@ Marius Sturm <marius@graylog.com>
Mark Leary <mleary@mit.edu>
Markus Frosch <markus.frosch@icinga.com>
Markus Waldmüller <markus.waldmueller@netways.de>
Markus Weber <github@ztweb.de>
Martijn van Duren <m.vanduren@itisit.nl>
Martin Neubert <martin.neubert@t-systems.com>
Martin Stiborsky <martin.stiborsky@gmail.com>
marxin <mliska@suse.cz>
Mathias Aerts <mathias.aerts@delta.blue>
Mathieu Arnold <mat@mat.cc>
Mathieu Lutfy <mathieu@bidon.ca>
Matthaus Owens <matthaus@puppetlabs.com>
Matthias Baur <m.baur@syseleven.de>
Matthias Schales <black-dragon131@web.de>
Mattia Codato <mattia.codato@wuerth-phoenix.com>
Maurice Meyer <morre@mor.re>
Max Deparade <max.deparade@netways.de>
Max Rosin <git@hackrid.de>
Max Zhang <zhenzhan@tibco.com>
Maximilian Eschenbacher <maximilian@eschenbacher.email>
Maximilian Falkenstein <maxf@njsm.de>
Mhd Sulhan <ms@kilabit.info>
Micha Ahrweiler <me@schnitzi.net>
Expand All @@ -182,9 +208,9 @@ Mirco Bauer <meebey@meebey.net>
Mirko Nardin <mirko.nardin@gmx.net>
mocruz <mocruz@theworkshop.com>
Muhammad Mominul Huque <nahidbinbaten1995@gmail.com>
Nemanja Trifunovic <ntrifunovic@hotmail.com>
nemtrif <ntrifunovic@hotmail.com>
Nicolai <nbuchwitz@users.noreply.github.com>
Nicolas Berens <nicolas.berens@planet.com>
Nicolas Limage <github@xephon.org>
Nicole Lang <nicole.lang@icinga.com>
Niflou <dubuscyr@gmail.com>
Expand All @@ -195,10 +221,14 @@ Oleg Artenii <oleg@artenii.email>
Pall Sigurdsson <palli-github@minor.is>
Paolo Schiro <paolo.schiro@kpnqwest.it>
Patrick <patrick.ihle@patteswelt.de>
Patrick Dolinic <pdolinic@netways.de>
Patrick Huy <frz@frz.cc>
Paul Denning <paul.denning@dimensiondata.com>
Paul Richards <paul@minimoo.org>
Pavel Motyrev <legioner.r@gmail.com>
Pawel Szafer <pszafer@gmail.com>
Per von Zweigbergk <pvz@itassistans.se>
Peter Eckel <6815386+peteeckel@users.noreply.github.com>
Peter Eckel <pe-git@hindenburgring.com>
Peter Eckel <pe-icinga2@hindenburgring.com>
Petr Ruzicka <petr.ruzicka@gmail.com>
Expand All @@ -209,11 +239,13 @@ pv2b <pvz@pvz.pp.se>
Ralph Breier <ralph.breier@roedl.com>
Reto Zeder <reto.zeder@arcade.ch>
Ricardo Bartels <ricardo@bitchbrothers.com>
Rinck H. Sonnenberg <r.sonnenberg@netson.nl>
Robert Lindgren <robert.lindgren@gmail.com>
Robert Scheck <robert@fedoraproject.org>
Robin O'Brien <robin@labs.epiuse.com>
Roland Hopferwieser <rhopfer@ica.jku.at>
Roman Gerhardt <roman.gerhardt@cbc-x.com>
Rostislav Opocensky <orbis@pictus.org>
Rudy Gevaert <rudy.gevaert@ugent.be>
Rune Darrud <theflyingcorpse@gmail.com>
ryanohnemus <ryan.ohnemus@tradingtechnologies.com>
Expand All @@ -224,6 +256,7 @@ Sebastian Brückner <mail@invlid.com>
Sebastian Chrostek <sebastian@chrostek.net>
Sebastian Eikenberg <eikese@mail.uni-paderborn.de>
Sebastian Marsching <sebastian-git-2016@marsching.com>
Silas <67681686+Tqnsls@users.noreply.github.com>
Simon Murray <spjmurray@yahoo.co.uk>
Simon Ruderich <simon@ruderich.org>
Siyalrach Anton Thomas <sat@level8.dk>
Expand All @@ -233,13 +266,16 @@ Stefar77 <Stefar77@users.noreply.github.com>
Stephan Platz <github@paalsteek.de>
Stephan Tesch <stephan@tesch.cx>
Steve McMaster <mcmaster@hurricanelabs.com>
stevie-sy <38723488+stevie-sy@users.noreply.github.com>
Strajan Sebastian Ioan <strajan.sebastian@yahoo.com>
Strix <660956+MrStrix@users.noreply.github.com>
Stuart Henderson <stu@spacehopper.org>
Sven Nierlein <sven@nierlein.de>
Sven Wegener <swegener@gentoo.org>
sysadt <sysadt@protonmail.com>
T. Mulyana <nothinux@gmail.com>
teclogi <27726999+teclogi@users.noreply.github.com>
Theo Buehler <tb@openbsd.org>
Thomas Forrer <thomas.forrer@wuerth-phoenix.com>
Thomas Gelf <thomas.gelf@icinga.com>
Thomas Niedermeier <tniedermeier@thomas-krenn.com>
Expand All @@ -248,6 +284,7 @@ Tim Hardeck <thardeck@suse.de>
Tim Weippert <weiti@weiti.eu>
Timo Buhrmester <van.fstd@gmail.com>
Tobias Birnbaum <osterd@gmx.de>
Tobias Deiminger <haxtibal@posteo.de>
Tobias von der Krone <tobias.vonderkrone@profitbricks.com>
Tom Geissler <Tom@d7031.de>
Uwe Ebel <kobmaki@aol.com>
Expand All @@ -258,8 +295,9 @@ Wenger Florian <wenger@unifox.at>
Will Frey <will.frey@digitalreasoning.com>
Winfried Angele <winfried.angele@gmail.com>
Wolfgang Nieder <wnd@gmx.net>
XnS <git@xns.be>
Yannick Charton <tontonitch-pro@yahoo.fr>
Yohan Jarosz <yohanjarosz@yahoo.fr>
Yonas Habteab <yonas.habteab@icinga.com>
Zachary McGibbon <zachary.mcgibbon@gmail.com>
Zoltan Nagy <abesto@abesto.net>
Élie Bouttier <elie@bouttier.eu>
1,055 changes: 1,055 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

125 changes: 68 additions & 57 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
# Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+

cmake_minimum_required(VERSION 2.8.8)
cmake_minimum_required(VERSION 2.8.12)
set(BOOST_MIN_VERSION "1.66.0")

if("${CMAKE_VERSION}" VERSION_LESS "3.8") # SLES 12.5
if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
endif()
else()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()

project(icinga2)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third-party/cmake")
Expand All @@ -13,21 +23,21 @@ if(NOT CMAKE_BUILD_TYPE)
FORCE)
endif()

option(ICINGA2_WITH_MYSQL "Build the MySQL IDO module" ON)
option(ICINGA2_WITH_PGSQL "Build the PostgreSQL IDO module" ON)
if(WIN32)
set(ICINGA2_MASTER OFF)
else()
set(ICINGA2_MASTER ON)
endif()

option(ICINGA2_WITH_MYSQL "Build the MySQL IDO module" ${ICINGA2_MASTER})
option(ICINGA2_WITH_PGSQL "Build the PostgreSQL IDO module" ${ICINGA2_MASTER})
option(ICINGA2_WITH_CHECKER "Build the checker module" ON)
option(ICINGA2_WITH_COMPAT "Build the compat module" ON)
option(ICINGA2_WITH_LIVESTATUS "Build the Livestatus module" ON)
option(ICINGA2_WITH_COMPAT "Build the compat module" ${ICINGA2_MASTER})
option(ICINGA2_WITH_LIVESTATUS "Build the Livestatus module" ${ICINGA2_MASTER})
option(ICINGA2_WITH_NOTIFICATION "Build the notification module" ON)
option(ICINGA2_WITH_PERFDATA "Build the perfdata module" ON)
option(ICINGA2_WITH_PERFDATA "Build the perfdata module" ${ICINGA2_MASTER})
option(ICINGA2_WITH_TESTS "Run unit tests" ON)

# IcingaDB only is supported on modern Linux/Unix master systems
if(NOT WIN32)
option(ICINGA2_WITH_ICINGADB "Build the IcingaDB module" ON)
else()
option(ICINGA2_WITH_ICINGADB "Build the IcingaDB module" OFF)
endif()
option(ICINGA2_WITH_ICINGADB "Build the IcingaDB module" ${ICINGA2_MASTER})

option (USE_SYSTEMD
"Configure icinga as native systemd service instead of a SysV initscript" OFF)
Expand Down Expand Up @@ -89,7 +99,7 @@ file(READ "${CMAKE_CURRENT_SOURCE_DIR}/COPYING" ICINGA2_LICENSE_GPL)
set(ICINGA2_LICENSE "${ICINGA2_LICENSE_GPL}\n\n---\n\n${ICINGA2_LICENSE_ADDITIONS}")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt" ${ICINGA2_LICENSE})

file(STRINGS VERSION SPEC_VERSION REGEX "^Version:")
file(STRINGS ICINGA2_VERSION SPEC_VERSION REGEX "^Version:")
string(LENGTH "${SPEC_VERSION}" SPEC_VERSION_LENGTH)
math(EXPR SPEC_VERSION_LENGTH "${SPEC_VERSION_LENGTH} - 9")
string(SUBSTRING ${SPEC_VERSION} 9 ${SPEC_VERSION_LENGTH} SPEC_VERSION)
Expand All @@ -102,7 +112,7 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/icinga-version.h.force)
configure_file(icinga-version.h.force ${CMAKE_CURRENT_BINARY_DIR}/icinga-version.h COPYONLY)
else()
if(NOT ICINGA2_GIT_VERSION_INFO OR GIT_VERSION MATCHES "-NOTFOUND$")
file(STRINGS VERSION SPEC_REVISION REGEX "^Revision: ")
file(STRINGS ICINGA2_VERSION SPEC_REVISION REGEX "^Revision: ")
string(LENGTH "${SPEC_REVISION}" SPEC_REVISION_LENGTH)
math(EXPR SPEC_REVISION_LENGTH "${SPEC_REVISION_LENGTH} - 10")
string(SUBSTRING ${SPEC_REVISION} 10 ${SPEC_REVISION_LENGTH} SPEC_REVISION)
Expand All @@ -119,7 +129,9 @@ endif()
# NuGet on Windows requires a semantic versioning, example: 2.10.4.123 (only 4 element, only numeric)
string(REGEX REPLACE "-([0-9]+).*$" ".\\1" ICINGA2_VERSION_SAFE "${ICINGA2_VERSION}")
string(REGEX REPLACE "-[^\\.]*(.*)$" "\\1" ICINGA2_VERSION_SAFE "${ICINGA2_VERSION_SAFE}")
message(STATUS "ICINGA2_VERSION_SAFE=${ICINGA2_VERSION_SAFE}")
string(REGEX REPLACE "^([0-9]+\\.[0-9]+\\.[0-9]+)[\\.]?[0-9]*" "\\1" CHOCO_VERSION_SHORT "${ICINGA2_VERSION_SAFE}")

message(STATUS "ICINGA2_VERSION_SAFE=${ICINGA2_VERSION_SAFE} CHOCO_VERSION_SHORT=${CHOCO_VERSION_SHORT}")

if(WIN32)
set(Boost_USE_STATIC_LIBS ON)
Expand Down Expand Up @@ -161,7 +173,7 @@ else()
set(LOGROTATE_CREATE "\n\tcreate 644 ${ICINGA2_USER} ${ICINGA2_GROUP}")
endif()

find_package(Boost ${BOOST_MIN_VERSION} COMPONENTS context coroutine date_time filesystem thread system program_options regex REQUIRED)
find_package(Boost ${BOOST_MIN_VERSION} COMPONENTS coroutine context date_time filesystem iostreams thread system program_options regex REQUIRED)

# Boost.Coroutine2 (the successor of Boost.Coroutine)
# (1) doesn't even exist in old Boost versions and
Expand All @@ -170,6 +182,9 @@ add_definitions(-DBOOST_COROUTINES_NO_DEPRECATION_WARNING)

add_definitions(-DBOOST_FILESYSTEM_NO_DEPRECATED)

# Required for Boost v1.74+
add_definitions(-DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT)

link_directories(${Boost_LIBRARY_DIRS})
include_directories(${Boost_INCLUDE_DIRS})

Expand Down Expand Up @@ -198,10 +213,6 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/lib
)

if(HAVE_LIBEXECINFO)
list(APPEND base_DEPS execinfo)
endif()

if(UNIX OR CYGWIN)
list(APPEND base_OBJS $<TARGET_OBJECTS:execvpe>)
endif()
Expand All @@ -228,8 +239,8 @@ set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${CMAKE_INSTALL_FULL_LIBDIR}/icinga2")

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments -fcolor-diagnostics")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments -fcolor-diagnostics -fno-limit-debug-info")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics -fno-limit-debug-info")

# Clang on Fedora requires -pthread, Apple Clang does not
# AppleClang is available since CMake 3.0.0
Expand Down Expand Up @@ -360,6 +371,20 @@ check_include_file_cxx(cxxabi.h HAVE_CXXABI_H)

if(HAVE_LIBEXECINFO)
set(HAVE_BACKTRACE_SYMBOLS TRUE)
list(APPEND base_DEPS execinfo)
endif()

if(NOT WIN32)
# boost::stacktrace uses _Unwind_Backtrace which is only exposed if _GNU_SOURCE is defined on most systems
add_definitions(-D_GNU_SOURCE)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
set(ICINGA2_STACKTRACE_USE_BACKTRACE_SYMBOLS TRUE)
endif()

if(ICINGA2_STACKTRACE_USE_BACKTRACE_SYMBOLS AND NOT HAVE_BACKTRACE_SYMBOLS)
message(FATAL_ERROR "ICINGA2_STACKTRACE_USE_BACKTRACE_SYMBOLS is set but backtrace_symbols() was not found")
endif()

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
Expand All @@ -368,14 +393,18 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
OUTPUT_VARIABLE _ICINGA2_COMPILER_VERSION
)

if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.7.0")
message(FATAL_ERROR "Your version of GCC (${CMAKE_CXX_COMPILER_VERSION}) is too old for building Icinga 2 (GCC >= 4.7.0 is required).")
if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "7.0.0")
message(FATAL_ERROR "Your version of GCC (${CMAKE_CXX_COMPILER_VERSION}) is too old for building Icinga 2 (GCC >= 7.0.0 is required).")
endif()
endif()

if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
if(MSVC)
if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "19.20")
message(FATAL_ERROR "Your version of MSVC (${CMAKE_CXX_COMPILER_VERSION}) is too old for building Icinga 2 (MSVC >= 19.20 from Visual Studio 2019 is required).")
endif()
endif()

if(NOT MSVC)
check_cxx_source_compiles("class Base { public: virtual void test(void) { } }; class Derived : public Base { virtual void test(void) override { } }; int main(){}" CXX_FEATURE_OVERRIDE)

if(NOT CXX_FEATURE_OVERRIDE)
Expand Down Expand Up @@ -411,10 +440,7 @@ if(NOT MSVC)
# ARM settings
if("${ARCH}" STREQUAL "arm")
check_cxx_source_compiles( "include <atomic>; int main(){ std::atomic<uint_fast64_t> x; x.fetch_add(1); x.sub_add(1); }" CXX_ATOMIC)

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -latomic")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -latomic")
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} -latomic")
link_libraries(atomic)
endif()

else()
Expand Down Expand Up @@ -449,11 +475,14 @@ add_subdirectory(lib)
add_subdirectory(icinga-app)
add_subdirectory(etc)
add_subdirectory(itl)
add_subdirectory(doc)
add_subdirectory(agent)
add_subdirectory(plugins)
add_subdirectory(choco)

if(NOT WIN32)
add_subdirectory(doc)
endif()

if(MSVC)
add_subdirectory(icinga-installer)
endif()
Expand All @@ -477,40 +506,22 @@ set(CPACK_WIX_UI_DIALOG "${CMAKE_CURRENT_SOURCE_DIR}/icinga-installer/dlgbmp.bmp
set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_BINARY_DIR}/icinga-installer/icinga2.wixpatch.Debug")
set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_BINARY_DIR}/icinga-installer/icinga2.wixpatch")
set(CPACK_WIX_EXTENSIONS "WixUtilExtension" "WixNetFxExtension")
set(CPACK_WIX_INSTALL_SCOPE NONE)

set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "sbin")
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
include(InstallRequiredSystemLibraries)

if(WIN32)
if(CMAKE_VS_PLATFORM_NAME STREQUAL "x64")
set(NSCP_URL "https://github.com/mickem/nscp/releases/download/0.5.2.39/NSCP-0.5.2.39-x64.msi")
set(NSCP_SHA256 "dfe93c293f30586b02510d8b7884e4e177b93a5fead8b5dc6de8103532e6e159")
if (CMAKE_VS_PLATFORM_NAME STREQUAL "x64")
set(ICINGA2_OPENSSL_DLL_ARCH "-x64")
else()
set(NSCP_URL "https://github.com/mickem/nscp/releases/download/0.5.2.39/NSCP-0.5.2.39-Win32.msi")
set(NSCP_SHA256 "ca6a67fb01c1468f2b510fd2f9eb0750887db3fb49a0302732c1421c85c6627c")
endif()

set(NSCP_SHA256SUM "")
if (EXISTS ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi)
file(SHA256 ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi NSCP_SHA256SUM)
endif()

if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi OR NOT ${NSCP_SHA256SUM} STREQUAL ${NSCP_SHA256})
file(DOWNLOAD ${NSCP_URL} ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi SHOW_PROGRESS)
set(ICINGA2_OPENSSL_DLL_ARCH "")
endif()

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/NSCP.msi DESTINATION ${CMAKE_INSTALL_SBINDIR})

if (OPENSSL_VERSION_MINOR GREATER_EQUAL 1)
if (CMAKE_VS_PLATFORM_NAME STREQUAL "x64")
list (APPEND ICINGA2_OPENSSL_DLLS ${OPENSSL_INCLUDE_DIR}/../bin/libcrypto-1_1-x64.dll ${OPENSSL_INCLUDE_DIR}/../bin/libssl-1_1-x64.dll)
else()
list (APPEND ICINGA2_OPENSSL_DLLS ${OPENSSL_INCLUDE_DIR}/../bin/libcrypto-1_1.dll ${OPENSSL_INCLUDE_DIR}/../bin/libssl-1_1.dll)
endif()
else()
list (APPEND ICINGA2_OPENSSL_DLLS ${OPENSSL_INCLUDE_DIR}/../bin/libeay32.dll ${OPENSSL_INCLUDE_DIR}/../bin/ssleay32.dll)
endif()
foreach(ICINGA2_OPENSSL_LIB crypto ssl)
list(APPEND ICINGA2_OPENSSL_DLLS ${OPENSSL_INCLUDE_DIR}/../bin/lib${ICINGA2_OPENSSL_LIB}-3${ICINGA2_OPENSSL_DLL_ARCH}.dll)
endforeach()

install(
PROGRAMS ${ICINGA2_OPENSSL_DLLS}
Expand Down
73 changes: 41 additions & 32 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@ Please continue reading in the following sections for a step by step guide.
[Fork the project](https://help.github.com/articles/fork-a-repo/) to your GitHub account
and clone the repository:

```
```bash
git clone git@github.com:dnsmichi/icinga2.git
cd icinga2
```

Add a new remote `upstream` with this repository as value.

```
```bash
git remote add upstream https://github.com/icinga/icinga2.git
```

You can pull updates to your fork's master branch:

```
```bash
git fetch --all
git pull upstream HEAD
```
Expand All @@ -71,7 +71,7 @@ Generally a branch name should include a topic such as `bugfix` or `feature` fol
by a description and an issue number if applicable. Branches should have only changes
relevant to a specific issue.

```
```bash
git checkout -b bugfix/service-template-typo-1234
git checkout -b feature/config-handling-1235
```
Expand Down Expand Up @@ -111,12 +111,18 @@ refs #1234
You can add multiple commits during your journey to finish your patch.
Don't worry, you can squash those changes into a single commit later on.

Ensure your name and email address in the commit metadata are correct.
In your first contribution (PR) also add them to [AUTHORS](./AUTHORS).
If those metadata changed since your last successful contribution,
you should update [AUTHORS](./AUTHORS) and [.mailmap](./.mailmap).
For the latter see [gitmailmap(5)](https://git-scm.com/docs/gitmailmap).

## <a id="contributing-pull-requests"></a> Pull Requests

Once you've commited your changes, please update your local master
branch and rebase your bugfix/feature branch against it before submitting a PR.

```
```bash
git checkout master
git pull upstream HEAD

Expand All @@ -128,12 +134,14 @@ Once you've resolved any conflicts, push the branch to your remote repository.
It might be necessary to force push after rebasing - use with care!

New branch:
```

```bash
git push --set-upstream origin bugfix/notifications
```

Existing branch:
```

```bash
git push -f origin bugfix/notifications
```

Expand Down Expand Up @@ -162,15 +170,15 @@ developers might ask you to rebase your PR.

First off, fetch and pull `upstream` master.

```
```bash
git checkout master
git fetch --all
git pull upstream HEAD
```

Then change to your working branch and start rebasing it against master:

```
```bash
git checkout bugfix/notifications
git rebase master
```
Expand All @@ -187,21 +195,21 @@ Edit the file and search for `>>>`. Fix, build, test and save as needed.

Add the modified file(s) and continue rebasing.

```
```bash
git add path/to/conflict.cpp
git rebase --continue
```

Once succeeded ensure to push your changed history remotely.

```
```bash
git push -f origin bugfix/notifications
```


If you fear to break things, do the rebase in a backup branch first and later replace your current branch.

```
```bash
git checkout bugfix/notifications
git checkout -b bugfix/notifications-rebase

Expand All @@ -225,7 +233,7 @@ Say you want to squash the last 3 commits in your branch into a single one.

Start an interactive (`-i`) rebase from current HEAD minus three commits (`HEAD~3`).

```
```bash
git rebase -i HEAD~3
```

Expand All @@ -239,7 +247,7 @@ squash b37fd5377 Doc updates

Save and let rebase to its job. Then force push the changes to the remote origin.

```
```bash
git push -f origin bugfix/notifications
```

Expand Down Expand Up @@ -267,19 +275,19 @@ The documentation is written in GitHub flavored [Markdown](https://guides.github
It is located in the `doc/` directory and can be edited with your preferred editor. You can also
edit it online on GitHub.

```
```bash
vim doc/2-getting-started.md
```

In order to review and test changes, you can install the [mkdocs](http://www.mkdocs.org) Python library.
In order to review and test changes, you can install the [mkdocs](https://www.mkdocs.org) Python library.

```
```bash
pip install mkdocs
```

This allows you to start a local mkdocs viewer instance on http://localhost:8000

```
```bash
mkdocs serve
```

Expand All @@ -288,7 +296,7 @@ Changes on the chapter layout can be done inside the `mkdocs.yml` file in the ma
There also is a script to ensure that relative URLs to other sections are updated. This script
also checks for broken URLs.

```
```bash
./doc/update-links.py doc/*.md
```

Expand Down Expand Up @@ -335,7 +343,7 @@ Your patch should consist of 2 parts:

Create a new fix or feature branch and start your work.

```
```bash
git checkout -b feature/itl-check-printer
```

Expand All @@ -344,22 +352,22 @@ git checkout -b feature/itl-check-printer
There already exists a defined structure for contributed plugins. Navigate to `itl/plugins-contrib.d`
and verify where your command definitions fits into.

```
```bash
cd itl/plugins-contrib.d/
ls
```

If you want to add or modify an existing Monitoring Plugin please use `itl/command-plugins.conf` instead.

```
```bash
vim itl/command-plugins-conf
```

##### Existing Configuration File

Just edit it, and add your CheckCommand definition.

```
```bash
vim operating-system.conf
```

Expand All @@ -369,8 +377,8 @@ Proceed to the documentation.

Create a new file with .conf suffix.

```
$ vim printer.conf
```bash
vim printer.conf
```

Add the file to `itl/CMakeLists.txt` in the FILES line in **alpha-numeric order**.
Expand All @@ -385,7 +393,7 @@ vim CMakeLists.txt

Add the newly created file to your git commit.

```
```bash
git add printer.conf
```

Expand All @@ -396,7 +404,7 @@ Do not commit it yet but finish with the documentation.
Edit the documentation file in the `doc/` directory. More details on documentation
updates can be found [here](CONTRIBUTING.md#contributing-documentation).

```
```bash
vim doc/10-icinga-template-library.md
```

Expand Down Expand Up @@ -424,9 +432,10 @@ Explain its purpose and possible enhancements/shortcomings.
refs #existingticketnumberifany
```

Push the branch to the remote origin and create a [pull request](https://help.github.com/articles/using-pull-requests/).

```
```bash
git push --set-upstream origin feature/itl-check-printer
hub pull-request
```
Expand Down Expand Up @@ -464,14 +473,14 @@ At the bottom it says "Add more commits by pushing to the bugfix/persistent-comm

First off, add the remote repository as additional origin and fetch its content:

```
```bash
git remote add theflyingcorpse https://github.com/TheFlyingCorpse/icinga2
git fetch --all
```

Checkout the mentioned remote branch into a local branch (Note: `theflyingcorpse` is the name of the remote):

```
```bash
git checkout theflyingcorpse/bugfix/persistent-comments-are-not-persistent -b bugfix/persistent-comments-are-not-persistent
```

Expand All @@ -480,12 +489,12 @@ Rebase, amend, squash or add your own commits on top.
Once you are satisfied, push the changes to the remote `theflyingcorpse` and its branch `bugfix/persistent-comments-are-not-persistent`.
The syntax here is `git push <remote> <localbranch>:<remotebranch>`.

```
```bash
git push theflyingcorpse bugfix/persistent-comments-are-not-persistent:bugfix/persistent-comments-are-not-persistent
```

In case you've changed the commit history (rebase, amend, squash), you'll need to force push. Be careful, this can't be reverted!

```
```bash
git push -f theflyingcorpse bugfix/persistent-comments-are-not-persistent:bugfix/persistent-comments-are-not-persistent
```
2 changes: 2 additions & 0 deletions ICINGA2_VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Version: 2.14.0
Revision: 1
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[![Build Status](https://travis-ci.org/Icinga/icinga2.svg?branch=master)](https://travis-ci.org/Icinga/icinga2)
[![Github Tag](https://img.shields.io/github/tag/Icinga/icinga2.svg)](https://github.com/Icinga/icinga2)

# Icinga 2
Expand Down
381 changes: 0 additions & 381 deletions RELEASE.md

This file was deleted.

2 changes: 0 additions & 2 deletions VERSION

This file was deleted.

13 changes: 0 additions & 13 deletions agent/windows-setup-agent/SetupWizard.Designer.cs
12 changes: 1 addition & 11 deletions agent/windows-setup-agent/SetupWizard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private string Icinga2InstanceName
if (props.DomainName != "")
fqdn += "." + props.DomainName;

return fqdn;
return fqdn.ToLower();
}
}

Expand Down Expand Up @@ -272,16 +272,6 @@ private void ConfigureService()
return;
}

if (chkInstallNSCP.Checked) {
SetConfigureStatus(85, "Waiting for NSClient++ installation to complete...");

Process proc = new Process();
proc.StartInfo.FileName = "msiexec.exe";
proc.StartInfo.Arguments = "/i \"" + Program.Icinga2InstallDir + "\\sbin\\NSCP.msi\"";
proc.Start();
proc.WaitForExit();
}

SetConfigureStatus(100, "Finished.");

// Override the completed text
Expand Down
63 changes: 0 additions & 63 deletions appveyor.yml

This file was deleted.

10 changes: 1 addition & 9 deletions choco/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+

if(WIN32)
find_program(CHOCO_BINARY choco)

configure_file(icinga2.nuspec.cmake icinga2.nuspec)
configure_file(chocolateyInstall.ps1.cmake chocolateyInstall.ps1)

add_custom_target(choco-pkg ALL
COMMAND choco pack
COMMAND ${CMAKE_COMMAND} -E rename ${CMAKE_CURRENT_BINARY_DIR}/icinga2.${ICINGA2_VERSION_SAFE}.nupkg ${CMAKE_CURRENT_BINARY_DIR}/icinga2.nupkg
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/icinga2.nuspec ${CMAKE_CURRENT_BINARY_DIR}/chocolateyInstall.ps1 chocolateyUninstall.ps1
)
configure_file(chocolateyInstall.ps1.template.cmake chocolateyInstall.ps1.template)
endif()
8 changes: 0 additions & 8 deletions choco/chocolateyInstall.ps1.cmake

This file was deleted.

20 changes: 20 additions & 0 deletions choco/chocolateyInstall.ps1.template.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
$packageName= 'icinga2'
$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)"
$url = 'https://packages.icinga.com/windows/Icinga2-v${CHOCO_VERSION_SHORT}-x86.msi'
$url64 = 'https://packages.icinga.com/windows/Icinga2-v${CHOCO_VERSION_SHORT}-x86_64.msi'

$packageArgs = @{
packageName = $packageName
fileType = 'msi'
url = $url
url64bit = $url64
silentArgs = "/qn /norestart"
validExitCodes= @(0)
softwareName = 'Icinga 2*'
checksum = '%CHOCO_32BIT_CHECKSUM%'
checksumType = 'sha256'
checksum64 = '%CHOCO_64BIT_CHECKSUM%'
checksumType64= 'sha256'
}

Install-ChocolateyPackage @packageArgs
13 changes: 8 additions & 5 deletions choco/icinga2.nuspec.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@
<authors>Icinga GmbH</authors>
<owners>Icinga GmbH</owners>
<summary>icinga2 - Monitoring Agent for Windows</summary>
<description>Icinga 2 is an open source monitoring platform which notifies users about host and service outages.</description>
<description>Icinga is an open source monitoring platform which notifies users about host and service outages.</description>
<projectUrl>https://icinga.com/</projectUrl>
<tags>icinga2 agent monitoring admin</tags>
<licenseUrl>https://icinga.com/resources/faq/</licenseUrl>
<tags>icinga2 icinga agent monitoring admin</tags>
<licenseUrl>https://github.com/Icinga/icinga2/blob/master/COPYING</licenseUrl>
<releaseNotes>https://github.com/Icinga/icinga2/blob/master/ChangeLog</releaseNotes>
<docsUrl>https://docs.icinga.com/icinga2/</docsUrl>
<docsUrl>https://icinga.com/docs/icinga2/latest/</docsUrl>
<bugTrackerUrl>https://github.com/Icinga/icinga2/issues</bugTrackerUrl>
<packageSourceUrl>https://github.com/Icinga/icinga2</packageSourceUrl>
<projectSourceUrl>https://github.com/Icinga/icinga2</projectSourceUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<iconUrl>https://icinga.com/wp-content/uploads/2015/05/icinga_icon_128x128.png</iconUrl>
<iconUrl>https://raw.githubusercontent.com/Icinga/icinga2/master/icinga-app/icinga.ico</iconUrl>
<dependencies>
<dependency id='netfx-4.6.2' />
</dependencies>
</metadata>
<files>
<file src="${CMAKE_CURRENT_BINARY_DIR}/chocolateyInstall.ps1" target="tools" />
Expand Down
1 change: 1 addition & 0 deletions config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#cmakedefine HAVE_SYSTEMD

#cmakedefine ICINGA2_UNITY_BUILD
#cmakedefine ICINGA2_STACKTRACE_USE_BACKTRACE_SYMBOLS

#define ICINGA_CONFIGDIR "${ICINGA2_FULL_CONFIGDIR}"
#define ICINGA_DATADIR "${ICINGA2_FULL_DATADIR}"
Expand Down
2 changes: 1 addition & 1 deletion doc/01-about.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ the availability of your network resources, notifies users of outages, and gener
performance data for reporting.

Scalable and extensible, Icinga can monitor large, complex environments across
multiple locations.
multiple locations. This includes your data center as well as your private, public, or hybrid clouds.

Icinga 2 is the monitoring server and requires [Icinga Web 2](https://icinga.com/products/)
on top in your Icinga Stack. The [configuration](https://icinga.com/products/configuration/)
Expand Down
1,355 changes: 428 additions & 927 deletions doc/02-installation.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions doc/02-installation.md.d/01-Debian.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Install Icinga 2 on Debian
<!-- {% set debian = True %} -->
<!-- {% include "02-installation.md" %} -->
3 changes: 3 additions & 0 deletions doc/02-installation.md.d/02-Ubuntu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Install Icinga 2 on Ubuntu
<!-- {% set ubuntu = True %} -->
<!-- {% include "02-installation.md" %} -->
3 changes: 3 additions & 0 deletions doc/02-installation.md.d/03-Raspbian.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Install Icinga 2 on Raspbian
<!-- {% set raspbian = True %} -->
<!-- {% include "02-installation.md" %} -->
3 changes: 3 additions & 0 deletions doc/02-installation.md.d/04-Fedora.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Install Icinga 2 on Fedora
<!-- {% set fedora = True %} -->
<!-- {% include "02-installation.md" %} -->
3 changes: 3 additions & 0 deletions doc/02-installation.md.d/05-CentOS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Install Icinga 2 on CentOS
<!-- {% set centos = True %} -->
<!-- {% include "02-installation.md" %} -->
3 changes: 3 additions & 0 deletions doc/02-installation.md.d/06-RHEL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Install Icinga 2 on RHEL
<!-- {% set rhel = True %} -->
<!-- {% include "02-installation.md" %} -->
3 changes: 3 additions & 0 deletions doc/02-installation.md.d/07-OpenSUSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Install Icinga 2 on openSUSE
<!-- {% set opensuse = True %} -->
<!-- {% include "02-installation.md" %} -->
3 changes: 3 additions & 0 deletions doc/02-installation.md.d/08-SLES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Install Icinga 2 on SLES
<!-- {% set sles = True %} -->
<!-- {% include "02-installation.md" %} -->
3 changes: 3 additions & 0 deletions doc/02-installation.md.d/09-Amazon-Linux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Install Icinga 2 on Amazon Linux
<!-- {% set amazon_linux = True %} -->
<!-- {% include "02-installation.md" %} -->
3 changes: 3 additions & 0 deletions doc/02-installation.md.d/10-Windows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Install Icinga 2 on Windows
<!-- {% set windows = True %} -->
<!-- {% include "02-installation.md" %} -->
563 changes: 303 additions & 260 deletions doc/03-monitoring-basics.md

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions doc/04-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ The `constants.conf` configuration file can be used to define global constants.

By default, you need to make sure to set these constants:

* The `PluginDir` constant must be set to the path where the [Monitoring Project plugins](02-installation.md#setting-up-check-plugins) are installed.
* The `PluginDir` constant must be set to the path where the [Monitoring Project](https://www.monitoring-plugins.org/) plugins are installed.
This constant is used by a number of
[built-in check command definitions](10-icinga-template-library.md#icinga-template-library).
* The `NodeName` constant defines your local node name. Should be set to FQDN which is the default
Expand Down Expand Up @@ -304,7 +304,7 @@ service apply rule defined in [services.conf](04-configuration.md#services-conf)
* define notification types (`mail`) and set the groups attribute. This
will be used by notification apply rules in [notifications.conf](04-configuration.md#notifications-conf).

If you've installed [Icinga Web 2](02-installation.md#setting-up-icingaweb2), you can
If you've installed [Icinga Web 2](https://icinga.com/docs/icinga-web-2/latest/doc/02-Installation/), you can
uncomment the http vhost attributes and reload Icinga 2. The apply
rules in [services.conf](04-configuration.md#services-conf) will automatically
generate a new service checking the `/icingaweb2` URI using the `http`
Expand Down Expand Up @@ -343,7 +343,7 @@ object Host NodeName {
vars.http_vhosts["http"] = {
http_uri = "/"
}
/* Uncomment if you've sucessfully installed Icinga Web 2. */
/* Uncomment if you've successfully installed Icinga Web 2. */
//vars.http_vhosts["Icinga Web 2"] = {
// http_uri = "/icingaweb2"
//}
Expand Down Expand Up @@ -428,7 +428,7 @@ evaluated for all objects of type `Host` and a new service with name "load"
is created for each matching host. [Expression operators](17-language-reference.md#expression-operators)
may be used in `assign where` conditions.

Multiple `assign where` condition can be combined with `AND` using the `&&` operator
Multiple `assign where` conditions can be combined with `AND` using the `&&` operator
as shown in the `ssh` example:

```
Expand Down Expand Up @@ -515,8 +515,7 @@ Look into [notifications.conf](04-configuration.md#notifications-conf) how this
for applying notifications to hosts and services using their type and user
attributes.

Don't forget to install the [check plugins](02-installation.md#setting-up-check-plugins) required by
the hosts and services and their check commands.
Don't forget to install the check plugins required by the hosts and services and their check commands.

Further details on the monitoring configuration can be found in the
[monitoring basics](03-monitoring-basics.md#monitoring-basics) chapter.
Expand Down
94 changes: 67 additions & 27 deletions doc/05-service-monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ by trying to run it on the console using whichever user Icinga 2 is running as:

RHEL/CentOS/Fedora

```
```bash
sudo -u icinga /usr/lib64/nagios/plugins/check_mysql_health --help
```

Debian/Ubuntu

```
```bash
sudo -u nagios /usr/lib/nagios/plugins/check_mysql_health --help
```

Expand Down Expand Up @@ -123,7 +123,7 @@ and reference this in the created CheckCommand objects.
Create a common directory e.g. `/opt/monitoring/plugins`
and install the plugin there.

```
```bash
mkdir -p /opt/monitoring/plugins
cp check_snmp_int.pl /opt/monitoring/plugins
chmod +x /opt/monitoring/plugins/check_snmp_int.pl
Expand Down Expand Up @@ -155,7 +155,7 @@ with the required parameters first.

Example for database size checks with [check_mysql_health](10-icinga-template-library.md#plugin-contrib-command-mysql_health).

```
```bash
/usr/lib64/nagios/plugins/check_mysql_health --hostname '127.0.0.1' --username root --password icingar0xx --mode sql --name 'select sum(data_length + index_length) / 1024 / 1024 from information_schema.tables where table_schema = '\''icinga'\'';' '--name2' 'db_size' --units 'MB' --warning 4096 --critical 8192
```

Expand Down Expand Up @@ -225,12 +225,12 @@ apply Service "db-size-" for (db_name => config in host.vars.databases) {
check_command = "mysql_health"
if (config.mysql_health_username) {
vars.mysql_healt_username = config.mysql_health_username
vars.mysql_health_username = config.mysql_health_username
} else {
vars.mysql_health_username = "root"
}
if (config.mysql_health_password) {
vars.mysql_healt_password = config.mysql_health_password
vars.mysql_health_password = config.mysql_health_password
} else {
vars.mysql_health_password = "icingar0xx"
}
Expand Down Expand Up @@ -520,7 +520,7 @@ add them to the argument parser.

Example for Python:

```
```python
import argparse
import signal
import sys
Expand All @@ -538,7 +538,7 @@ Users might call plugins only with the critical threshold parameter,
leaving out the warning parameter. Keep this in mind when evaluating
the thresholds, always check if the parameters have been defined before.

```
```python
if args.critical:
if ptc_value > args.critical:
print("CRITICAL - ...")
Expand Down Expand Up @@ -646,22 +646,53 @@ Icinga sets `LC_NUMERIC=C` to enforce this locale on plugin execution.

##### Unit of Measurement (UOM) <a id="service-monitoring-plugin-api-performance-data-metrics-uom"></a>

Unit | Description
---------|---------------------------------
None | Integer or floating point number for any type (processes, users, etc.).
`s` | Seconds, can be `s`, `ms`, `us`.
`%` | Percentage.
`B` | Bytes, can be `KB`, `MB`, `GB`, `TB`. Lowercase is also possible.
`c` | A continuous counter (e.g. interface traffic counters).

Icinga metric writers normalize these values to the lowest common base, e.g. seconds and bytes.
Bad plugins change the UOM for different sizing, e.g. returning the disk usage in MB and later GB
for the same performance data label. This is to ensure that graphs always look the same.

```
'rta'=12.445000ms 'pl'=0%
```

The UoMs are written as-is into the [core backends](14-features.md#core-backends)
(IDO, API). I.e. 12.445000ms remain 12.445000ms.

In contrast, the [metric backends](14-features.md#metrics)
(Graphite, InfluxDB, etc.) get perfdata (including warn, crit, min, max)
normalized by Icinga. E.g. 12.445000ms become 0.012445 seconds.

Some plugins change the UoM for different sizing, e.g. returning the disk usage in MB and later GB
for the same performance data label. This is to ensure that graphs always look the same.

[Icinga DB](14-features.md#core-backends-icingadb) gets both the as-is and the normalized perfdata.

What metric backends get... | ... from which perfdata UoMs (case-insensitive if possible)
----------------------------|---------------------------------------
bytes (B) | B, KB, MB, ..., YB, KiB, MiB, ..., YiB
bits (b) | b, kb, mb, ..., yb, kib, mib, ..., yib
packets | packets
seconds (s) | ns, us, ms, s, m, h, d
percent | %
amperes (A) | nA, uA, mA, A, kA, MA, GA, ..., YA
ohms (O) | nO, uO, mO, O, kO, MO, GO, ..., YO
volts (V) | nV, uV, mV, V, kV, MV, GV, ..., YV
watts (W) | nW, uW, mW, W, kW, MW, GW, ..., YW
ampere seconds (As) | nAs, uAs, mAs, As, kAs, MAs, GAs, ..., YAs
ampere seconds | nAm, uAm, mAm, Am (ampere minutes), kAm, MAm, GAm, ..., YAm
ampere seconds | nAh, uAh, mAh, Ah (ampere hours), kAh, MAh, GAh, ..., YAh
watt hours | nWs, uWs, mWs, Ws (watt seconds), kWs, MWs, GWs, ..., YWs
watt hours | nWm, uWm, mWm, Wm (watt minutes), kWm, MWm, GWm, ..., YWm
watt hours (Wh) | nWh, uWh, mWh, Wh, kWh, MWh, GWh, ..., YWh
lumens | lm
decibel-milliwatts | dBm
grams (g) | ng, ug, mg, g, kg, t
degrees Celsius | C
degrees Fahrenheit | F
degrees Kelvin | K
liters (l) | ml, l, hl

The UoM "c" represents a continuous counter (e.g. interface traffic counters).

Unknown UoMs are discarted (as if none was given).
A value without any UoM may be an integer or floating point number
for any type (processes, users, etc.).

##### Thresholds and Min/Max <a id="service-monitoring-plugin-api-performance-data-metrics-thresholds-min-max"></a>

Next to the performance data value, warn, crit, min, max can optionally be provided. They must be separated
Expand Down Expand Up @@ -693,7 +724,7 @@ and provide a clear message followed by the Unknown state.

Example in Python taken from [check_tinkerforge](https://github.com/NETWAYS/check_tinkerforge/blob/master/check_tinkerforge.py):

```
```python
import argparse
import signal
import sys
Expand Down Expand Up @@ -721,7 +752,7 @@ too old or new versions on the community support channels.

Example in Python taken from [check_tinkerforge](https://github.com/NETWAYS/check_tinkerforge/blob/master/check_tinkerforge.py):

```
```python
import argparse
import signal
import sys
Expand All @@ -745,7 +776,7 @@ the plugin.

Example in Python taken from [check_tinkerforge](https://github.com/NETWAYS/check_tinkerforge/blob/master/check_tinkerforge.py):

```
```python
import argparse
import signal
import sys
Expand Down Expand Up @@ -867,11 +898,20 @@ Instead, choose a plugin and configure its parameters and thresholds. The follow
* [running_kernel](10-icinga-template-library.md#plugin-contrib-command-running_kernel)
* package management: [apt](10-icinga-template-library.md#plugin-check-command-apt), [yum](10-icinga-template-library.md#plugin-contrib-command-yum), etc.
* [ssh](10-icinga-template-library.md#plugin-check-command-ssh)
* performance: [iostat](10-icinga-template-library.md#plugin-contrib-command-iostat), [check_sar_perf](https://github.com/dnsmichi/icinga-plugins/blob/master/scripts/check_sar_perf.py)
* performance: [iostat](10-icinga-template-library.md#plugin-contrib-command-iostat), [check_sar_perf](https://github.com/NETWAYS/check-sar-perf)

### Windows Monitoring <a id="service-monitoring-windows"></a>

* [check_wmi_plus](http://www.edcint.co.nz/checkwmiplus/)
!!! important

[Icinga for Windows](https://icinga.com/docs/icinga-for-windows/latest/doc/000-Introduction/)
is the recommended way to monitor Windows via Icinga 2.
Even if the plugins it ships out-of-the-box don't already cover your needs, you can
[create your own](https://icinga.com/docs/icinga-for-windows/latest/doc/900-Developer-Guide/11-Custom-Plugins/).

Other (legacy) solutions include:

* [check_wmi_plus](https://edcint.co.nz/checkwmiplus/)
* [NSClient++](https://www.nsclient.org) (in combination with the Icinga 2 client and either [check_nscp_api](10-icinga-template-library.md#nscp-check-api) or [nscp-local](10-icinga-template-library.md#nscp-plugin-check-commands) check commands)
* [Icinga 2 Windows Plugins](10-icinga-template-library.md#windows-plugins) (disk, load, memory, network, performance counters, ping, procs, service, swap, updates, uptime, users
* vbs and Powershell scripts
Expand Down Expand Up @@ -929,7 +969,7 @@ Instead, choose a plugin and configure its parameters and thresholds. The follow
### Log Monitoring <a id="service-monitoring-log"></a>

* [check_logfiles](https://labs.consol.de/nagios/check_logfiles/)
* [check_logstash](https://github.com/widhalmt/check_logstash)
* [check_logstash](https://github.com/NETWAYS/check_logstash)
* [check_graylog2_stream](https://github.com/Graylog2/check-graylog2-stream)

### Virtualization Monitoring <a id="service-monitoring-virtualization"></a>
Expand All @@ -943,7 +983,7 @@ Instead, choose a plugin and configure its parameters and thresholds. The follow
**Tip**: If you are encountering timeouts using the VMware Perl SDK,
check [this blog entry](https://www.claudiokuenzler.com/blog/650/slow-vmware-perl-sdk-soap-request-error-libwww-version).
Ubuntu 16.04 LTS can have troubles with random entropy in Perl asked [here](https://monitoring-portal.org/t/check-vmware-api-slow-when-run-multiple-times/2868).
In that case, [haveged](http://issihosts.com/haveged/) may help.
In that case, [haveged](https://issihosts.com/haveged/) may help.

### SAP Monitoring <a id="service-monitoring-sap"></a>

Expand Down
156 changes: 64 additions & 92 deletions doc/06-distributed-monitoring.md

Large diffs are not rendered by default.

23 changes: 10 additions & 13 deletions doc/07-agent-based-monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ Key benefits:
Follow the setup and configuration instructions [here](06-distributed-monitoring.md#distributed-monitoring-setup-agent-satellite).

On Windows hosts, the Icinga agent can query a local NSClient++ service
for additional checks in case there are no plugins available. The NSCP
installer is bundled with Icinga and can be installed with the setup wizard.
for additional checks in case there are no plugins available.

![Icinga 2 Windows Setup](images/distributed-monitoring/icinga2_windows_setup_wizard_01.png)

Expand All @@ -64,7 +63,7 @@ an arbitrary plugin command line. The output and exit code is
returned and used by the core.

The `check_by_ssh` plugin takes care of this. It is available in the
[Monitoring Plugins package](02-installation.md#setting-up-check-plugins).
[Monitoring Plugins](https://www.monitoring-plugins.org/) package.
For your convenience, the Icinga template library provides the [by_ssh](10-icinga-template-library.md#plugin-check-command-by-ssh)
CheckCommand already.

Expand All @@ -73,15 +72,15 @@ CheckCommand already.
SSH key pair for the Icinga daemon user. In case the user has no shell, temporarily enable this.
When asked for a passphrase, **do not set it** and press enter.

```
```bash
sudo su - icinga

ssh-keygen -b 4096 -t rsa -C "icinga@$(hostname) user for check_by_ssh" -f $HOME/.ssh/id_rsa
```

On the remote agent, create the icinga user and generate a temporary password.

```
```bash
useradd -m icinga
passwd icinga
```
Expand All @@ -90,7 +89,7 @@ Copy the public key from the Icinga server to the remote agent, e.g. with `ssh-c
or manually into `/home/icinga/.ssh/authorized_keys`.
This will ask for the password once.

```
```bash
sudo su - icinga

ssh-copy-id -i $HOME/.ssh/id_rsa icinga@ssh-agent1.localdomain
Expand All @@ -100,7 +99,7 @@ After the SSH key is copied, test at the connection **at least once** and
accept the host key verification. If you forget about this step, checks will
become UNKNOWN later.

```
```bash
ssh -i $HOME/.ssh/id_rsa icinga@ssh-agent1.localdomain
```

Expand Down Expand Up @@ -171,7 +170,7 @@ A more advanced example with better arguments is shown in [this blogpost](https:
## SNMP <a id="agent-based-checks-snmp"></a>

The SNMP daemon runs on the remote system and answers SNMP queries by plugin scripts.
The [Monitoring Plugins package](02-installation.md#setting-up-check-plugins) provides
The [Monitoring Plugins](https://www.monitoring-plugins.org/) package provides
the `check_snmp` plugin binary, but there are plenty of [existing plugins](05-service-monitoring.md#service-monitoring-plugins)
for specific use cases already around, for example monitoring Cisco routers.

Expand Down Expand Up @@ -273,7 +272,7 @@ Create the `coldstart_reset_event.sh` shell script to pass the expanded variable
data in. The `$service.state_id$` is important in order to prevent an endless loop
of event firing after the service has been reset.

```
```bash
#!/bin/bash

SERVICE_STATE_ID=""
Expand Down Expand Up @@ -475,13 +474,11 @@ For details on the `NSClient++` configuration please refer to the [official docu

## WMI on Windows <a id="agent-based-checks-wmi"></a>

The most popular plugin is [check_wmi_plus](http://edcint.co.nz/checkwmiplus/).
The most popular plugin is [check_wmi_plus](https://edcint.co.nz/checkwmiplus/).

> Check WMI Plus uses the Windows Management Interface (WMI) to check for common services (cpu, disk, sevices, eventlog…) on Windows machines. It requires the open source wmi client for Linux.
Community examples:

* [Icinga 2 check_wmi_plus example by 18pct](http://18pct.com/icinga2-check_wmi_plus-example/)
* [Icinga 2 check_wmi_plus example by 18pct](https://18pct.com/icinga2-check_wmi_plus-example/)
* [Agent-less monitoring with WMI](https://www.devlink.de/linux/icinga2-nagios-agentless-monitoring-von-windows/)


24 changes: 20 additions & 4 deletions doc/08-advanced-topics.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ If you want to specify a notification period across midnight,
you can define it the following way:

```
object Timeperiod "across-midnight" {
object TimePeriod "across-midnight" {
display_name = "Nightly Notification"
ranges = {
"saturday" = "22:00-24:00"
Expand All @@ -275,7 +275,7 @@ the first day as start with an overlapping range into
the next day:

```
object Timeperiod "do-not-disturb" {
object TimePeriod "do-not-disturb" {
display_name = "Weekend DND"
ranges = {
"saturday" = "22:00-06:00"
Expand All @@ -290,7 +290,7 @@ days, weeks or months. This can be useful when taking components offline
for a distinct period of time.

```
object Timeperiod "standby" {
object TimePeriod "standby" {
display_name = "Standby"
ranges = {
"2016-09-30 - 2016-10-30" = "00:00-24:00"
Expand Down Expand Up @@ -376,6 +376,19 @@ object TimePeriod "prod-notification" {
}
```

### Time zone handling <a id="timeperiods-timezones"></a>

Icinga 2 takes the OS' time zone including DST changes into account.

Times inside DST changes are interpreted as before the DST changes.
I.e. for the time zone Europe/Berlin:

* On 2020-10-25 03:00 CEST the time jumps back to 02:00 CET.
For Icinga 02:30 means 02:30 CEST.
* On 2021-02-28 02:00 CET the time jumps forward to 03:00 CEST.
For Icinga (the actually not existing) 02:30 refers to CET
and effectively means 03:30 CEST.

## External Passive Check Results <a id="external-check-results"></a>

Hosts or services which do not actively execute a check plugin to receive
Expand Down Expand Up @@ -468,6 +481,8 @@ when a [host](09-object-types.md#objecttype-host) or [service](09-object-types.m
The default thresholds are 30% for high and 25% for low. If the computed flapping value exceeds the high threshold a
host or service is considered flapping until it drops below the low flapping threshold.

The attribute `flapping_ignore_states` allows to ignore state changes to specified states during the flapping calculation.

`FlappingStart` and `FlappingEnd` notifications will be sent out accordingly, if configured. See the chapter on
[notifications](alert-notifications) for details

Expand Down Expand Up @@ -975,7 +990,7 @@ The more programmatic approach for `set_if` could look like this:
if (typeof(srv_vars.compellent) == Dictionary) {
return srv_vars.compellent.contains("disks")
} else {
log(LogInformationen, "checkcommand set_if", "custom variable compellent_checks is not a dictionary, ignoring it.")
log(LogInformation, "checkcommand set_if", "custom variable compellent_checks is not a dictionary, ignoring it.")
return false
}
} else {
Expand Down Expand Up @@ -1165,6 +1180,7 @@ to represent its internal state. The following types are exposed via the [API](1
output | String | The check output.
performance\_data | Array | Array of [performance data values](08-advanced-topics.md#advanced-value-types-perfdatavalue).
check\_source | String | Name of the node executing the check.
scheduling\_source | String | Name of the node scheduling the check.
state | Number | The current state (0 = OK, 1 = WARNING, 2 = CRITICAL, 3 = UNKNOWN).
command | Value | Array of command with shell-escaped arguments or command line string.
execution\_start | Timestamp | Check execution start time (as a UNIX timestamp).
Expand Down
258 changes: 183 additions & 75 deletions doc/09-object-types.md

Large diffs are not rendered by default.

394 changes: 343 additions & 51 deletions doc/10-icinga-template-library.md

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions doc/11-cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,28 +75,28 @@ You need to install the `bash-completion` package if not already installed.

RHEL/CentOS/Fedora:

```
# yum install bash-completion
```bash
yum install bash-completion
```

SUSE:

```
# zypper install bash-completion
```bash
zypper install bash-completion
```

Debian/Ubuntu:

```
# apt-get install bash-completion
```bash
apt-get install bash-completion
```

Ensure that the `bash-completion.d` directory is added to your shell
environment. You can manually source the icinga2 bash-completion file
into your current session and test it:

```
# source /etc/bash-completion.d/icinga2
```bash
source /etc/bash-completion.d/icinga2
```


Expand Down Expand Up @@ -305,8 +305,8 @@ On operating systems without the `libedit` library installed there is no
support for line-editing or a command history. However you can
use the `rlwrap` program if you require those features:

```
$ rlwrap icinga2 console
```bash
rlwrap icinga2 console
```

The debug console can be used to connect to a running Icinga 2 instance using
Expand Down Expand Up @@ -430,6 +430,7 @@ Command options:
-c [ --config ] arg parse a configuration file
-z [ --no-config ] start without a configuration file
-C [ --validate ] exit after validating the configuration
--dump-objects write icinga2.debug cache file for icinga2 object list
-e [ --errorlog ] arg log fatal errors to the specified log file (only
works in combination with --daemonize or
--close-stdio)
Expand Down Expand Up @@ -520,10 +521,9 @@ attributes. The command also shows where each of the attributes was modified and
provides debug information for further configuration problem analysis.
That way you can also identify which objects have been created from your [apply rules](17-language-reference.md#apply).

Runtime modifications via the [REST API](12-icinga2-api.md#icinga2-api-config-objects)
are not immediately updated. Furthermore there is a known issue with
Configuration modifications are not immediately updated. Furthermore there is a known issue with
[group assign expressions](17-language-reference.md#group-assign) which are not reflected in the host object output.
You need to restart Icinga 2 in order to update the `icinga2.debug` cache file.
You need to run `icinga2 daemon -C --dump-objects` in order to update the `icinga2.debug` cache file.

More information can be found in the [troubleshooting](15-troubleshooting.md#troubleshooting-list-configuration-objects) section.

Expand Down Expand Up @@ -725,8 +725,8 @@ Every time you have changed your configuration you should first tell Icinga 2
to [validate](11-cli-commands.md#config-validation). If there are no validation errors, you can
safely reload the Icinga 2 daemon.

```
# systemctl reload icinga2
```bash
systemctl reload icinga2
```

The `reload` action will send the `SIGHUP` signal to the Icinga 2 daemon
Expand Down
563 changes: 397 additions & 166 deletions doc/12-icinga2-api.md

Large diffs are not rendered by default.

76 changes: 67 additions & 9 deletions doc/13-addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,59 @@
For an uptodate overview of all integrations and modules,
please visit [https://icinga.com/products/](https://icinga.com/products/).

## Syntax Highlighting <a id="configuration-syntax-highlighting"></a>

Icinga 2 provides configuration examples for syntax highlighting using the `vim` and `nano` editors.

### Using Vim <a id="configuration-syntax-highlighting-vim"></a>

Install the package `vim-icinga2` with your distribution's package manager.

Ensure that syntax highlighting is enabled e.g. by editing the user's `vimrc`
configuration file:

```
# vim ~/.vimrc
syntax on
```

Test it:

```bash
vim /etc/icinga2/conf.d/templates.conf
```

![Vim with syntax highlighting](images/addons/vim-syntax.png "Vim with Icinga 2 syntax highlighting")


### Using Nano <a id="configuration-syntax-highlighting-nano"></a>

Install the package `nano-icinga2` with your distribution's package manager.

**Note:** On Debian, Ubuntu and Raspbian, the syntax files are installed with the `icinga2-common` package already.

Copy the `/etc/nanorc` sample file to your home directory.

```bash
cp /etc/nanorc ~/.nanorc
```

Include the `icinga2.nanorc` file.

```
$ vim ~/.nanorc
## Icinga 2
include "/usr/share/nano/icinga2.nanorc"
```

Test it:

```bash
nano /etc/icinga2/conf.d/templates.conf
```

![Nano with syntax highlighting](images/addons/nano-syntax.png "Nano with Icinga 2 syntax highlighting")

## Icinga Reporting <a id="addons-reporting"></a>

Expand Down Expand Up @@ -40,8 +93,8 @@ You need to install Graphite first, then proceed with configuring it in Icinga 2
Use the [GraphiteWriter](14-features.md#graphite-carbon-cache-writer) feature
for sending real-time metrics from Icinga 2 to Graphite.

```
# icinga2 feature enable graphite
```bash
icinga2 feature enable graphite
```

A popular alternative frontend for Graphite is for example [Grafana](https://grafana.org).
Expand All @@ -57,10 +110,17 @@ Integration in Icinga Web 2 is possible by installing the official [graphite mod
It’s written in Go and has no external dependencies.

Use the [InfluxdbWriter](14-features.md#influxdb-writer) feature
for sending real-time metrics from Icinga 2 to InfluxDB.
for sending real-time metrics from Icinga 2 to InfluxDB v1.

```bash
icinga2 feature enable influxdb
```
# icinga2 feature enable influxdb

Use the [Influxdb2Writer](14-features.md#influxdb-writer) feature
for sending real-time metrics from Icinga 2 to InfluxDB v2.

```bash
icinga2 feature enable influxdb2
```

A popular frontend for InfluxDB is for example [Grafana](https://grafana.org).
Expand All @@ -86,13 +146,13 @@ data files which Icinga 2 generates.

Enable performance data writer in icinga 2

```
# icinga2 feature enable perfdata
```bash
icinga2 feature enable perfdata
```

Configure npcd to use the performance data created by Icinga 2:

```
```bash
vim /etc/pnp4nagios/npcd.cfg
```

Expand Down Expand Up @@ -196,5 +256,3 @@ Checkout these specific integrations:

If you're looking for different config management integrations -- we're happy
to add them upstream, so please get in touch with the [Icinga team](https://icinga.com/community/).


907 changes: 553 additions & 354 deletions doc/14-features.md

Large diffs are not rendered by default.

494 changes: 289 additions & 205 deletions doc/15-troubleshooting.md

Large diffs are not rendered by default.

87 changes: 74 additions & 13 deletions doc/16-upgrading-icinga-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,66 @@ Specific version upgrades are described below. Please note that version
updates are incremental. An upgrade from v2.6 to v2.8 requires to
follow the instructions for v2.7 too.

## Upgrading to v2.14 <a id="upgrading-to-2-14"></a>

### Dependencies and Redundancy Groups <a id="upgrading-to-2-14-dependencies"></a>

Before Icinga v2.12 all dependencies were cumulative.
I.e. the child was considered reachable only if no dependency was violated.
In v2.12 and v2.13, all dependencies were redundant.
I.e. the child was considered unreachable only if no dependency was fulfilled.

v2.14 restores the pre-v2.12 behavior, but allows to override it.
I.e. you can still make any number of your dependencies redundant, as you wish.
For details read the docs' [redundancy groups section](03-monitoring-basics.md#dependencies-redundancy-groups).

### Email Notification Scripts <a id="upgrading-to-2-14-email-notification"></a>

The email notification scripts shipped with Icinga 2 (/etc/icinga2/scripts)
now link to Icinga DB Web, not the monitoring module.
Both new and existing installations are affected unless you've altered the scripts.

In the latter case package managers won't upgrade those "config" files in-place,
but just put files with similar names into the same directory.
This allows you to patch them by yourself based on diff(1).

On the other hand, if you want to stick to the monitoring module for now,
add any comments to the notification scripts before upgrading.
This way package managers won't touch those files.

## Upgrading to v2.13 <a id="upgrading-to-2-13"></a>

### DB IDO Schema Update <a id="upgrading-to-2-13-db-ido"></a>

There is an optional schema update on MySQL which increases the max length of object names from 128 to 255 characters.

Please proceed here for the [MySQL upgrading docs](16-upgrading-icinga-2.md#upgrading-mysql-db).

### Behavior changes <a id="upgrading-to-2-13-behavior-changes"></a>

#### Deletion of child downtimes on services

Service downtimes created while using the `all_services` flag on the [schedule-downtime](12-icinga2-api.md#schedule-downtime) API action
will now automatically be deleted when deleting the hosts downtime.

#### Windows Event Log

Icinga 2.13 now supports logging to the Windows Event Log. Icinga will now also log messages from the early
startup phase to the Windows Event Log. These were previously missing from the log file and you could only
see them by manually starting Icinga in the foreground.

This feature is now enabled and replaces the existing mainlog feature logging to a file. When upgrading, the installer
will enable the windowseventlog feature and disable the mainlog feature. Logging to a file is still possible.
If you don't want this configuration migration on upgrade, you can opt-out by installing
the `%ProgramData%\icinga2\etc\icinga2\features-available\windowseventlog.conf` file before upgrading to Icinga 2.13.

#### Broken API package name validation

This version has replaced a broken regex in the API package validation code which results in package names
now being validated correctly. Package names should now only consist of alphanumeric characters, dashes and underscores.

This change only applies to newly created packages to support already existing ones.

## Upgrading to v2.12 <a id="upgrading-to-2-12"></a>

* CLI
Expand Down Expand Up @@ -51,7 +111,7 @@ config files for the zone(s). **If your config master is 2.11.x already, you are

In order to fix this, upgrade to at least 2.11.1, and purge away the local config sync storage once, then restart.

```
```bash
yum install icinga2

rm -rf /var/lib/icinga2/api/zones/*
Expand All @@ -75,7 +135,7 @@ EOL distributions where no packages are available with this release:
* RHEL/CentOS 6 x86

Raspbian Packages are available inside the `icinga-buster` repository
on [https://packages.icinga.com](http://packages.icinga.com/raspbian/).
on [https://packages.icinga.com](https://packages.icinga.com/raspbian/).
Please note that Stretch is not supported suffering from compiler
regressions. Upgrade to Raspbian Buster is highly recommended.

Expand All @@ -87,11 +147,12 @@ details, please continue reading in [this issue](https://github.com/Icinga/icing

Distribution | Repository providing Boost Dependencies
---------------------|-------------------------------------
RHEL/CentOS 7 | [EPEL repository](02-installation.md#package-repositories-rhel-epel)
CentOS 7 | [EPEL repository](02-installation.md#centos-repository)
RHEL 7 | [EPEL repository](02-installation.md#rhel-repository)
RHEL/CentOS 6 x64 | [packages.icinga.com](https://packages.icinga.com)
Fedora | Fedora Upstream
Debian 10 Buster | Debian Upstream
Debian 9 Stretch | [Backports repository](02-installation.md#package-repositories-debian-backports) **New since 2.11**
Debian 9 Stretch | [Backports repository](02-installation.md#debian-backports-repository) **New since 2.11**
Debian 8 Jessie | [packages.icinga.com](https://packages.icinga.com)
Ubuntu 18 Bionic | [packages.icinga.com](https://packages.icinga.com)
Ubuntu 16 Xenial | [packages.icinga.com](https://packages.icinga.com)
Expand Down Expand Up @@ -872,10 +933,10 @@ $ ls /usr/share/icinga2-ido-mysql/schema/upgrade/
There are two new upgrade files called `2.5.0.sql`, `2.6.0.sql` and `2.8.0.sql`
which must be applied incrementally to your IDO database.

```
# mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/upgrade/2.5.0.sql
# mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/upgrade/2.6.0.sql
# mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/upgrade/2.8.0.sql
```bash
mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/upgrade/2.5.0.sql
mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/upgrade/2.6.0.sql
mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/upgrade/2.8.0.sql
```

## Upgrading the PostgreSQL database <a id="upgrading-postgresql-db"></a>
Expand Down Expand Up @@ -908,9 +969,9 @@ $ ls /usr/share/icinga2-ido-pgsql/schema/upgrade/
There are two new upgrade files called `2.5.0.sql`, `2.6.0.sql` and `2.8.0.sql`
which must be applied incrementally to your IDO database.

```
# export PGPASSWORD=icinga
# psql -U icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/upgrade/2.5.0.sql
# psql -U icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/upgrade/2.6.0.sql
# psql -U icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/upgrade/2.8.0.sql
```bash
export PGPASSWORD=icinga
psql -U icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/upgrade/2.5.0.sql
psql -U icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/upgrade/2.6.0.sql
psql -U icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/upgrade/2.8.0.sql
```
6 changes: 3 additions & 3 deletions doc/17-language-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ Operator | Precedence | Examples (Result) | Descript
`&` | 9 | 7 & 3 (3) | Binary AND
`^` | 10 | 17 ^ 12 (29) | Bitwise XOR
<code>&#124;</code> | 11 | 2 &#124; 3 (3) | Binary OR
<code>&#124;&#124;</code> | 12 | true &#124;&#124; false (true), 0 &#124;&#124; 7 (7)| Logical OR
`&&` | 13 | true && false (false), 3 && 7 (7), 0 && 7 (0) | Logical AND
`&&` | 12 | true && false (false), 3 && 7 (7), 0 && 7 (0) | Logical AND
<code>&#124;&#124;</code> | 13 | true &#124;&#124; false (true), 0 &#124;&#124; 7 (7)| Logical OR
`=` | 14 | a = 3 | Assignment
`=>` | 15 | x => x * x (function with arg x) | Lambda, for loop
`?` | 16 | (2 * 3 > 5) ? 1 : 0 (1) | [Ternary operator](17-language-reference.md#conditional-statements-ternary)
Expand Down Expand Up @@ -504,7 +504,7 @@ Environment |**Read-write.** The name of the Icinga environment. Include
RunAsUser |**Read-write.** Defines the user the Icinga 2 daemon is running as. Set in the Icinga 2 sysconfig.
RunAsGroup |**Read-write.** Defines the group the Icinga 2 daemon is running as. Set in the Icinga 2 sysconfig.
MaxConcurrentChecks |**Read-write.** The number of max checks run simultaneously. Defaults to `512`.
ApiBindHost |**Read-write.** Overrides the default value for the ApiListener `bind_host` attribute. Not set by default.
ApiBindHost |**Read-write.** Overrides the default value for the ApiListener `bind_host` attribute. Defaults to `::` if IPv6 is supported by the operating system and to `0.0.0.0` otherwise.
ApiBindPort |**Read-write.** Overrides the default value for the ApiListener `bind_port` attribute. Not set by default.

#### Application Runtime Constants <a id="icinga-constants-application-runtime"></a>
Expand Down
Loading