From 245cb0e9301ebf89bd7e3a572e3a1aefd6d3dbcd Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 1 Feb 2017 12:56:53 +0100 Subject: [PATCH 01/19] Fix crash in ConfigItem::RemoveIgnoredItems fixes #4952 --- lib/config/configitem.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/lib/config/configitem.cpp b/lib/config/configitem.cpp index 4bafd3d02..86f3118e3 100644 --- a/lib/config/configitem.cpp +++ b/lib/config/configitem.cpp @@ -657,8 +657,7 @@ std::vector ConfigItem::GetItems(const String& type) items.reserve(it->second.size()); - for (const ItemMap::value_type& kv : it->second) - { + for (const ItemMap::value_type& kv : it->second) { items.push_back(kv.second); } @@ -678,8 +677,7 @@ std::vector ConfigItem::GetDefaultTemplates(const String& type) items.reserve(it->second.size()); - for (const ItemMap::value_type& kv : it->second) - { + for (const ItemMap::value_type& kv : it->second) { items.push_back(kv.second); } @@ -697,12 +695,7 @@ void ConfigItem::RemoveIgnoredItems(const String& allowedConfigPath) Log(LogNotice, "ConfigItem") << "Removing ignored item path '" << path << "'."; - if (unlink(path.CStr()) < 0) { - BOOST_THROW_EXCEPTION(posix_error() - << boost::errinfo_api_function("unlink") - << boost::errinfo_errno(errno) - << boost::errinfo_file_name(path)); - } + (void) unlink(path.CStr()); } m_IgnoredItems.clear(); From 975f78f562c00b044092c35b10059295b8d06d1c Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 13 Feb 2017 10:51:27 +0100 Subject: [PATCH 02/19] Release version 2.6.2 --- ChangeLog | 11 +++++++++++ RELEASE.md | 39 ++++++--------------------------------- doc/1-about.md | 11 +++++++++++ icinga2.spec | 2 +- 4 files changed, 29 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8dbed58ce..84393593d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,17 @@ Please check [doc/1-about.md]. ## What's New +### What's New in Version 2.6.2 + +#### Changes + +This is a bugfix release which addresses a crash that can occur when removing +configuration files for objects which have been deleted via the API. + +#### Bugfixes + +* Bug 4952 (API): Icinga crashes while trying to remove configuration files for objects which no longer exist + ### What's New in Version 2.6.1 #### Changes diff --git a/RELEASE.md b/RELEASE.md index 7a2c1d114..63bbd9c89 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -4,7 +4,7 @@ Print this document. Specify the release version. - VERSION=2.6.1 + VERSION=2.6.2 ## Issues @@ -12,22 +12,8 @@ Check issues at https://github.com/Icinga/icinga2 ## Backport Commits - $ git checkout master - $ ./pick.py -V $VERSION - -The script creates a new branch 'auto-merged-' which is based on the -current support branch. It then merges all commits from the 'master' branch which -reference a ticket for the version that was specified. - -If there are any merge commits you will need to manually fix them and continue the -rebase until no commits are left: - - $ git rebase --continue - -After finishing the rebase the branch needs to be merged into the support branch: - - $ git checkout support/2.6 - $ git merge --ff-only auto-merged-2.6.1 +For minor versions you need to manually backports any and all commits from the +master branch which should be part of this release. ## Authors @@ -48,21 +34,8 @@ Example: ## Changelog -Update the [ChangeLog](ChangeLog), [doc/1-about.md](doc/1-about.md) files using -the changelog.py script. Also generate HTML for the wordpress release announcement. -You need to copy and paste the output manually. - -Changelog: - - $ ./changelog.py -V $VERSION - -Docs: - - $ ./changelog.py -V $VERSION -l - -Wordpress: - - $ ./changelog.py -V $VERSION -H -l +Update the [ChangeLog](ChangeLog), [doc/1-about.md](doc/1-about.md) files. Also generate HTML +for the wordpress release announcement. ## Git Tag @@ -146,7 +119,7 @@ Create the nupkg package: Install the created icinga2 package locally: - choco install icinga2 -version 2.6.1 -fdv "%cd%" -source "'%cd%;https://chocolatey.org/api/v2/'" + choco install icinga2 -version 2.6.2 -fdv "%cd%" -source "'%cd%;https://chocolatey.org/api/v2/'" Upload the package to [chocolatey](https://chocolatey.org/packages/upload). diff --git a/doc/1-about.md b/doc/1-about.md index 7b466bb51..4a1ba379e 100644 --- a/doc/1-about.md +++ b/doc/1-about.md @@ -44,6 +44,17 @@ file. ## What's New +### What's New in Version 2.6.2 + +#### Changes + +This is a bugfix release which addresses a crash that can occur when removing +configuration files for objects which have been deleted via the API. + +#### Bugfixes + +* Bug 4952 (API): Icinga crashes while trying to remove configuration files for objects which no longer exist + ### What's New in Version 2.6.1 #### Changes diff --git a/icinga2.spec b/icinga2.spec index e4ff1cec1..2204d6055 100644 --- a/icinga2.spec +++ b/icinga2.spec @@ -66,7 +66,7 @@ Summary: Network monitoring application Name: icinga2 -Version: 2.6.1 +Version: 2.6.2 Release: %{revision}%{?dist} License: GPL-2.0+ Group: Applications/System From b3be7b1d0827f7fae47e60430de17373294f2890 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Wed, 22 Feb 2017 16:32:17 +0100 Subject: [PATCH 03/19] Add more debug build logging to IDO MySQL refs #4603 --- lib/db_ido_mysql/idomysqlconnection.cpp | 74 +++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/lib/db_ido_mysql/idomysqlconnection.cpp b/lib/db_ido_mysql/idomysqlconnection.cpp index 34969c3a0..c3e9cdce3 100644 --- a/lib/db_ido_mysql/idomysqlconnection.cpp +++ b/lib/db_ido_mysql/idomysqlconnection.cpp @@ -101,6 +101,11 @@ void IdoMysqlConnection::Pause(void) DbConnection::Pause(); +#ifdef I2_DEBUG /* I2_DEBUG */ + Log(LogDebug, "IdoMysqlConnection") + << "Rescheduling disconnect task."; +#endif /* I2_DEBUG */ + m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::Disconnect, this), PriorityHigh); m_QueryQueue.Join(); } @@ -144,6 +149,11 @@ void IdoMysqlConnection::TxTimerHandler(void) void IdoMysqlConnection::NewTransaction(void) { +#ifdef I2_DEBUG /* I2_DEBUG */ + Log(LogDebug, "IdoMysqlConnection") + << "Scheduling new transaction and finishing async queries."; +#endif /* I2_DEBUG */ + m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalNewTransaction, this), PriorityHigh); m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::FinishAsyncQueries, this), PriorityHigh); } @@ -161,6 +171,11 @@ void IdoMysqlConnection::InternalNewTransaction(void) void IdoMysqlConnection::ReconnectTimerHandler(void) { +#ifdef I2_DEBUG /* I2_DEBUG */ + Log(LogDebug, "IdoMysqlConnection") + << "Scheduling reconnect task."; +#endif /* I2_DEBUG */ + m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::Reconnect, this), PriorityLow); } @@ -414,6 +429,11 @@ void IdoMysqlConnection::Reconnect(void) UpdateAllObjects(); +#ifdef I2_DEBUG /* I2_DEBUG */ + Log(LogDebug, "IdoMysqlConnection") + << "Scheduling session table clear and finish connect task."; +#endif /* I2_DEBUG */ + m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::ClearTablesBySession, this), PriorityLow); m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::FinishConnect, this, startTime), PriorityLow); @@ -677,6 +697,11 @@ void IdoMysqlConnection::DiscardRows(const IdoMysqlResult& result) void IdoMysqlConnection::ActivateObject(const DbObject::Ptr& dbobj) { +#ifdef I2_DEBUG /* I2_DEBUG */ + Log(LogDebug, "IdoMysqlConnection") + << "Scheduling object activation task for '" << dbobj->GetName1() << "!" << dbobj->GetName2() << "'."; +#endif /* I2_DEBUG */ + m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalActivateObject, this, dbobj), PriorityLow); } @@ -711,6 +736,11 @@ void IdoMysqlConnection::InternalActivateObject(const DbObject::Ptr& dbobj) void IdoMysqlConnection::DeactivateObject(const DbObject::Ptr& dbobj) { +#ifdef I2_DEBUG /* I2_DEBUG */ + Log(LogDebug, "IdoMysqlConnection") + << "Scheduling object deactivation task for '" << dbobj->GetName1() << "!" << dbobj->GetName2() << "'."; +#endif /* I2_DEBUG */ + m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalDeactivateObject, this, dbobj), PriorityLow); } @@ -811,6 +841,11 @@ void IdoMysqlConnection::ExecuteQuery(const DbQuery& query) { ASSERT(query.Category != DbCatInvalid); +#ifdef I2_DEBUG /* I2_DEBUG */ + Log(LogDebug, "IdoMysqlConnection") + << "Scheduling execute query task, type " << query.Type << ", table '" << query.Table << "'."; +#endif /* I2_DEBUG */ + m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalExecuteQuery, this, query, -1), query.Priority, true); } @@ -819,6 +854,11 @@ void IdoMysqlConnection::ExecuteMultipleQueries(const std::vector& quer if (queries.empty()) return; +#ifdef I2_DEBUG /* I2_DEBUG */ + Log(LogDebug, "IdoMysqlConnection") + << "Scheduling multiple execute query task, type " << queries[0].Type << ", table '" << queries[0].Table << "'."; +#endif /* I2_DEBUG */ + m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalExecuteMultipleQueries, this, queries), queries[0].Priority, true); } @@ -865,6 +905,13 @@ void IdoMysqlConnection::InternalExecuteMultipleQueries(const std::vector Date: Wed, 22 Feb 2017 16:32:31 +0100 Subject: [PATCH 04/19] IDO MySQL: Don't immediately execute an upsert insert query callback refs #4603 --- lib/db_ido_mysql/idomysqlconnection.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/db_ido_mysql/idomysqlconnection.cpp b/lib/db_ido_mysql/idomysqlconnection.cpp index c3e9cdce3..9c5c26322 100644 --- a/lib/db_ido_mysql/idomysqlconnection.cpp +++ b/lib/db_ido_mysql/idomysqlconnection.cpp @@ -475,6 +475,9 @@ void IdoMysqlConnection::AsyncQuery(const String& query, const boost::function Date: Tue, 7 Feb 2017 13:42:22 +0100 Subject: [PATCH 05/19] Add an example for /v1/actions/process-check-result which uses filter/type fixes #4954 --- doc/12-icinga2-api.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/12-icinga2-api.md b/doc/12-icinga2-api.md index ea1ac5e07..db10da0f1 100644 --- a/doc/12-icinga2-api.md +++ b/doc/12-icinga2-api.md @@ -777,7 +777,7 @@ Send a `POST` request to the URL endpoint `/v1/actions/process-check-result`. In addition to these parameters a [filter](12-icinga2-api.md#icinga2-api-filters) must be provided. The valid types for this action are `Host` and `Service`. -Example: +Example for the service `passive-ping6`: $ curl -k -s -u root:icinga -H 'Accept: application/json' -X POST 'https://localhost:5665/v1/actions/process-check-result?service=example.localdomain!passive-ping6' \ -d '{ "exit_status": 2, "plugin_output": "PING CRITICAL - Packet loss = 100%", "performance_data": [ "rta=5000.000000ms;3000.000000;5000.000000;0.000000", "pl=100%;80;100;0" ], "check_source": "example.localdomain" }' | python -m json.tool @@ -791,6 +791,13 @@ Example: ] } +Example for using the `Host` type and filter by the host name: + + $ curl -k -s -u root:icinga -H 'Accept: application/json' -X POST 'https://localhost:5665/v1/actions/process-check-result' \ + -d '{ "filter": "host.name==\"example.localdomain\"", "type": "Host", "exit_status": 1, "plugin_output": "Host is not available." }' + +You can avoid URL encoding of white spaces in object names by using the `filter` attribute in the request body. + ### reschedule-check Reschedule a check for hosts and services. The check can be forced if required. From d20a2133ffa2f4a629735956e63e555ef91c211a Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 7 Feb 2017 13:49:22 +0100 Subject: [PATCH 06/19] Add OpenBSD and AlpineLinux package repositories to the docs fixes #4980 --- doc/2-getting-started.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/2-getting-started.md b/doc/2-getting-started.md index e9b07e0ab..bbefdda21 100644 --- a/doc/2-getting-started.md +++ b/doc/2-getting-started.md @@ -19,7 +19,9 @@ and distribution you are running. SLES | [Icinga Repository](http://packages.icinga.com/SUSE/) Gentoo | [Upstream](http://packages.gentoo.org/package/net-analyzer/icinga2) FreeBSD | [Upstream](http://www.freshports.org/net-mgmt/icinga2) + OpenBSD | [Upstream](http://ports.su/net/icinga/core2,-main) ArchLinux | [Upstream](https://aur.archlinux.org/packages/icinga2) + AlpineLinux | [Upstream](https://pkgs.alpinelinux.org/package/edge/community/x86_64/icinga2) Packages for distributions other than the ones listed above may also be available. Please contact your distribution packagers. From 2b7cc05060626c886dca234807551e8fb533f4d5 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 14 Feb 2017 12:53:04 +0100 Subject: [PATCH 07/19] Fix client names in distributed monitoring docs fixes #4996 --- doc/6-distributed-monitoring.md | 157 ++++++++++++++++---------------- 1 file changed, 77 insertions(+), 80 deletions(-) diff --git a/doc/6-distributed-monitoring.md b/doc/6-distributed-monitoring.md index 7e5fee9a2..5920b930c 100644 --- a/doc/6-distributed-monitoring.md +++ b/doc/6-distributed-monitoring.md @@ -624,7 +624,7 @@ commands, you need to configure the `Zone` and `Endpoint` hierarchy on all nodes. * `icinga2-master1.localdomain` is the configuration master in this scenario. -* `icinga2-client2.localdomain` acts as client which receives command execution messages via command endpoint from the master. In addition, it receives the global check command configuration from the master. +* `icinga2-client1.localdomain` acts as client which receives command execution messages via command endpoint from the master. In addition, it receives the global check command configuration from the master. Include the endpoint and zone configuration on **both** nodes in the file `/etc/icinga2/zones.conf`. @@ -636,8 +636,8 @@ The endpoint configuration could look like this, for example: host = "192.168.56.101" } - object Endpoint "icinga2-client2.localdomain" { - host = "192.168.56.112" + object Endpoint "icinga2-client1.localdomain" { + host = "192.168.56.111" } Next, you need to define two zones. There is no naming convention, best practice is to either use `master`, `satellite`/`client-fqdn` or to choose region names for example `Europe`, `USA` and `Asia`, though. @@ -645,7 +645,7 @@ Next, you need to define two zones. There is no naming convention, best practice **Note**: Each client requires its own zone and endpoint configuration. Best practice is to use the client's FQDN for all object names. -The `master` zone is a parent of the `icinga2-client2.localdomain` zone: +The `master` zone is a parent of the `icinga2-client1.localdomain` zone: [root@icinga2-client1.localdomain /]# vim /etc/icinga2/zones.conf @@ -653,8 +653,8 @@ The `master` zone is a parent of the `icinga2-client2.localdomain` zone: endpoints = [ "icinga2-master1.localdomain" ] //array with endpoint names } - object Zone "icinga2-client2.localdomain" { - endpoints = [ "icinga2-client2.localdomain" ] + object Zone "icinga2-client1.localdomain" { + endpoints = [ "icinga2-client1.localdomain" ] parent = "master" //establish zone hierarchy } @@ -678,7 +678,7 @@ in `/etc/icinga2/icinga2.conf`. // Commented out, not required on a client as command endpoint //include_recursive "conf.d" -Edit the `api` feature on the client `icinga2-client2.localdomain` in +Edit the `api` feature on the client `icinga2-client1.localdomain` in the `/etc/icinga2/features-enabled/api.conf` file and make sure to set `accept_commands` and `accept_config` to `true`: @@ -695,8 +695,8 @@ on both nodes. Example on CentOS 7: - [root@icinga2-client2.localdomain /]# icinga2 daemon -C - [root@icinga2-client2.localdomain /]# systemctl restart icinga2 + [root@icinga2-client1.localdomain /]# icinga2 daemon -C + [root@icinga2-client1.localdomain /]# systemctl restart icinga2 [root@icinga2-master1.localdomain /]# icinga2 daemon -C [root@icinga2-master1.localdomain /]# systemctl restart icinga2 @@ -719,9 +719,9 @@ You can also add multiple hosts which execute checks against remote services/cli [root@icinga2-master1.localdomain /]# cd /etc/icinga2/zones.d/master [root@icinga2-master1.localdomain /etc/icinga2/zones.d/master]# vim hosts.conf - object Host "icinga2-client2.localdomain" { + object Host "icinga2-client1.localdomain" { check_command = "hostalive" //check is executed on the master - address = "192.168.56.112" + address = "192.168.56.111" vars.client_endpoint = name //follows the convention that host name == endpoint name } @@ -761,8 +761,8 @@ The following steps will happen: * Icinga 2 validates the configuration on `icinga2-master1.localdomain` and restarts. * The `icinga2-master1.localdomain` node schedules and executes the checks. -* The `icinga2-client2.localdomain` node receives the execute command event with additional command parameters. -* The `icinga2-client2.localdomain` node maps the command parameters to the local check command, executes the check locally, and sends back the check result message. +* The `icinga2-client1.localdomain` node receives the execute command event with additional command parameters. +* The `icinga2-client1.localdomain` node maps the command parameters to the local check command, executes the check locally, and sends back the check result message. As you can see, no interaction from your side is required on the client itself, and it's not necessary to reload the Icinga 2 service on the client. @@ -799,20 +799,20 @@ commands, you need to configure the `Zone` and `Endpoint` hierarchy on all nodes. * `icinga2-master1.localdomain` is the configuration master in this scenario. -* `icinga2-client1.localdomain` acts as client which receives configuration from the master. +* `icinga2-client2.localdomain` acts as client which receives configuration from the master. Checks are scheduled locally. Include the endpoint and zone configuration on **both** nodes in the file `/etc/icinga2/zones.conf`. The endpoint configuration could look like this: - [root@icinga2-client1.localdomain /]# vim /etc/icinga2/zones.conf + [root@icinga2-client2.localdomain /]# vim /etc/icinga2/zones.conf object Endpoint "icinga2-master1.localdomain" { host = "192.168.56.101" } - object Endpoint "icinga2-client1.localdomain" { - host = "192.168.56.111" + object Endpoint "icinga2-client2.localdomain" { + host = "192.168.56.112" } Next, you need to define two zones. There is no naming convention, best practice is to either use `master`, `satellite`/`client-fqdn` or to choose region names for example `Europe`, `USA` and `Asia`, though. @@ -820,25 +820,25 @@ Next, you need to define two zones. There is no naming convention, best practice **Note**: Each client requires its own zone and endpoint configuration. Best practice is to use the client's FQDN for all object names. -The `master` zone is a parent of the `icinga2-client1.localdomain` zone: +The `master` zone is a parent of the `icinga2-client2.localdomain` zone: - [root@icinga2-client1.localdomain /]# vim /etc/icinga2/zones.conf + [root@icinga2-client2.localdomain /]# vim /etc/icinga2/zones.conf object Zone "master" { endpoints = [ "icinga2-master1.localdomain" ] //array with endpoint names } - object Zone "icinga2-client1.localdomain" { - endpoints = [ "icinga2-client1.localdomain" ] + object Zone "icinga2-client2.localdomain" { + endpoints = [ "icinga2-client2.localdomain" ] parent = "master" //establish zone hierarchy } -Edit the `api` feature on the client `icinga2-client1.localdomain` in +Edit the `api` feature on the client `icinga2-client2.localdomain` in the `/etc/icinga2/features-enabled/api.conf` file and set `accept_config` to `true`. - [root@icinga2-client1.localdomain /]# vim /etc/icinga2/features-enabled/api.conf + [root@icinga2-client2.localdomain /]# vim /etc/icinga2/features-enabled/api.conf object ApiListener "api" { //... @@ -850,8 +850,8 @@ on both nodes. Example on CentOS 7: - [root@icinga2-client1.localdomain /]# icinga2 daemon -C - [root@icinga2-client1.localdomain /]# systemctl restart icinga2 + [root@icinga2-client2.localdomain /]# icinga2 daemon -C + [root@icinga2-client2.localdomain /]# systemctl restart icinga2 [root@icinga2-master1.localdomain /]# icinga2 daemon -C [root@icinga2-master1.localdomain /]# systemctl restart icinga2 @@ -867,7 +867,7 @@ Navigate to `/etc/icinga2/zones.d` on your master node `icinga2-master1.localdomain` and create a new directory with the same name as your satellite/client zone name: - [root@icinga2-master1.localdomain /]# mkdir -p /etc/icinga2/zones.d/icinga2-client1.localdomain + [root@icinga2-master1.localdomain /]# mkdir -p /etc/icinga2/zones.d/icinga2-client2.localdomain Add the host and service objects you want to monitor. There is no limitation for files and directories -- best practice is to @@ -876,22 +876,22 @@ sort things by type. By convention a master/satellite/client host object should use the same name as the endpoint object. You can also add multiple hosts which execute checks against remote services/clients. - [root@icinga2-master1.localdomain /]# cd /etc/icinga2/zones.d/icinga2-client1.localdomain - [root@icinga2-master1.localdomain /etc/icinga2/zones.d/icinga2-client1.localdomain]# vim hosts.conf + [root@icinga2-master1.localdomain /]# cd /etc/icinga2/zones.d/icinga2-client2.localdomain + [root@icinga2-master1.localdomain /etc/icinga2/zones.d/icinga2-client2.localdomain]# vim hosts.conf - object Host "icinga2-client1.localdomain" { + object Host "icinga2-client2.localdomain" { check_command = "hostalive" - address = "192.168.56.111" + address = "192.168.56.112" zone = "master" //optional trick: sync the required host object to the client, but enforce the "master" zone to execute the check } Given that you are monitoring a Linux client we'll just add a local [disk](10-icinga-template-library.md#plugin-check-command-disk) check. - [root@icinga2-master1.localdomain /etc/icinga2/zones.d/icinga2-client1.localdomain]# vim services.conf + [root@icinga2-master1.localdomain /etc/icinga2/zones.d/icinga2-client2.localdomain]# vim services.conf object Service "disk" { - host_name = "icinga2-client1.localdomain" + host_name = "icinga2-client2.localdomain" check_command = "disk" } @@ -909,8 +909,8 @@ The following steps will happen: * Icinga 2 validates the configuration on `icinga2-master1.localdomain`. * Icinga 2 copies the configuration into its zone config store in `/var/lib/icinga2/api/zones`. * The `icinga2-master1.localdomain` node sends a config update event to all endpoints in the same or direct child zones. -* The `icinga2-client1.localdomain` node accepts config and populates the local zone config store with the received config files. -* The `icinga2-client1.localdomain` node validates the configuration and automatically restarts. +* The `icinga2-client2.localdomain` node accepts config and populates the local zone config store with the received config files. +* The `icinga2-client2.localdomain` node validates the configuration and automatically restarts. Again, there is no interaction required on the client itself. @@ -964,21 +964,7 @@ This example shows all client services on the master node `icinga2-master1.local [root@icinga2-master1.localdomain /]# icinga2 node list Warning: CLI command 'node list' is DEPRECATED! Please read the Changelog. - Node 'icinga2-client1.localdomain' (last seen: Sun Aug 14 11:19:14 2016) - * Host 'icinga2-client1.localdomain' - * Service 'disk' - * Service 'disk /' - * Service 'http' - * Service 'icinga' - * Service 'load' - * Service 'ping4' - * Service 'ping6' - * Service 'procs' - * Service 'ssh' - * Service 'swap' - * Service 'users' - - Node 'icinga2-client2.localdomain' (last seen: Sun Aug 14 11:19:14 2016) + Node 'icinga2-client3.localdomain' (last seen: Sun Aug 14 11:19:14 2016) * Host 'icinga2-client2.localdomain' * Service 'disk' * Service 'disk C:' @@ -1066,7 +1052,7 @@ configuration file. Add a [global zone](6-distributed-monitoring.md#distributed-monitoring-global-zone-config-sync) for syncing check commands later: - [root@icinga2-client1.localdomain /]# vim /etc/icinga2/zones.conf + [root@icinga2-client3.localdomain /]# vim /etc/icinga2/zones.conf object Zone "global-templates" { global = true @@ -1077,7 +1063,7 @@ CheckCommand definitions which can be synced using the global zone above. Therefore disable the inclusion of the `conf.d` directory in `/etc/icinga2/icinga2.conf`. - [root@icinga2-client1.localdomain /]# vim /etc/icinga2/icinga2.conf + [root@icinga2-client3.localdomain /]# vim /etc/icinga2/icinga2.conf // Commented out, not required on a client as command endpoint //include_recursive "conf.d" @@ -1086,7 +1072,7 @@ Edit the `api` feature on the client `icinga2-client2.localdomain` in the `/etc/icinga2/features-enabled/api.conf` file and make sure to set `accept_commands` and `accept_config` to `true`: - [root@icinga2-client1.localdomain /]# vim /etc/icinga2/features-enabled/api.conf + [root@icinga2-client3.localdomain /]# vim /etc/icinga2/features-enabled/api.conf object ApiListener "api" { //... @@ -1095,12 +1081,12 @@ the `/etc/icinga2/features-enabled/api.conf` file and make sure to set } Now it is time to validate the configuration and to restart the Icinga 2 daemon -on the client host `icinga2-client1.localdomain`. +on the client host `icinga2-client3.localdomain`. Example on CentOS 7: - [root@icinga2-client1.localdomain /]# icinga2 daemon -C - [root@icinga2-client1.localdomain /]# systemctl restart icinga2 + [root@icinga2-client3.localdomain /]# icinga2 daemon -C + [root@icinga2-client3.localdomain /]# systemctl restart icinga2 **Steps on the configuration master node**: @@ -1114,9 +1100,9 @@ The `repository.d` directory is organised as a tree of object type directories. repository.d/ ├── README ├── endpoints - │   └── icinga2-client1.localdomain.conf + │   └── icinga2-client3.localdomain.conf ├── hosts - │   ├── icinga2-client1.localdomain + │   ├── icinga2-client3.localdomain │   │   ├── disk\ C%3A.conf │   │   ├── disk.conf │   │   ├── icinga.conf @@ -1126,9 +1112,9 @@ The `repository.d` directory is organised as a tree of object type directories. │   │   ├── procs.conf │   │   ├── swap.conf │   │   └── users.conf - │   └── icinga2-client1.localdomain.conf + │   └── icinga2-client3.localdomain.conf └── zones - └── icinga2-client1.localdomain.conf + └── icinga2-client3.localdomain.conf The `endpoints` and `zones` directories contain the required connection information for your client. Decide whether to add the configuration @@ -1136,7 +1122,7 @@ objects to your `zones.conf` file or keep them as is. The `hosts` directory contains a `.conf` file for the host object and a directory with the same name as the host with service configuration -files, in this example `hosts/icinga2-client1.localdomain`. +files, in this example `hosts/icinga2-client3.localdomain`. The simplest migration path is to merge the Zone, Endpoint, Host and Service object configuration into one new file called `.conf`, for example @@ -1145,21 +1131,21 @@ object configuration into one new file called `.conf`, for example Therefore create a new file in your master's zone directory in `zones.d`. In this example we assume that the zone is called `master`. -Use the information provided by the configuration files `/etc/icinga2/repository.d/zones/icinga2-client1.localdomain.conf` -and `/etc/icinga2/repository.d/endpoints/icinga2-client1.localdomain.conf`. +Use the information provided by the configuration files `/etc/icinga2/repository.d/zones/icinga2-client3.localdomain.conf` +and `/etc/icinga2/repository.d/endpoints/icinga2-client3.localdomain.conf`. - [root@icinga2-master1.localdomain /]# vim /etc/icinga2/zones.d/master/icinga2-client1.localdomain.conf + [root@icinga2-master1.localdomain /]# vim /etc/icinga2/zones.d/master/icinga2-client3.localdomain.conf - object Zone "icinga2-client2.localdomain" { - endpoints = [ "icinga2-client2.localdomain" ] + object Zone "icinga2-client3.localdomain" { + endpoints = [ "icinga2-client3.localdomain" ] parent = "master" //defined in zones.conf } - object Endpoint "icinga2-client2.localdomain" { + object Endpoint "icinga2-client3.localdomain" { //set the host attribute if the master should connect to the client endpoint } -Now fetch the Host object information located in the `/etc/icinga2/repository.d/hosts/icinga2-client1.localdomain.conf` +Now fetch the Host object information located in the `/etc/icinga2/repository.d/hosts/icinga2-client3.localdomain.conf` file and adopt it for your needs. One common disadvantage of the bottom up mode is that the host object attributes are not synced from the client to the master. Log onto your client and manually copy the required attributes into a new host object. @@ -1172,9 +1158,9 @@ the command endpoint information. In case you need to learn more details please the [top down command endpoint](6-distributed-monitoring.md#distributed-monitoring-top-down-command-endpoint) chapter. - [root@icinga2-master1.localdomain /]# vim /etc/icinga2/zones.d/master/icinga2-client1.localdomain.conf + [root@icinga2-master1.localdomain /]# vim /etc/icinga2/zones.d/master/icinga2-client3.localdomain.conf - object Host "icinga2-client1.localdomain.conf" { + object Host "icinga2-client3.localdomain.conf" { //check_command = "hostalive" check_command = "cluster-zone" vars.cluster_zone = name //host name must be the same as the client's zone name @@ -1184,8 +1170,8 @@ chapter. } Extract the service objects from the configuration files in the -`/etc/icinga2/repository.d/hosts/icinga2-client1.localdomain` directory -and add them into the `/etc/icinga2/zones.d/master/icinga2-client1.localdomain.conf` +`/etc/icinga2/repository.d/hosts/icinga2-client3.localdomain` directory +and add them into the `/etc/icinga2/zones.d/master/icinga2-client3.localdomain.conf` file. Best practice is to use a generic [service apply rule](3-monitoring-basics.md#using-apply) @@ -1421,6 +1407,9 @@ Add services using command endpoint checks: Validate the configuration and restart Icinga 2 on the master node `icinga2-master1.localdomain`. + [root@icinga2-master1.localdomain /]# icinga2 daemon -C + [root@icinga2-master1.localdomain /]# systemctl restart icinga2 + Open Icinga Web 2 and check the two newly created client hosts with two new services -- one executed locally (`ping4`) and one using command endpoint (`disk`). @@ -1618,6 +1607,9 @@ Add services using command endpoint checks: Validate the configuration and restart Icinga 2 on the master node `icinga2-master1.localdomain`. + [root@icinga2-master1.localdomain /]# icinga2 daemon -C + [root@icinga2-master1.localdomain /]# systemctl restart icinga2 + Open Icinga Web 2 and check the two newly created client hosts with two new services -- one executed locally (`ping4`) and one using command endpoint (`disk`). @@ -1738,7 +1730,7 @@ satellites where the connection information is needed as well. [root@icinga2-master1.localdomain /etc/icinga2/zones.d/satellite]# vim icinga2-client1.localdomain.conf object Endpoint "icinga2-client1.localdomain" { - host = "192.168.33.111" //the satellite actively tries to connect to the client + host = "192.168.56.111" //the satellite actively tries to connect to the client } object Zone "icinga2-client1.localdomain" { @@ -1750,7 +1742,7 @@ satellites where the connection information is needed as well. [root@icinga2-master1.localdomain /etc/icinga2/zones.d/satellite]# vim icinga2-client2.localdomain.conf object Endpoint "icinga2-client2.localdomain" { - host = "192.168.33.112" //the satellite actively tries to connect to the client + host = "192.168.56.112" //the satellite actively tries to connect to the client } object Zone "icinga2-client2.localdomain" { @@ -1760,12 +1752,12 @@ satellites where the connection information is needed as well. } The two client nodes do not necessarily need to know about each other, either. The only important thing -is that they know about the parent zone and their endpoint members (and optionally the global zone). +is that they know about the parent zone (the satellite) and their endpoint members (and optionally the global zone). -If you specify the `host` attribute in the `icinga2-master1.localdomain` and `icinga2-master2.localdomain` -endpoint objects, the client will actively try to connect to the master node. Since we've specified the client -endpoint's attribute on the master node already, we don't want the clients to connect to the -master nodes. Choose one connection direction. +If you specify the `host` attribute in the `icinga2-satellite1.localdomain` and `icinga2-satellite2.localdomain` +endpoint objects, the client node will actively try to connect to the satellite node. Since we've specified the client +endpoint's attribute on the satellite node already, we don't want the client node to connect to the +satellite nodes. Choose one connection direction. [root@icinga2-client1.localdomain /]# vim /etc/icinga2/zones.conf @@ -1778,6 +1770,7 @@ master nodes. Choose one connection direction. } object Endpoint "icinga2-client1.localdomain" { + //that's us } object Zone "satellite" { @@ -1806,6 +1799,7 @@ master nodes. Choose one connection direction. } object Endpoint "icinga2-client2.localdomain" { + //that's us } object Zone "satellite" { @@ -1827,7 +1821,7 @@ Now it is time to define the two client hosts on the master, sync them to the sa and apply service checks using the command endpoint execution method to them. Add the two client nodes as host objects to the `satellite` zone. -We've already created the directories in `zones.d`, the files for the +We've already created the directories in `/etc/icinga2/zones.d` including the files for the zone and endpoint configuration for the clients. [root@icinga2-master1.localdomain /]# cd /etc/icinga2/zones.d/satellite @@ -1872,6 +1866,9 @@ Add services using command endpoint checks. Pin the apply rules to the `satellit Validate the configuration and restart Icinga 2 on the master node `icinga2-master1.localdomain`. + [root@icinga2-master1.localdomain /]# icinga2 daemon -C + [root@icinga2-master1.localdomain /]# systemctl restart icinga2 + Open Icinga Web 2 and check the two newly created client hosts with two new services -- one executed locally (`ping4`) and one using command endpoint (`disk`). @@ -2315,7 +2312,7 @@ Configuration on the master node `icinga2-master1.localdomain`: } object Endpoint "icinga2-client2.localdomain" { - host = "192.168.33.112" //the master actively tries to connect to the client + host = "192.168.56.112" //the master actively tries to connect to the client log_duration = 0 } From 722b323be27cdafbed66dacafd8b6ce334622ab6 Mon Sep 17 00:00:00 2001 From: Dirk Goetz Date: Thu, 29 Oct 2015 17:00:18 +0100 Subject: [PATCH 08/19] Add an advanced example for apply rules to the docs Conditional apply based on attribute using key and value from the for loop refs #3133 Signed-off-by: Michael Friedrich --- doc/8-advanced-topics.md | 82 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/doc/8-advanced-topics.md b/doc/8-advanced-topics.md index afb60111f..f3c4cf6fb 100644 --- a/doc/8-advanced-topics.md +++ b/doc/8-advanced-topics.md @@ -298,6 +298,88 @@ and adds the excluded time period names as an array. } } +## Advanced Use of Apply Rules + +[Apply rules](3-monitoring-basics.md#using-apply) can be used to create a rule set which is +entirely based on host objects and their attributes. +In addition to that [apply for and custom attribute override](3-monitoring-basics.md#using-apply-for) +extend the possibilities. + +The following example defines a dictionary on the host object which contains +configuration attributes for multiple web servers. This then used to add three checks: + +* A `ping4` check using the local IP `address` of the web server. +* A `tcp` check querying the TCP port where the HTTP service is running on. +* If the `url` key is defined, the third apply for rule will create service objects using the `http` CheckCommand. +In addition to that you can optionally define the `ssl` attribute which enables HTTPS checks. + +Host definition: + + object Host "webserver01" { + import "generic-host" + address = "192.168.56.200" + vars.os = "Linux" + + vars.webserver = { + instance["status"] = { + address = "192.168.56.201" + port = "80" + url = "/status" + } + instance["tomcat"] = { + address = "192.168.56.202" + port = "8080" + } + instance["icingaweb2"] = { + address = "192.168.56.210" + port = "443" + url = "/icingaweb2" + ssl = true + } + } + } + +Service apply for definitions: + + apply Service "webserver_ping" for (instance => config in host.vars.webserver.instance) { + display_name = "webserver_" + instance + check_command = "ping4" + + vars.ping_address = config.address + + assign where host.vars.webserver.instance + } + + apply Service "webserver_port" for (instance => config in host.vars.webserver.instance) { + display_name = "webserver_" + instance + "_" + config.port + check_command = "tcp" + + vars.tcp_address = config.address + vars.tcp_port = config.port + + assign where host.vars.webserver.instance + } + + apply Service "webserver_url" for (instance => config in host.vars.webserver.instance) { + display_name = "webserver_" + instance + "_" + config.url + check_command = "http" + + vars.http_address = config.address + vars.http_port = config.port + vars.http_uri = config.url + + if (config.ssl) { + vars.http_ssl = config.ssl + } + + assign where config.url != "" + } + +The variables defined in the host dictionary are not using the typical custom attribute +prefix recommended for CheckCommand parameters. Instead they are re-used for multiple +service checks in this example. +In addition to defining check parameters this way, you can also enrich the `display_name` +attribute with more details. This will be shown in in Icinga Web 2 for example. ## Use Functions in Object Configuration From 2e4394bca301782d1c0db08d40ed18f101a7d8b7 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 23 Feb 2017 17:53:20 +0100 Subject: [PATCH 09/19] Docs: Fixes and enhancements for acks, comments and downtimes refs #5029 refs #5030 --- doc/8-advanced-topics.md | 77 +++++++++++++++++++++++++++++++--------- 1 file changed, 61 insertions(+), 16 deletions(-) diff --git a/doc/8-advanced-topics.md b/doc/8-advanced-topics.md index f3c4cf6fb..82576c876 100644 --- a/doc/8-advanced-topics.md +++ b/doc/8-advanced-topics.md @@ -53,12 +53,39 @@ is removed (may happen before or after the actual end time!). ### Scheduling a downtime -This can either happen through a web interface or by sending an [external command](14-features.md#external-commands) -to the external command pipe provided by the `ExternalCommandListener` configuration. +You can schedule a downtime either by using the Icinga 2 API action +[schedule-downtime](#icinga2-api-actions-schedule-downtime) or +by sending an [external command](14-features.md#external-commands). + + +#### Fixed Downtime + +If the host/service changes into a NOT-OK state between the start and +end time window, the downtime will be marked as `in effect` and +increases the downtime depth counter. + +``` + | | | +start | end + trigger time +``` + +#### Flexible Downtime + +A flexible downtime defines a time window where the downtime may be +triggered from a host/service NOT-OK state change. It will then last +until the specified time duration is reached. That way it can happen +that the downtime end time is already gone, but the downtime ends +at `trigger time + duration`. + + +``` + | | | +start | end actual end time + |--------------duration--------| + trigger time +``` -Fixed downtimes require a start and end time (a duration will be ignored). -Flexible downtimes need a start and end time for the time span, and a duration -independent from that time span. ### Triggered Downtimes @@ -100,21 +127,39 @@ add useful information for others on repeating incidents (for example "last time syslog at 100% cpu on 17.10.2013 due to stale nfs mount") which is primarily accessible using web interfaces. -Adding and deleting comment actions are possible through the external command pipe -provided with the `ExternalCommandListener` configuration. The caller must -pass the comment id in case of manipulating an existing comment. - +You can add a comment either by using the Icinga 2 API action +[add-comment](#icinga2-api-actions-add-comment) or +by sending an [external command](14-features.md#external-commands). ## Acknowledgements -If a problem is alerted and notified, you may signal the other notification -recipients that you are aware of the problem and will handle it. +If a problem persists and notifications have been sent, you can +acknowledge the problem. That way other users will get +a notification that you're aware of the issue and probably are +already working on a fix. + +Note: Acknowledgements also add a new [comment](#comment-intro) +which contains the author and text fields. + +You can send an acknowledgement either by using the Icinga 2 API action +[acknowledge-problem](#icinga2-api-actions-acknowledge-problem) or +by sending an [external command](14-features.md#external-commands). + + +### Sticky Acknowledgements + +The acknowledgement is removed if a state change occurs or if the host/service +recovers (OK/Up state). + +If you acknowlege a problem once you've received a `Critical` notification, +the acknowledgement will be removed if there is a state transition to `Warning`. +``` +OK -> WARNING -> CRITICAL -> WARNING -> OK +``` + +If you prefer to keep the acknowledgement until the problem is resolved (`OK` +recovery) you need to enable the `sticky` parameter. -By sending an acknowledgement to Icinga 2 (using the external command pipe -provided with `ExternalCommandListener` configuration) all future notifications -are suppressed, a new comment is added with the provided description and -a notification with the type `NotificationFilterAcknowledgement` is sent -to all notified users. ### Expiring Acknowledgements From d4458bac8beab401e23e9189d8e69a8d07482b34 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 23 Feb 2017 18:03:55 +0100 Subject: [PATCH 10/19] Fix missing doc urls refs #5029 refs #5030 refs #5031 --- doc/8-advanced-topics.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/8-advanced-topics.md b/doc/8-advanced-topics.md index 82576c876..2c9622fc0 100644 --- a/doc/8-advanced-topics.md +++ b/doc/8-advanced-topics.md @@ -54,7 +54,7 @@ is removed (may happen before or after the actual end time!). ### Scheduling a downtime You can schedule a downtime either by using the Icinga 2 API action -[schedule-downtime](#icinga2-api-actions-schedule-downtime) or +[schedule-downtime](12-icinga2-api.md#icinga2-api-actions-schedule-downtime) or by sending an [external command](14-features.md#external-commands). @@ -128,7 +128,7 @@ add useful information for others on repeating incidents (for example is primarily accessible using web interfaces. You can add a comment either by using the Icinga 2 API action -[add-comment](#icinga2-api-actions-add-comment) or +[add-comment](12-icinga2-api.md#icinga2-api-actions-add-comment) or by sending an [external command](14-features.md#external-commands). ## Acknowledgements @@ -138,11 +138,11 @@ acknowledge the problem. That way other users will get a notification that you're aware of the issue and probably are already working on a fix. -Note: Acknowledgements also add a new [comment](#comment-intro) +Note: Acknowledgements also add a new [comment](8-advanced-topics.md#comments-intro) which contains the author and text fields. You can send an acknowledgement either by using the Icinga 2 API action -[acknowledge-problem](#icinga2-api-actions-acknowledge-problem) or +[acknowledge-problem](12-icinga2-api.md#icinga2-api-actions-acknowledge-problem) or by sending an [external command](14-features.md#external-commands). From 96278a40351cf6962bf86c16d66c486baa37b5ea Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 24 Feb 2017 16:07:23 +0100 Subject: [PATCH 11/19] Docs: Fix typo in Distributed Monitoring chapter refs #5035 --- doc/6-distributed-monitoring.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/6-distributed-monitoring.md b/doc/6-distributed-monitoring.md index 5920b930c..f241c5397 100644 --- a/doc/6-distributed-monitoring.md +++ b/doc/6-distributed-monitoring.md @@ -317,7 +317,7 @@ ensure to collect the required information: --------------------|-------------------- Common name (CN) | **Required.** By convention this should be the host's FQDN. Defaults to the FQDN. Master common name | **Required.** Use the common name you've specified for your master node before. - Establish connection to the master | **Optional.** Whether the client should attempt to connect the to master or not. Defaults to `y`. + Establish connection to the master | **Optional.** Whether the client should attempt to connect to the master or not. Defaults to `y`. Master endpoint host | **Required if the the client needs to connect to the master.** The master's IP address or FQDN. This information is included in the `Endpoint` object configuration in the `zones.conf` file. Master endpoint port | **Optional if the the client needs to connect to the master.** The master's listening port. This information is included in the `Endpoint` object configuration. Add more master endpoints | **Optional.** If you have multiple master nodes configured, add them here. From a47a21da31012cffcd3efa4e57a90a37f2713abd Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 9 Mar 2017 14:52:19 +0100 Subject: [PATCH 12/19] Fix missing documentation for mysql_socket attribute fixes #5055 --- doc/10-icinga-template-library.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index cf73b0ca7..4a4800c69 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -732,6 +732,7 @@ Name | Description ------------------------|--------------------------------------------------------------- mysql_hostname | **Optional.** Host name, IP Address, or unix socket (must be an absolute path). mysql_port | **Optional.** Port number (default: 3306). +mysql_socket | **Optional.** Use the specified socket (has no effect if `mysql_hostname` is used). mysql_ignore_auth | **Optional.** Ignore authentication failure and check for mysql connectivity only. mysql_database | **Optional.** Check database with indicated name. mysql_file | **Optional.** Read from the specified client options file. From 8d64a2d0bb1122e8cd587bf2303ab5b8bf75e169 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 10 Mar 2017 18:19:22 +0100 Subject: [PATCH 13/19] Update Security section in the Distributed Monitoring chapter fixes #5057 --- doc/6-distributed-monitoring.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/6-distributed-monitoring.md b/doc/6-distributed-monitoring.md index f241c5397..da167a3a1 100644 --- a/doc/6-distributed-monitoring.md +++ b/doc/6-distributed-monitoring.md @@ -153,15 +153,16 @@ nodes (firewalls, policies, software hardening, etc.), Icinga 2 also provides additional security: * SSL certificates are mandatory for communication between nodes. The CLI commands -help you create those certs automatically. +help you create those certificates. * Child zones only receive updates (check results, commands, etc.) for their configured objects. +* Child zones are not allowed to push configuration updates to parent zones. * Zones cannot interfere with other zones and influence each other. Each checkable host or service object is assigned to **one zone** only. * All nodes in a zone trust each other. * [Config sync](6-distributed-monitoring.md#distributed-monitoring-top-down-config-sync) and [remote command endpoint execution](6-distributed-monitoring.md#distributed-monitoring-top-down-command-endpoint) is disabled by default. -The underlying protocol is using JSON-RPC events sent over TLS secured -connections. In case you are interested in specific details, please -check the source code. +The underlying protocol uses JSON-RPC event notifications exchanged by nodes. +The connection is secured by TLS. The message protocol uses an internal API, +and as such message types and names may change internally and are not documented. ## Master Setup From 14f3ee8024f5f91ece36135e15f450a311966d49 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 21 Feb 2017 11:31:07 +0100 Subject: [PATCH 14/19] Ensure that only child processes for checks are reniced fixes #4989 --- lib/base/process.cpp | 20 ++++++++++++++++---- lib/base/process.hpp | 4 ++++ lib/icinga/pluginutility.cpp | 2 ++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/lib/base/process.cpp b/lib/base/process.cpp index 96c8dd3f4..03d217ce8 100644 --- a/lib/base/process.cpp +++ b/lib/base/process.cpp @@ -63,7 +63,7 @@ static boost::once_flag l_ProcessOnceFlag = BOOST_ONCE_INIT; static boost::once_flag l_SpawnHelperOnceFlag = BOOST_ONCE_INIT; Process::Process(const Process::Arguments& arguments, const Dictionary::Ptr& extraEnvironment) - : m_Arguments(arguments), m_ExtraEnvironment(extraEnvironment), m_Timeout(600) + : m_Arguments(arguments), m_ExtraEnvironment(extraEnvironment), m_Timeout(600), m_AdjustPriority(false) #ifdef _WIN32 , m_ReadPending(false), m_ReadFailed(false), m_Overlapped() #endif /* _WIN32 */ @@ -94,6 +94,7 @@ static Value ProcessSpawnImpl(struct msghdr *msgh, const Dictionary::Ptr& reques Array::Ptr arguments = request->Get("arguments"); Dictionary::Ptr extraEnvironment = request->Get("extraEnvironment"); + bool adjustPriority = request->Get("adjustPriority"); // build argv char **argv = new char *[arguments->GetLength() + 1]; @@ -161,7 +162,7 @@ static Value ProcessSpawnImpl(struct msghdr *msgh, const Dictionary::Ptr& reques (void)close(fds[2]); #ifdef HAVE_NICE - if (nice(5) < 0) + if (adjustPriority && nice(5) < 0) Log(LogWarning, "base", "Failed to renice child process."); #endif /* HAVE_NICE */ @@ -366,12 +367,13 @@ static void StartSpawnProcessHelper(void) l_ProcessControlPID = pid; } -static pid_t ProcessSpawn(const std::vector& arguments, const Dictionary::Ptr& extraEnvironment, int fds[3]) +static pid_t ProcessSpawn(const std::vector& arguments, const Dictionary::Ptr& extraEnvironment, bool adjustPriority, int fds[3]) { Dictionary::Ptr request = new Dictionary(); request->Set("command", "spawn"); request->Set("arguments", Array::FromVector(arguments)); request->Set("extraEnvironment", extraEnvironment); + request->Set("adjustPriority", adjustPriority); String jrequest = JsonEncode(request); size_t length = jrequest.GetLength(); @@ -579,6 +581,16 @@ double Process::GetTimeout(void) const return m_Timeout; } +void Process::SetAdjustPriority(bool adjust) +{ + m_AdjustPriority = adjust; +} + +bool Process::GetAdjustPriority(void) const +{ + return m_AdjustPriority; +} + void Process::IOThreadProc(int tid) { #ifdef _WIN32 @@ -959,7 +971,7 @@ void Process::Run(const boost::function& callback) fds[1] = outfds[1]; fds[2] = outfds[1]; - m_Process = ProcessSpawn(m_Arguments, m_ExtraEnvironment, fds); + m_Process = ProcessSpawn(m_Arguments, m_ExtraEnvironment, m_AdjustPriority, fds); m_PID = m_Process; Log(LogNotice, "Process") diff --git a/lib/base/process.hpp b/lib/base/process.hpp index 8b7627128..e20311f05 100644 --- a/lib/base/process.hpp +++ b/lib/base/process.hpp @@ -73,6 +73,9 @@ public: void SetTimeout(double timeout); double GetTimeout(void) const; + void SetAdjustPriority(bool adjust); + bool GetAdjustPriority(void) const; + void Run(const boost::function& callback = boost::function()); pid_t GetPID(void) const; @@ -92,6 +95,7 @@ private: Dictionary::Ptr m_ExtraEnvironment; double m_Timeout; + bool m_AdjustPriority; ProcessHandle m_Process; pid_t m_PID; diff --git a/lib/icinga/pluginutility.cpp b/lib/icinga/pluginutility.cpp index 772457a6d..835854703 100644 --- a/lib/icinga/pluginutility.cpp +++ b/lib/icinga/pluginutility.cpp @@ -93,6 +93,8 @@ void PluginUtility::ExecuteCommand(const Command::Ptr& commandObj, const Checkab else process->SetTimeout(checkable->GetCheckTimeout()); + process->SetAdjustPriority(true); + process->Run(boost::bind(callback, command, _1)); } From b3354266f314008485ef9c2a89dbc919517049ce Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Mon, 20 Mar 2017 13:19:37 +0100 Subject: [PATCH 15/19] IDO: Fix where condition for downtime history updates fixes #5080 --- lib/db_ido/dbevents.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/db_ido/dbevents.cpp b/lib/db_ido/dbevents.cpp index 9da40139b..cde11dd46 100644 --- a/lib/db_ido/dbevents.cpp +++ b/lib/db_ido/dbevents.cpp @@ -689,6 +689,7 @@ void DbEvents::TriggerDowntime(const Downtime::Ptr& downtime) query3.Fields = fields3; query3.WhereCriteria = new Dictionary(); + query3.WhereCriteria->Set("object_id", checkable); query3.WhereCriteria->Set("internal_downtime_id", downtime->GetLegacyId()); query3.WhereCriteria->Set("entry_time", DbValue::FromTimestamp(downtime->GetEntryTime())); query3.WhereCriteria->Set("scheduled_start_time", DbValue::FromTimestamp(downtime->GetStartTime())); From 42f6dfc85949cc4229dce780b163aac9d17bda70 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 2 Feb 2017 13:47:18 +0100 Subject: [PATCH 16/19] Fix logging for discarded cluster messages fixes #4930 --- lib/remote/apilistener-configsync.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/remote/apilistener-configsync.cpp b/lib/remote/apilistener-configsync.cpp index f2ae871d9..c2065d87a 100644 --- a/lib/remote/apilistener-configsync.cpp +++ b/lib/remote/apilistener-configsync.cpp @@ -69,14 +69,9 @@ Value ApiListener::ConfigUpdateObjectAPIHandler(const MessageOrigin::Ptr& origin String objType = params->Get("type"); String objName = params->Get("name"); - if (!listener->GetAcceptConfig()) { - Log(LogWarning, "ApiListener") - << "Ignoring config update from '" << origin->FromClient->GetIdentity() << "' for object '" << objName << "' of type '" << objType << "'. '" << listener->GetName() << "' does not accept config."; - return Empty; - } - Endpoint::Ptr endpoint = origin->FromClient->GetEndpoint(); + /* discard messages if the client is not configured on this node */ if (!endpoint) { Log(LogNotice, "ApiListener") << "Discarding 'config update object' message from '" << origin->FromClient->GetIdentity() << "': Invalid endpoint origin (client not allowed)."; @@ -85,9 +80,17 @@ Value ApiListener::ConfigUpdateObjectAPIHandler(const MessageOrigin::Ptr& origin /* discard messages if the sender is in a child zone */ if (!Zone::GetLocalZone()->IsChildOf(endpoint->GetZone())) { - Log(LogWarning, "ApiListener") + Log(LogNotice, "ApiListener") << "Discarding 'config update object' message from '" - << origin->FromClient->GetIdentity() << "'."; + << origin->FromClient->GetIdentity() << "' for object '" + << objName << "' of type '" << objType << "'. Sender is in a child zone."; + return Empty; + } + + /* ignore messages if the endpoint does not accept config */ + if (!listener->GetAcceptConfig()) { + Log(LogWarning, "ApiListener") + << "Ignoring config update from '" << origin->FromClient->GetIdentity() << "' for object '" << objName << "' of type '" << objType << "'. '" << listener->GetName() << "' does not accept config."; return Empty; } From 0273886bcf2e2085313ccd86b8012165f985d632 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 28 Mar 2017 15:25:15 +0200 Subject: [PATCH 17/19] Docs: Review contributed plugin check commands (URLs, description details) fixes #4955 --- doc/10-icinga-template-library.md | 333 ++++++++++++++++++------------ 1 file changed, 203 insertions(+), 130 deletions(-) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index 4a4800c69..d262e064e 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -376,7 +376,7 @@ flexlm_timeout | **Optional.** Plugin time out in seconds. Defaults to 15. ### fping4 The [check_fping](https://www.monitoring-plugins.org/doc/man/check_fping.html) plugin -will use the `fping` command to ping the specified host for a fast check. Note that it is +uses the `fping` command to ping the specified host for a fast check. Note that it is necessary to set the suid flag on fping. This CheckCommand expects an IPv4 address. @@ -1945,16 +1945,25 @@ These check commands assume that the global constant named `PluginContribDir` is set to the path where the user installs custom plugins and can be enabled by uncommenting the corresponding line in [icinga2.conf](4-configuring-icinga-2.md#icinga2-conf): - include +``` +# vim /etc/icinga2/icinga2.conf + +include +``` + +This is enabled by default since Icinga 2 2.5.0. ### Databases -All database plugins go in this category. +This category contains plugins for various database servers. #### db2_health -The plugin `db2_health` utilises Perl DBD::DB2. -For release tarballs and detailed documentation especially on the different modes and required permissions see [https://labs.consol.de](https://labs.consol.de/nagios/check_db2_health/). For development check [https://github.com](https://github.com/lausser/check_db2_health). +The [check_db2_health](https://labs.consol.de/nagios/check_db2_health/) plugin +uses the `DBD::DB2` Perl library to monitor a [DB2](https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/) +database. + +The Git repository is located on [GitHub](https://github.com/lausser/check_db2_health). Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -1980,8 +1989,11 @@ db2_health_env_db2_version | **Optional.** Specifies the DB2 version as envir #### mssql_health -The plugin `mssql_health` utilises Perl DBD::Sybase based on FreeTDS to connect to MSSQL databases for monitoring. -For release tarballs, detailed documentation especially on the different modes and scripts for creating a monitoring user see [https://labs.consol.de](https://labs.consol.de/nagios/check_mssql_health/). For development check [https://github.com](https://github.com/lausser/check_mssql_health). +The [check_mssql_health](https://labs.consol.de/nagios/check_mssql_health/index.html) plugin +uses the `DBD::Sybase` Perl library based on [FreeTDS](http://www.freetds.org/) to monitor a +[MS SQL](https://www.microsoft.com/en-us/sql-server/) server. + +The Git repository is located on [GitHub](https://github.com/lausser/check_mssql_health). Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -2006,8 +2018,11 @@ mssql_health_commit | **Optional.** Set this to true to turn on aut #### mysql_health -The plugin `mysql_health` utilises Perl DBD::MySQL to connect to MySQL databases for monitoring. -For release tarballs and detailed documentation especially on the different modes and required permissions see [https://labs.consol.de](https://labs.consol.de/nagios/check_mysql_health/). For development check [https://github.com](https://github.com/lausser/check_mysql_health). +The [check_mysql_health](https://labs.consol.de/nagios/check_mysql_health/index.html) plugin +uses the `DBD::MySQL` Perl library to monitor a +[MySQL](https://dev.mysql.com/downloads/mysql/) or [MariaDB](https://mariadb.org/about/) database. + +The Git repository is located on [GitHub](https://github.com/lausser/check_mysql_health). Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -2052,8 +2067,10 @@ mysql_health_timeout | **Optional.** Plugin timeout. Defaults to 60s #### oracle_health -The plugin `oracle_health` utilises Perl DBD::Oracle based on oracle-instantclient-sdk or sqlplus to connect to Oracle databases for monitoring. -For release tarballs and detailed documentation especially on the different modes and required permissions see [https://labs.consol.de](https://labs.consol.de/nagios/check_oracle_health/). For development check [https://github.com](https://github.com/lausser/check_oracle_health). +The [check_oracle_health](https://labs.consol.de/nagios/check_oracle_health/index.html) plugin +uses the `DBD::Oracle` Perl library to monitor an [Oracle](https://www.oracle.com/database/) database. + +The Git repository is located on [GitHub](https://github.com/lausser/check_oracle_health). Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -2084,8 +2101,10 @@ TNS_ADMIN | **Required.** Specifies the location of the tnsnames.ora i #### postgres -The plugin `postgres` utilises the psql binary to connect to PostgreSQL databases for monitoring. -For release tarballs and detailed documentation especially the different actions and required persmissions see [https://bucardo.org/wiki/Check_postgres](https://bucardo.org/wiki/Check_postgres). For development check [https://github.com](https://github.com/bucardo/check_postgres). +The [check_postgres](https://bucardo.org/wiki/Check_postgres) plugin +uses the `psql` binary to monitor a [PostgreSQL](https://www.postgresql.org/about/) database. + +The Git repository is located on [GitHub](https://github.com/bucardo/check_postgres). Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -2114,8 +2133,8 @@ postgres_tempdir | **Optional.** Specify directory for temporary files. The #### mongodb -The plugin `mongodb` utilises Python PyMongo. -For development check [https://github.com](https://github.com/mzupan/nagios-plugin-mongodb). +The [check_mongodb.py](https://github.com/mzupan/nagios-plugin-mongodb) plugin +uses the `pymongo` Python library to monitor a [MongoDB](https://docs.mongodb.com/manual/) instance. Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -2142,9 +2161,10 @@ mongodb_sampletime | **Optional.** Time used to sample number of p #### elasticsearch -An [ElasticSearch](https://www.elastic.co/products/elasticsearch) availability -and performance monitoring plugin available for download at [GitHub](https://github.com/anchor/nagios-plugin-elasticsearch). -The plugin requires the HTTP API enabled on your ElasticSearch node. +The [check_elasticsearch](https://github.com/anchor/nagios-plugin-elasticsearch) plugin +uses the HTTP API to monitor an [Elasticsearch](https://www.elastic.co/products/elasticsearch) node. + +Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): Name | Description -----------------------------|------------------------------------------------------------------------------------------------------- @@ -2157,8 +2177,12 @@ elasticsearch_yellowcritical | **Optional.** Instead of issuing a 'warning' for #### redis -The plugin `redis` can measure response time, hitrate, memory utilization, check replication sync and more. It can also test data in a specified key (if necessary, doing average or sum on range). -It is provided by `William Leibzon` at [https://github.com](https://github.com/willixix/naglio-plugins/blob/master/check_redis.pl). +The [check_redis.pl](https://github.com/willixix/naglio-plugins/blob/master/check_redis.pl) plugin +uses the `Redis` Perl library to monitor a [Redis](https://redis.io/) instance. The plugin can +measure response time, hitrate, memory utilization, check replication synchronization, etc. It is +also possible to test data in a specified key and calculate averages or summaries on ranges. + +Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): Name | Description -------------------------|-------------------------------------------------------------------------------------------------------------- @@ -2186,11 +2210,14 @@ redis_replication_delay | **Optional.** Allows to set threshold on replication ### Hardware -This category includes all plugins for various hardware checks. +This category includes all plugin check commands for various hardware checks. #### hpasm -The plugin [check_hpasm](https://labs.consol.de/de/nagios/check_hpasm/index.html) is a plugin to monitor HP hardware through the HP Insight Agent via SNMP. +The [check_hpasm](https://labs.consol.de/de/nagios/check_hpasm/index.html) plugin +monitors the hardware health of HP Proliant Servers, provided that the `hpasm` +(HP Advanced Server Management) software is installed. It is also able to monitor +the system health of HP Bladesystems and storage systems. Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -2214,7 +2241,6 @@ hpasm_privprotocol | **Optional.** The private protocol for SNMPv3 (des\|aes\|a hpasm_servertype | **Optional.** The type of the server: proliant (default) or bladesystem. hpasm_eval-nics | **Optional.** Check network interfaces (and groups). Try it and report me whyt you think about it. I need to build up some know how on this subject. If you get an error and think, it is not justified for your configuration, please tell me about it. (alwasy send the output of "snmpwalk -On .... 1.3.6.1.4.1.232" and a description how you setup your nics and why it is correct opposed to the plugins error message. - ### IcingaCLI This category includes all plugins using the icingacli provided by Icinga Web 2. @@ -2238,7 +2264,10 @@ This category includes all plugins for IPMI devices. #### ipmi-sensor -With the plugin `ipmi-sensor` provided by Thomas-Krenn.AG you can monitor sensor data for IPMI devices. See https://www.thomas-krenn.com/en/wiki/IPMI_Sensor_Monitoring_Plugin for installation and configuration instructions. +The [check_ipmi_sensor](https://github.com/thomas-krenn/check_ipmi_sensor_v3) plugin +uses the `ipmimonitoring` binary to monitor sensor data for IPMI devices. Please +read the [documentation](https://www.thomas-krenn.com/en/wiki/IPMI_Sensor_Monitoring_Plugin) +for installation and configuration details. Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -2258,7 +2287,6 @@ ipmi_number_of_active_fans | **Optional.** Number of fans that should be a ipmi_show_fru | **Optional.** Print the product serial number if it is available in the IPMI FRU data. ipmi_no_sel_checking | **Optional.** Turn off system event log checking via ipmi-sel. - ### Log Management This category includes all plugins for log management, for example [Logstash](https://www.elastic.co/products/logstash). @@ -2291,7 +2319,8 @@ This category includes all plugins for metric-based checks. #### graphite -Check command object for the [check_graphite](https://github.com/obfuscurity/nagios-scripts) plugin. +The [check_graphite](https://github.com/obfuscurity/nagios-scripts) plugin +uses the `rest-client` Ruby library to monitor a [Graphite](https://graphiteapp.org) instance. Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -2315,7 +2344,10 @@ This category includes all plugins for various network components like routers, #### interfacetable -The plugin `interfacetable` generates a html page containing information about the monitored node and all of its interfaces. The actively developed and maintained version is `interfacetable_v3t` provided by `Yannick Charton` on [http://www.tontonitch.com](http://www.tontonitch.com/tiki/tiki-index.php?page=Nagios+plugins+-+interfacetable_v3t) or [https://github.com](https://github.com/Tontonitch/interfacetable_v3t). +The [check_interfacetable_v3t](http://www.tontonitch.com/tiki/tiki-index.php?page=Nagios+plugins+-+interfacetable_v3t) plugin +generates a html page containing information about the monitored node and all of its interfaces. + +The Git repository is located on [GitHub](https://github.com/Tontonitch/interfacetable_v3t). Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -2385,7 +2417,7 @@ interfacetable_notype | **Optional.** Remove the interface type fo #### iftraffic -The plugin [check_iftraffic](https://exchange.icinga.com/exchange/iftraffic) +The [check_iftraffic](https://exchange.icinga.com/exchange/iftraffic) plugin checks the utilization of a given interface name using the SNMP protocol. Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -2403,7 +2435,7 @@ iftraffic_max_counter | **Optional.** Maximum counter value of net devices in ki #### iftraffic64 -The plugin [check_iftraffic64](https://exchange.icinga.com/exchange/iftraffic64) +The [check_iftraffic64](https://exchange.icinga.com/exchange/iftraffic64) plugin checks the utilization of a given interface name using the SNMP protocol. Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -2421,8 +2453,8 @@ iftraffic64_max_counter | **Optional.** Maximum counter value of net devices in #### interfaces -The plugin [check_interfaces](https://www.netways.org/projects/check-interfaces) -Check interfaces and utilization. +The [check_interfaces](https://git.netways.org/plugins/check_interfaces) plugin +uses SNMP to monitor network interfaces and their utilization. Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -2453,8 +2485,17 @@ interfaces_sleep | **Optional.** Sleep between every SNMP query (in ms) #### nwc_health -The plugin [check_nwc_health](https://labs.consol.de/de/nagios/check_nwc_health/index.html) -Check switches, router, there interfaces and utilization. +The [check_nwc_health](https://labs.consol.de/de/nagios/check_nwc_health/index.html) plugin +uses SNMP to monitor network components. The plugin is able to generate interface statistics, +check hardware (CPU, memory, fan, power, etc.), monitor firewall policies, HRSP, load-balancer +pools, processor and memory usage. + +Currently the following network components are supported: Cisco IOS, Cisco Nexus, Cisco ASA, +Cisco PIX, F5 BIG-IP, CheckPoint Firewall1, Juniper NetScreen, HP Procurve, Nortel, Brocade 4100/4900, +EMC DS 4700, EMC DS 24, Allied Telesyn. Blue Coat SG600, Cisco Wireless Lan Controller 5500, +Brocade ICX6610-24-HPOE, Cisco UC Telefonzeugs, FOUNDRY-SN-AGENT-MIB, FRITZ!BOX 7390, FRITZ!DECT 200, +Juniper IVE, Pulse-Gateway MAG4610, Cisco IronPort AsyncOS, Foundry, etc. A complete list can be +found in the plugin [documentation](https://labs.consol.de/nagios/check_nwc_health/index.html). Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -2505,11 +2546,14 @@ nwc_health_multiline | **Optional.** Multiline output ### Operating System -In this category you can find plugins for gathering information about your operating system or the system beneath like memory usage. +This category contains plugins which receive details about your operating system +or the guest system. #### mem -The plugin `mem` is used for gathering information about memory usage on linux and unix hosts. It is able to count cache memory as free when comparing it to the thresholds. It is provided by `Justin Ellison` on [https://github.com](https://github.com/justintime/nagios-plugins). For more details see the developers blog [http://sysadminsjourney.com](http://sysadminsjourney.com/content/2009/06/04/new-and-improved-checkmempl-nagios-plugin). +The [check_mem.pl](https://github.com/justintime/nagios-plugins) plugin checks the +memory usage on linux and unix hosts. It is able to count cache memory as free when +compared to thresholds. More details can be found on [this blog entry]((http://sysadminsjourney.com/content/2009/06/04/new-and-improved-checkmempl-nagios-plugin). Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -2523,8 +2567,8 @@ mem_critical | **Required.** Specify the critical threshold as number interprete #### running_kernel -Check command object for the `check_running_kernel` plugin -provided by the `nagios-plugin-contrib` package on Debian. +The [check_running_kernel](https://packages.debian.org/stretch/nagios-plugins-contrib) plugin +is provided by the `nagios-plugin-contrib` package on Debian/Ubuntu. Custom attributes: @@ -2534,7 +2578,9 @@ running\_kernel\_use\_sudo | Whether to run the plugin with `sudo`. Defaults to #### iostats -The plugin [check_iostats](https://github.com/dnsmichi/icinga-plugins/blob/master/scripts/check_iostats) is used to monitor I/O with `iostats` on a Linux host. The default thresholds are rather high so you can use a grapher for baselining before setting your own. +The [check_iostats](https://github.com/dnsmichi/icinga-plugins/blob/master/scripts/check_iostats) plugin +uses the `iostat` binary to monitor I/O on a Linux host. The default thresholds are rather high +so you can use a grapher for baselining before setting your own. Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -2552,7 +2598,9 @@ iostats\_critical\_wait | **Required.** Critical threshold for % iowait (defaul #### iostat -The plugin [check_iostat](https://github.com/dnsmichi/icinga-plugins/blob/master/scripts/check_iostat) is used to monitor I/O with `iostat` on a Linux host. The default thresholds are rather high so you can use a grapher for baselining before setting your own. +The [check_iostat](https://github.com/dnsmichi/icinga-plugins/blob/master/scripts/check_iostat) plugin +uses the `iostat` binary to monitor disk I/O on a Linux host. The default thresholds are rather high +so you can use a grapher for baselining before setting your own. Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -2568,7 +2616,7 @@ iostat\_cwrite | **Required.** Critical threshold for KB/s writes (default: 200) #### yum -The plugin [check_yum](https://github.com/calestyo/check_yum) is used to check the YUM package +The [check_yum](https://github.com/calestyo/check_yum) plugin checks the YUM package management system for package updates. The plugin requires the `yum-plugin-security` package to differentiate between security and normal updates. @@ -2592,9 +2640,12 @@ This category includes all plugins for various storage and object storage techno #### glusterfs -The plugin [glusterfs](https://www.unixadm.org/software/nagios-stuff/checks/check_glusterfs) is used to check the GlusterFS storage health on the server. +The [glusterfs](https://www.unixadm.org/software/nagios-stuff/checks/check_glusterfs) plugin +is used to check the GlusterFS storage health on the server. The plugin requires `sudo` permissions. +Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): + Name | Description ---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ glusterfs_perfdata | **Optional.** Print perfdata of all or the specified volume. @@ -2612,7 +2663,9 @@ This category includes all plugins for various virtualization technologies. #### esxi_hardware -The plugin `esxi_hardware` is a plugin to monitor hardware of ESXi servers through the vmware api and cim service. It is provided by `Claudio Kuenzler` on [http://www.claudiokuenzler.com](http://www.claudiokuenzler.com/nagios-plugins/check_esxi_hardware.php). For instruction on creating the required local user and workarounds for some hardware types have a look on his homepage. +The [check_esxi_hardware.py](http://www.claudiokuenzler.com/nagios-plugins/check_esxi_hardware.php) plugin +uses the [pywbem](http://pywbem.github.io/pywbem/) Python library to monitor the hardware of ESXi servers +through the [VMWare API](https://www.vmware.com/support/pubs/sdk_pubs.html) and CIM service. Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -2636,7 +2689,7 @@ esxi_hardware_nofan | **Optional.** Do not collect fan performance data, whe Check commands for the [check_vmware_esx](https://github.com/BaldMansMojo/check_vmware_esx) plugin. -##### vmware-esx-dc-volumes +**vmware-esx-dc-volumes** Check command object for the `check_vmware_esx` plugin. Shows all datastore volumes info. @@ -2669,7 +2722,7 @@ vmware_warn | **Optional.** The warning threshold for volumes. Defau vmware_crit | **Optional.** The critical threshold for volumes. Defaults to "90%". -##### vmware-esx-dc-runtime-info +**vmware-esx-dc-runtime-info** Check command object for the `check_vmware_esx` plugin. Shows all runtime info for the datacenter/Vcenter. @@ -2692,7 +2745,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-dc-runtime-listvms +**vmware-esx-dc-runtime-listvms** Check command object for the `check_vmware_esx` plugin. List of vmware machines and their power state. BEWARE!! In larger environments systems can cause trouble displaying the informations needed due to the mass of data. Use **vmware_alertonly** to avoid this. @@ -2720,7 +2773,7 @@ vmware_isregexp | **Optional.** Treat blacklist and whitelist expression vmware_multiline | **Optional.** Multiline output in overview. This mean technically that a multiline output uses a HTML **\** for the GUI. No value defined as default. -##### vmware-esx-dc-runtime-listhost +**vmware-esx-dc-runtime-listhost** Check command object for the `check_vmware_esx` plugin. List of VMware ESX hosts and their power state. @@ -2748,7 +2801,7 @@ vmware_isregexp | **Optional.** Treat blacklist and whitelist expression vmware_multiline | **Optional.** Multiline output in overview. This mean technically that a multiline output uses a HTML **\** for the GUI. No value defined as default. -##### vmware-esx-dc-runtime-listcluster +**vmware-esx-dc-runtime-listcluster** Check command object for the `check_vmware_esx` plugin. List of VMware clusters and their states. @@ -2776,7 +2829,7 @@ vmware_isregexp | **Optional.** Treat blacklist and whitelist expression vmware_multiline | **Optional.** Multiline output in overview. This mean technically that a multiline output uses a HTML **\** for the GUI. No value defined as default. -##### vmware-esx-dc-runtime-issues +**vmware-esx-dc-runtime-issues** Check command object for the `check_vmware_esx` plugin. All issues for the host. @@ -2803,7 +2856,7 @@ vmware_isregexp | **Optional.** Treat blacklist and whitelist expression vmware_multiline | **Optional.** Multiline output in overview. This mean technically that a multiline output uses a HTML **\** for the GUI. No value defined as default. -##### vmware-esx-dc-runtime-status +**vmware-esx-dc-runtime-status** Check command object for the `check_vmware_esx` plugin. Overall object status (gray/green/red/yellow). @@ -2826,7 +2879,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-dc-runtime-tools +**vmware-esx-dc-runtime-tools** Check command object for the `check_vmware_esx` plugin. Vmware Tools status. @@ -2856,7 +2909,7 @@ vmware_multiline | **Optional.** Multiline output in overview. This mean vmware_openvmtools | **Optional** Prevent CRITICAL state for installed and running Open VM Tools. -##### vmware-esx-soap-host-check +**vmware-esx-soap-host-check** Check command object for the `check_vmware_esx` plugin. Simple check to verify a successfull connection to VMware SOAP API. @@ -2879,7 +2932,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-soap-host-uptime +**vmware-esx-soap-host-uptime** Check command object for the `check_vmware_esx` plugin. Displays uptime of the VMware host. @@ -2902,7 +2955,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-soap-host-cpu +**vmware-esx-soap-host-cpu** Check command object for the `check_vmware_esx` plugin. CPU usage in percentage. @@ -2927,7 +2980,7 @@ vmware_warn | **Optional.** The warning threshold in percent. Defaul vmware_crit | **Optional.** The critical threshold in percent. Defaults to "90%". -##### vmware-esx-soap-host-cpu-ready +**vmware-esx-soap-host-cpu-ready** Check command object for the `check_vmware_esx` plugin. Percentage of time that the virtual machine was ready, but could not get scheduled to run on the physical CPU. CPU ready time is dependent on the number of virtual machines on the host and their CPU loads. High or growing ready time can be a hint CPU bottlenecks. @@ -2950,7 +3003,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-soap-host-cpu-wait +**vmware-esx-soap-host-cpu-wait** Check command object for the `check_vmware_esx` plugin. CPU time spent in wait state. The wait total includes time spent the CPU idle, CPU swap wait, and CPU I/O wait states. High or growing wait time can be a hint I/O bottlenecks. @@ -2973,7 +3026,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-soap-host-cpu-usage +**vmware-esx-soap-host-cpu-usage** Check command object for the `check_vmware_esx` plugin. Actively used CPU of the host, as a percentage of the total available CPU. Active CPU is approximately equal to the ratio of the used CPU to the available CPU. @@ -2998,7 +3051,7 @@ vmware_warn | **Optional.** The warning threshold in percent. Defaul vmware_crit | **Optional.** The critical threshold in percent. Defaults to "90%". -##### vmware-esx-soap-host-mem +**vmware-esx-soap-host-mem** Check command object for the `check_vmware_esx` plugin. All mem info(except overall and no thresholds). @@ -3021,7 +3074,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-soap-host-mem-usage +**vmware-esx-soap-host-mem-usage** Check command object for the `check_vmware_esx` plugin. Average mem usage in percentage. @@ -3046,7 +3099,7 @@ vmware_warn | **Optional.** The warning threshold in percent. Defaul vmware_crit | **Optional.** The critical threshold in percent. Defaults to "90%". -##### vmware-esx-soap-host-mem-consumed +**vmware-esx-soap-host-mem-consumed** Check command object for the `check_vmware_esx` plugin. Amount of machine memory used on the host. Consumed memory includes Includes memory used by the Service Console, the VMkernel vSphere services, plus the total consumed metrics for all running virtual machines in MB. @@ -3071,7 +3124,7 @@ vmware_warn | **Optional.** The warning threshold in percent. No val vmware_crit | **Optional.** The critical threshold in percent. No value defined as default. -##### vmware-esx-soap-host-mem-swapused +**vmware-esx-soap-host-mem-swapused** Check command object for the `check_vmware_esx` plugin. Amount of memory that is used by swap. Sum of memory swapped of all powered on VMs and vSphere services on the host in MB. In case of an error all VMs with their swap used will be displayed. @@ -3097,7 +3150,7 @@ vmware_crit | **Optional.** The critical threshold in percent. No va vmware_multiline | **Optional.** Multiline output in overview. This mean technically that a multiline output uses a HTML **\** for the GUI. No value defined as default. -##### vmware-esx-soap-host-mem-overhead +**vmware-esx-soap-host-mem-overhead** Check command object for the `check_vmware_esx` plugin. Additional mem used by VM Server in MB. @@ -3122,7 +3175,7 @@ vmware_warn | **Optional.** The warning threshold in percent. No val vmware_crit | **Optional.** The critical threshold in percent. No value defined as default. -##### vmware-esx-soap-host-mem-memctl +**vmware-esx-soap-host-mem-memctl** Check command object for the `check_vmware_esx` plugin. The sum of all vmmemctl values in MB for all powered-on virtual machines, plus vSphere services on the host. If the balloon target value is greater than the balloon value, the VMkernel inflates the balloon, causing more virtual machine memory to be reclaimed. If the balloon target value is less than the balloon value, the VMkernel deflates the balloon, which allows the virtual machine to consume additional memory if needed (used by VM memory control driver). In case of an error all VMs with their vmmemctl values will be displayed. @@ -3148,7 +3201,7 @@ vmware_crit | **Optional.** The critical threshold in percent. No va vmware_multiline | **Optional.** Multiline output in overview. This mean technically that a multiline output uses a HTML **\** for the GUI. No value defined as default. -##### vmware-esx-soap-host-net +**vmware-esx-soap-host-net** Check command object for the `check_vmware_esx` plugin. Shows net info. @@ -3173,7 +3226,7 @@ vmware_exclude | **Optional.** Blacklist NICs. No value defined as defa vmware_isregexp | **Optional.** Treat blacklist expression as regexp. -##### vmware-esx-soap-host-net-usage +**vmware-esx-soap-host-net-usage** Check command object for the `check_vmware_esx` plugin. Overall network usage in KBps(Kilobytes per Second). @@ -3198,7 +3251,7 @@ vmware_warn | **Optional.** The warning threshold in KBps(Kilobytes vmware_crit | **Optional.** The critical threshold in KBps(Kilobytes per Second). No value defined as default. -##### vmware-esx-soap-host-net-receive +**vmware-esx-soap-host-net-receive** Check command object for the `check_vmware_esx` plugin. Data receive in KBps(Kilobytes per Second). @@ -3223,7 +3276,7 @@ vmware_warn | **Optional.** The warning threshold in KBps(Kilobytes vmware_crit | **Optional.** The critical threshold in KBps(Kilobytes per Second). No value defined as default. -##### vmware-esx-soap-host-net-send +**vmware-esx-soap-host-net-send** Check command object for the `check_vmware_esx` plugin. Data send in KBps(Kilobytes per Second). @@ -3248,7 +3301,7 @@ vmware_warn | **Optional.** The warning threshold in KBps(Kilobytes vmware_crit | **Optional.** The critical threshold in KBps(Kilobytes per Second). No value defined as default. -##### vmware-esx-soap-host-net-nic +**vmware-esx-soap-host-net-nic** Check command object for the `check_vmware_esx` plugin. Check all active NICs. @@ -3273,7 +3326,7 @@ vmware_exclude | **Optional.** Blacklist NICs. No value defined as defa vmware_isregexp | **Optional.** Treat blacklist expression as regexp. -##### vmware-esx-soap-host-volumes +**vmware-esx-soap-host-volumes** Check command object for the `check_vmware_esx` plugin. Shows all datastore volumes info. @@ -3306,7 +3359,7 @@ vmware_crit | **Optional.** The critical threshold for volumes. Defa vmware_spaceleft | **Optional.** This has to be used in conjunction with thresholds as mentioned above. -##### vmware-esx-soap-host-io +**vmware-esx-soap-host-io** Check command object for the `check_vmware_esx` plugin. Shows all disk io info. Without subselect no thresholds can be given. All I/O values are aggregated from historical intervals over the past 24 hours with a 5 minute sample rate. @@ -3329,7 +3382,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-soap-host-io-aborted +**vmware-esx-soap-host-io-aborted** Check command object for the `check_vmware_esx` plugin. Number of aborted SCSI commands. @@ -3354,7 +3407,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-host-io-resets +**vmware-esx-soap-host-io-resets** Check command object for the `check_vmware_esx` plugin. Number of SCSI bus resets. @@ -3379,7 +3432,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-host-io-read +**vmware-esx-soap-host-io-read** Check command object for the `check_vmware_esx` plugin. Average number of kilobytes read from the disk each second. @@ -3404,7 +3457,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-host-io-read-latency +**vmware-esx-soap-host-io-read-latency** Check command object for the `check_vmware_esx` plugin. Average amount of time (ms) to process a SCSI read command issued from the Guest OS to the virtual machine. @@ -3429,7 +3482,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-host-io-write +**vmware-esx-soap-host-io-write** Check command object for the `check_vmware_esx` plugin. Average number of kilobytes written to disk each second. @@ -3454,7 +3507,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-host-io-write-latency +**vmware-esx-soap-host-io-write-latency** Check command object for the `check_vmware_esx` plugin. Average amount of time (ms) taken to process a SCSI write command issued by the Guest OS to the virtual machine. @@ -3479,7 +3532,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-host-io-usage +**vmware-esx-soap-host-io-usage** Check command object for the `check_vmware_esx` plugin. Aggregated disk I/O rate. For hosts, this metric includes the rates for all virtual machines running on the host. @@ -3504,7 +3557,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-host-io-kernel-latency +**vmware-esx-soap-host-io-kernel-latency** Check command object for the `check_vmware_esx` plugin. Average amount of time (ms) spent by VMkernel processing each SCSI command. @@ -3529,7 +3582,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-host-io-device-latency +**vmware-esx-soap-host-io-device-latency** Check command object for the `check_vmware_esx` plugin. Average amount of time (ms) to complete a SCSI command from the physical device. @@ -3554,7 +3607,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-host-io-queue-latency +**vmware-esx-soap-host-io-queue-latency** Check command object for the `check_vmware_esx` plugin. Average amount of time (ms) spent in the VMkernel queue. @@ -3579,7 +3632,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-host-io-total-latency +**vmware-esx-soap-host-io-total-latency** Check command object for the `check_vmware_esx` plugin. Average amount of time (ms) taken during the collection interval to process a SCSI command issued by the guest OS to the virtual machine. The sum of kernelWriteLatency and deviceWriteLatency. @@ -3604,7 +3657,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-host-media +**vmware-esx-soap-host-media** Check command object for the `check_vmware_esx` plugin. List vm's with attached host mounted media like cd,dvd or floppy drives. This is important for monitoring because a virtual machine with a mount cd or dvd drive can not be moved to another host. @@ -3631,7 +3684,7 @@ vmware_isregexp | **Optional.** Treat blacklist and whitelist expression vmware_multiline | **Optional.** Multiline output in overview. This mean technically that a multiline output uses a HTML **\** for the GUI. No value defined as default. -##### vmware-esx-soap-host-service +**vmware-esx-soap-host-service** Check command object for the `check_vmware_esx` plugin. Shows host service info. @@ -3658,7 +3711,7 @@ vmware_isregexp | **Optional.** Treat blacklist and whitelist expression vmware_multiline | **Optional.** Multiline output in overview. This mean technically that a multiline output uses a HTML **\** for the GUI. No value defined as default. -##### vmware-esx-soap-host-runtime +**vmware-esx-soap-host-runtime** Check command object for the `check_vmware_esx` plugin. Shows runtime info: VMs, overall status, connection state, health, storagehealth, temperature and sensor are represented as one value and without thresholds. @@ -3681,7 +3734,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-soap-host-runtime-con +**vmware-esx-soap-host-runtime-con** Check command object for the `check_vmware_esx` plugin. Shows connection state. @@ -3704,7 +3757,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-soap-host-runtime-listvms +**vmware-esx-soap-host-runtime-listvms** Check command object for the `check_vmware_esx` plugin. List of VMware machines and their status. @@ -3731,7 +3784,7 @@ vmware_isregexp | **Optional.** Treat blacklist and whitelist expression vmware_multiline | **Optional.** Multiline output in overview. This mean technically that a multiline output uses a HTML **\** for the GUI. No value defined as default. -##### vmware-esx-soap-host-runtime-status +**vmware-esx-soap-host-runtime-status** Check command object for the `check_vmware_esx` plugin. Overall object status (gray/green/red/yellow). @@ -3754,7 +3807,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-soap-host-runtime-health +**vmware-esx-soap-host-runtime-health** Check command object for the `check_vmware_esx` plugin. Checks cpu/storage/memory/sensor status. @@ -3780,7 +3833,7 @@ vmware_include | **Optional.** Whitelist status name. No value defined vmware_isregexp | **Optional.** Treat blacklist and whitelist expressions as regexp. -##### vmware-esx-soap-host-runtime-health-listsensors +**vmware-esx-soap-host-runtime-health-listsensors** Check command object for the `check_vmware_esx` plugin. List all available sensors(use for listing purpose only). @@ -3806,7 +3859,7 @@ vmware_include | **Optional.** Whitelist status name. No value defined vmware_isregexp | **Optional.** Treat blacklist and whitelist expressions as regexp. -##### vmware-esx-soap-host-runtime-health-nostoragestatus +**vmware-esx-soap-host-runtime-health-nostoragestatus** Check command object for the `check_vmware_esx` plugin. This is to avoid a double alarm if you use **vmware-esx-soap-host-runtime-health** and **vmware-esx-soap-host-runtime-storagehealth**. @@ -3832,7 +3885,7 @@ vmware_include | **Optional.** Whitelist status name. No value defined vmware_isregexp | **Optional.** Treat blacklist and whitelist expressions as regexp. -##### vmware-esx-soap-host-runtime-storagehealth +**vmware-esx-soap-host-runtime-storagehealth** Check command object for the `check_vmware_esx` plugin. Local storage status check. @@ -3859,7 +3912,7 @@ vmware_isregexp | **Optional.** Treat blacklist and whitelist expression vmware_multiline | **Optional.** Multiline output in overview. This mean technically that a multiline output uses a HTML **\** for the GUI. No value defined as default. -##### vmware-esx-soap-host-runtime-temp +**vmware-esx-soap-host-runtime-temp** Check command object for the `check_vmware_esx` plugin. Lists all temperature sensors. @@ -3886,7 +3939,7 @@ vmware_isregexp | **Optional.** Treat blacklist and whitelist expression vmware_multiline | **Optional.** Multiline output in overview. This mean technically that a multiline output uses a HTML **\** for the GUI. No value defined as default. -##### vmware-esx-soap-host-runtime-issues +**vmware-esx-soap-host-runtime-issues** Check command object for the `check_vmware_esx` plugin. Lists all configuration issues for the host. @@ -3913,7 +3966,7 @@ vmware_isregexp | **Optional.** Treat blacklist and whitelist expression vmware_multiline | **Optional.** Multiline output in overview. This mean technically that a multiline output uses a HTML **\** for the GUI. No value defined as default. -##### vmware-esx-soap-host-storage +**vmware-esx-soap-host-storage** Check command object for the `check_vmware_esx` plugin. Shows Host storage info. @@ -3939,7 +3992,7 @@ vmware_include | **Optional.** Whitelist adapters, luns and paths. No v vmware_isregexp | **Optional.** Treat blacklist and whitelist expressions as regexp. -##### vmware-esx-soap-host-storage-adapter +**vmware-esx-soap-host-storage-adapter** Check command object for the `check_vmware_esx` plugin. List host bus adapters. @@ -3966,7 +4019,7 @@ vmware_isregexp | **Optional.** Treat blacklist and whitelist expression vmware_multiline | **Optional.** Multiline output in overview. This mean technically that a multiline output uses a HTML **\** for the GUI. No value defined as default. -##### vmware-esx-soap-host-storage-lun +**vmware-esx-soap-host-storage-lun** Check command object for the `check_vmware_esx` plugin. List SCSI logical units. The listing will include: LUN, canonical name of the disc, all of displayed name which is not part of the canonical name and status. @@ -3993,7 +4046,7 @@ vmware_isregexp | **Optional.** Treat blacklist and whitelist expression vmware_multiline | **Optional.** Multiline output in overview. This mean technically that a multiline output uses a HTML **\** for the GUI. No value defined as default. -##### vmware-esx-soap-host-storage-path +**vmware-esx-soap-host-storage-path** Check command object for the `check_vmware_esx` plugin. List multipaths and the associated paths. @@ -4021,7 +4074,7 @@ vmware_isregexp | **Optional.** Treat blacklist and whitelist expression vmware_multiline | **Optional.** Multiline output in overview. This mean technically that a multiline output uses a HTML **\** for the GUI. No value defined as default. -##### vmware-esx-soap-vm-cpu +**vmware-esx-soap-vm-cpu** Check command object for the `check_vmware_esx` plugin. Shows all CPU usage info. @@ -4046,7 +4099,7 @@ vmware_authfile | **Optional.** Use auth file instead username/password -##### vmware-esx-soap-vm-cpu-ready +**vmware-esx-soap-vm-cpu-ready** Check command object for the `check_vmware_esx` plugin. Percentage of time that the virtual machine was ready, but could not get scheduled to run on the physical CPU. @@ -4072,7 +4125,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-vm-cpu-wait +**vmware-esx-soap-vm-cpu-wait** Check command object for the `check_vmware_esx` plugin. CPU time spent in wait state. The wait total includes time spent the CPU idle, CPU swap wait, and CPU I/O wait states. High or growing wait time can be a hint I/O bottlenecks. @@ -4098,7 +4151,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-vm-cpu-usage +**vmware-esx-soap-vm-cpu-usage** Check command object for the `check_vmware_esx` plugin. Amount of actively used virtual CPU, as a percentage of total available CPU. This is the host's view of the CPU usage, not the guest operating system view. It is the average CPU utilization over all available virtual CPUs in the virtual machine. @@ -4124,7 +4177,7 @@ vmware_warn | **Optional.** Warning threshold in percent. Defaults t vmware_crit | **Optional.** Critical threshold in percent. Defaults to "90%". -##### vmware-esx-soap-vm-mem +**vmware-esx-soap-vm-mem** Check command object for the `check_vmware_esx` plugin. Shows all memory info, except overall. @@ -4148,7 +4201,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-soap-vm-mem-usage +**vmware-esx-soap-vm-mem-usage** Check command object for the `check_vmware_esx` plugin. Average mem usage in percentage of configured virtual machine "physical" memory. @@ -4174,7 +4227,7 @@ vmware_warn | **Optional.** Warning threshold in percent. Defaults t vmware_crit | **Optional.** Critical threshold in percent. Defaults to "90%". -##### vmware-esx-soap-vm-mem-consumed +**vmware-esx-soap-vm-mem-consumed** Check command object for the `check_vmware_esx` plugin. Amount of guest physical memory in MB consumed by the virtual machine for guest memory. Consumed memory does not include overhead memory. It includes shared memory and memory that might be reserved, but not actually used. Use this metric for charge-back purposes.
**vm consumed memory = memory granted -- memory saved** @@ -4201,7 +4254,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-vm-mem-memctl +**vmware-esx-soap-vm-mem-memctl** Check command object for the `check_vmware_esx` plugin. Amount of guest physical memory that is currently reclaimed from the virtual machine through ballooning. This is the amount of guest physical memory that has been allocated and pinned by the balloon driver. @@ -4228,7 +4281,7 @@ vmware_crit | **Optional.** The critical threshold. No value defined -##### vmware-esx-soap-vm-net +**vmware-esx-soap-vm-net** Check command object for the `check_vmware_esx` plugin. Shows net info. @@ -4252,7 +4305,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-soap-vm-net-usage +**vmware-esx-soap-vm-net-usage** Check command object for the `check_vmware_esx` plugin. Overall network usage in KBps(Kilobytes per Second). @@ -4278,7 +4331,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-vm-net-receive +**vmware-esx-soap-vm-net-receive** Check command object for the `check_vmware_esx` plugin. Receive in KBps(Kilobytes per Second). @@ -4304,7 +4357,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-vm-net-send +**vmware-esx-soap-vm-net-send** Check command object for the `check_vmware_esx` plugin. Send in KBps(Kilobytes per Second). @@ -4330,7 +4383,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-vm-io +**vmware-esx-soap-vm-io** Check command object for the `check_vmware_esx` plugin. SShows all disk io info. Without subselect no thresholds can be given. All I/O values are aggregated from historical intervals over the past 24 hours with a 5 minute sample rate. @@ -4354,7 +4407,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-soap-vm-io-read +**vmware-esx-soap-vm-io-read** Check command object for the `check_vmware_esx` plugin. Average number of kilobytes read from the disk each second. @@ -4380,7 +4433,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-vm-io-write +**vmware-esx-soap-vm-io-write** Check command object for the `check_vmware_esx` plugin. Average number of kilobytes written to disk each second. @@ -4406,7 +4459,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-vm-io-usage +**vmware-esx-soap-vm-io-usage** Check command object for the `check_vmware_esx` plugin. Aggregated disk I/O rate. @@ -4432,7 +4485,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-vm-runtime +**vmware-esx-soap-vm-runtime** Check command object for the `check_vmware_esx` plugin. Shows virtual machine runtime info. @@ -4456,7 +4509,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-soap-vm-runtime-con +**vmware-esx-soap-vm-runtime-con** Check command object for the `check_vmware_esx` plugin. Shows the connection state. @@ -4480,7 +4533,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-soap-vm-runtime-powerstate +**vmware-esx-soap-vm-runtime-powerstate** Check command object for the `check_vmware_esx` plugin. Shows virtual machine power state: poweredOn, poweredOff or suspended. @@ -4504,7 +4557,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-soap-vm-runtime-status +**vmware-esx-soap-vm-runtime-status** Check command object for the `check_vmware_esx` plugin. Overall object status (gray/green/red/yellow). @@ -4528,7 +4581,7 @@ vmware_password | **Optional.** The username's password. No value define vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-soap-vm-runtime-consoleconnections +**vmware-esx-soap-vm-runtime-consoleconnections** Check command object for the `check_vmware_esx` plugin. Console connections to virtual machine. @@ -4554,7 +4607,7 @@ vmware_warn | **Optional.** The warning threshold. No value defined vmware_crit | **Optional.** The critical threshold. No value defined as default. -##### vmware-esx-soap-vm-runtime-gueststate +**vmware-esx-soap-vm-runtime-gueststate** Check command object for the `check_vmware_esx` plugin. Guest OS status. Needs VMware Tools installed and running. @@ -4577,7 +4630,7 @@ vmware_username | **Optional.** The username to connect to Host or vCent vmware_password | **Optional.** The username's password. No value defined as default. vmware_authfile | **Optional.** Use auth file instead username/password to session connect. No effect if **vmware_username** and **vmware_password** are defined
**Autentication file content:**
username=vmuser
password=p@ssw0rd -##### vmware-esx-soap-vm-runtime-tools +**vmware-esx-soap-vm-runtime-tools** Check command object for the `check_vmware_esx` plugin. Guest OS status. VMware tools status. @@ -4602,7 +4655,7 @@ vmware_authfile | **Optional.** Use auth file instead username/password vmware_openvmtools | **Optional** Prevent CRITICAL state for installed and running Open VM Tools. -##### vmware-esx-soap-vm-runtime-issues +**vmware-esx-soap-vm-runtime-issues** Check command object for the `check_vmware_esx` plugin. All issues for the virtual machine. @@ -4633,7 +4686,15 @@ This category includes all plugins for web-based checks. #### webinject -Check command object for the [check_webinject](http://www.webinject.org/manual.html) plugin. +The [check_webinject](https://labs.consol.de/de/nagios/check_webinject/index.html) plugin +uses [WebInject](http://www.webinject.org/manual.html) to test web applications +and web services in an automated fashion. +It can be used to test individual system components that have HTTP interfaces +(JSP, ASP, CGI, PHP, AJAX, Servlets, HTML Forms, XML/SOAP Web Services, REST, etc), +and can be used as a test harness to create a suite of HTTP level automated functional, +acceptance, and regression tests. A test harness allows you to run many test cases +and collect/report your results. WebInject offers real-time results +display and may also be used for monitoring system response times. Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -4648,7 +4709,11 @@ webinject_testcase_file | **Optional.** When you launch WebInject in console mod #### jmx4perl -The plugin `jmx4perl` utilizes the api provided by the jolokia web application to query java message beans on an application server. It is part of the perl module provided by Roland Huß on [cpan](http://search.cpan.org/~roland/jmx4perl/) including a detailed [documentation](http://search.cpan.org/~roland/jmx4perl/scripts/check_jmx4perl) containing installation tutorial, security advices und usage examples. +The [check_jmx4perl](http://search.cpan.org/~roland/jmx4perl/scripts/check_jmx4perl) plugin +uses the HTTP API exposed by the [Jolokia](https://jolokia.org) +web application and queries Java message beans on an application server. It is +part of the `JMX::Jmx4Perl` Perl module which includes detailed +[documentation](http://search.cpan.org/~roland/jmx4perl/scripts/check_jmx4perl). Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -4691,7 +4756,8 @@ jmx4perl_check | **Optional.** Name of a check configuration as de #### squid -Plugin for monitoring [Squid](https://exchange.icinga.com/exchange/check_squid). +The [check_squid](https://exchange.icinga.com/exchange/check_squid) plugin +uses the `squidclient` binary to monitor a [Squid proxy](http://www.squid-cache.org). Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -4710,13 +4776,15 @@ squid_timeout | **Optional.** Seconds before plugin times out (default: 15). #### nginx_status -Plugin for monitoring [nginx_status](https://github.com/regilero/check_nginx_status). +The [check_nginx_status.pl](https://github.com/regilero/check_nginx_status) plugin +uses the [/nginx_status](https://nginx.org/en/docs/http/ngx_http_stub_status_module.html) +HTTP endpoint which provides metrics for monitoring Nginx. Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): -Name | Description -------------------------|---------------------------------------------------------------------------------- -nginx_status_host_address | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, `address6` otherwise. +Name | Description +--------------------------------|---------------------------------------------------------------------------------- +nginx_status_host_address | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, `address6` otherwise. nginx_status_port | **Optional.** the http port. nginx_status_url | **Optional.** URL to use, instead of the default (http://`nginx_status_hostname`/nginx_status). nginx_status_servername | **Optional.** ServerName to use if you specified an IP to match the good Virtualhost in your target @@ -4733,7 +4801,9 @@ nginx_status_critical | **Optional.** Critical threshold (number of active conn #### apache_status -Plugin for monitoring [apache_status](https://github.com/lbetz/check_apache_status). +The [check_apache_status.pl](https://github.com/lbetz/check_apache_status) plugin +uses the [/server-status](https://httpd.apache.org/docs/current/mod/mod_status.html) +HTTP endpoint to monitor status metrics for the Apache webserver. Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -4750,7 +4820,8 @@ apache_status_critical | **Optional.** Critical threshold (number of open slots, #### kdc -Plugin for monitoring [kdc](https://exchange.nagios.org/directory/Plugins/Security/check_kdc/details). +The [check_kdc](https://exchange.nagios.org/directory/Plugins/Security/check_kdc/details) plugin +uses the Kerberos `kinit` binary to monitor Kerberos 5 KDC by acquiring a ticket. Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): @@ -4764,7 +4835,9 @@ kdc_keytab | **Required** Keytab file containing principal's key. #### rbl -Plugin for monitoring [rbl](https://github.com/matteocorti/check_rbl) +The [check_rbl](https://github.com/matteocorti/check_rbl) plugin +uses the `Net::DNS` Perl library to check whether your SMTP server +is blacklisted. Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): From 6903f5e034267f061e874f5948ecea94573bfe39 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 28 Mar 2017 15:36:16 +0200 Subject: [PATCH 18/19] Docs: Fix wrong code block formatting refs #4955 --- doc/10-icinga-template-library.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index d262e064e..fdd38fa57 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -1946,7 +1946,7 @@ is set to the path where the user installs custom plugins and can be enabled by uncommenting the corresponding line in [icinga2.conf](4-configuring-icinga-2.md#icinga2-conf): ``` -# vim /etc/icinga2/icinga2.conf +vim /etc/icinga2/icinga2.conf include ``` From f3fdf6f98c7549e8a1e2a3a8b4d9a4f229c5b512 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 29 Mar 2017 09:51:33 +0200 Subject: [PATCH 19/19] Release version 2.6.3 --- ChangeLog | 28 ++++++++++++++++++++++++++++ RELEASE.md | 4 ++-- doc/1-about.md | 28 ++++++++++++++++++++++++++++ icinga2.spec | 2 +- 4 files changed, 59 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 84393593d..9ac6638da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,34 @@ Please check [doc/1-about.md]. ## What's New +### What's New in Version 2.6.3 + +#### Changes + +This is a bugfix release which addresses a number of bugs we've found since +2.6.2 was released. It also contains a number of improvements for the Icinga +documentation. + +#### Feature + +* Feature 4955 (Documentation): Review CheckCommand documentation including external URLs +* Feature 5057 (Documentation): Update Security section in the Distributed Monitoring chapter +* Feature 5055 (Documentation): mysql_socket attribute missing in the documentation for the mysql CheckCommand +* Feature 5035 (Documentation): Docs: Typo in Distributed Monitoring chapter +* Feature 5029 (Documentation): Advanced topics: Wrong acknowledgement notification filter +* Feature 5030 (Documentation): Advanced topics: Mention the API and explain stick acks, fixed/flexible downtimes +* Feature 3133 (Documentation): [dev.icinga.com #9583] Add practical examples for apply expressions +* Feature 4996 (Documentation): documentation: mixed up host names in 6-distributed-monitoring.md +* Feature 4980 (Documentation): Add OpenBSD and AlpineLinux package repositories to the documentation +* Feature 4954 (Documentation): Add an example for /v1/actions/process-check-result which uses filter/type + +#### Bugfixes + +* Bug 5080 (IDO): Missing index use can cause icinga_downtimehistory queries to hang indefinitely +* Bug 4603 (IDO): [dev.icinga.com #12597] With too many comments, Icinga reload process won't finish reconnecting to database +* Bug 4989 (Check Execution): Icinga daemon runs with nice 5 after reload +* Bug 4930 (Cluster): Change "Discarding 'config update object'" log messages to notice log level + ### What's New in Version 2.6.2 #### Changes diff --git a/RELEASE.md b/RELEASE.md index 63bbd9c89..482d09c21 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -4,7 +4,7 @@ Print this document. Specify the release version. - VERSION=2.6.2 + VERSION=2.6.3 ## Issues @@ -119,7 +119,7 @@ Create the nupkg package: Install the created icinga2 package locally: - choco install icinga2 -version 2.6.2 -fdv "%cd%" -source "'%cd%;https://chocolatey.org/api/v2/'" + choco install icinga2 -version 2.6.3 -fdv "%cd%" -source "'%cd%;https://chocolatey.org/api/v2/'" Upload the package to [chocolatey](https://chocolatey.org/packages/upload). diff --git a/doc/1-about.md b/doc/1-about.md index 4a1ba379e..1e5c902a4 100644 --- a/doc/1-about.md +++ b/doc/1-about.md @@ -44,6 +44,34 @@ file. ## What's New +### What's New in Version 2.6.3 + +#### Changes + +This is a bugfix release which addresses a number of bugs we've found since +2.6.2 was released. It also contains a number of improvements for the Icinga +documentation. + +#### Feature + +* Feature [4955](https://github.com/Icinga/icinga2/issues/4955) (Documentation): Review CheckCommand documentation including external URLs +* Feature [5057](https://github.com/Icinga/icinga2/issues/5057) (Documentation): Update Security section in the Distributed Monitoring chapter +* Feature [5055](https://github.com/Icinga/icinga2/issues/5055) (Documentation): mysql_socket attribute missing in the documentation for the mysql CheckCommand +* Feature [5035](https://github.com/Icinga/icinga2/issues/5035) (Documentation): Docs: Typo in Distributed Monitoring chapter +* Feature [5029](https://github.com/Icinga/icinga2/issues/5029) (Documentation): Advanced topics: Wrong acknowledgement notification filter +* Feature [5030](https://github.com/Icinga/icinga2/issues/5030) (Documentation): Advanced topics: Mention the API and explain stick acks, fixed/flexible downtimes +* Feature [3133](https://github.com/Icinga/icinga2/issues/3133) (Documentation): [dev.icinga.com #9583] Add practical examples for apply expressions +* Feature [4996](https://github.com/Icinga/icinga2/issues/4996) (Documentation): documentation: mixed up host names in 6-distributed-monitoring.md +* Feature [4980](https://github.com/Icinga/icinga2/issues/4980) (Documentation): Add OpenBSD and AlpineLinux package repositories to the documentation +* Feature [4954](https://github.com/Icinga/icinga2/issues/4954) (Documentation): Add an example for /v1/actions/process-check-result which uses filter/type + +#### Bugfixes + +* Bug [5080](https://github.com/Icinga/icinga2/issues/5080) (IDO): Missing index use can cause icinga_downtimehistory queries to hang indefinitely +* Bug [4603](https://github.com/Icinga/icinga2/issues/4603) (IDO): [dev.icinga.com #12597] With too many comments, Icinga reload process won't finish reconnecting to database +* Bug [4989](https://github.com/Icinga/icinga2/issues/4989) (Check Execution): Icinga daemon runs with nice 5 after reload +* Bug [4930](https://github.com/Icinga/icinga2/issues/4930) (Cluster): Change "Discarding 'config update object'" log messages to notice log level + ### What's New in Version 2.6.2 #### Changes diff --git a/icinga2.spec b/icinga2.spec index 2204d6055..74e34564b 100644 --- a/icinga2.spec +++ b/icinga2.spec @@ -66,7 +66,7 @@ Summary: Network monitoring application Name: icinga2 -Version: 2.6.2 +Version: 2.6.3 Release: %{revision}%{?dist} License: GPL-2.0+ Group: Applications/System