mirror of https://github.com/Icinga/icinga2.git
ITL: Add logstash CheckCommand
fixes #12755 Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
This commit is contained in:
parent
f8e6d2d603
commit
9756775902
|
@ -4741,3 +4741,24 @@ glusterfs_disk_warning | **Optional.** Warn if disk usage is above *DISKWARN
|
|||
glusterfs_disk_critical | **Optional.** Return a critical error if disk usage is above *DISKCRIT*. Defaults to 95 (percent).
|
||||
glusterfs_inode_warning | **Optional.** Warn if inode usage is above *DISKWARN*. Defaults to 90 (percent).
|
||||
glusterfs_inode_critical | **Optional.** Return a critical error if inode usage is above *DISKCRIT*. Defaults to 95 (percent).
|
||||
|
||||
### <a id="plugins-contrib-logmanagement"></a> Logmanagement
|
||||
|
||||
This category includes all plugins for services dealing with logfiles and logevents
|
||||
|
||||
#### <a id="plugins-contrib-command-logstash"></a> logstash
|
||||
|
||||
The [logstash](https://github.com/widhalmt/check_logstash) plugin connects to the Node API of Logstash. This feature was introduced with Logstash version 5.0 so the plugin won't work with prior versions of Logstash. The Node API is not activated by default, you will have to reconfigure your Logstash installation for the plugin to connect.
|
||||
|
||||
Name | Description
|
||||
---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
logstash_hostname | **Optional.** Hostname where Logstash is running. Defaults to `check_address`
|
||||
logstash_port | **Optional.** Port where Logstash is listening for API requests. Defaults to 9600
|
||||
logstash_filedesc_warn | **Optional.** Warning threshold of file descriptor usage in percent. Defaults to 85 (percent).
|
||||
logstash_filedesc_crit | **Optional.** Critical threshold of file descriptor usage in percent. Defaults to 95 (percent).
|
||||
logstash_heap_warn | **Optional.** Warning threshold of heap usage in percent. Defaults to 70 (percent).
|
||||
logstash_heap_crit | **Optional.** Critical threshold of heap usage in percent Defaults to 80 (percent).
|
||||
logstash_inflight_warn | **Optional.** Warning threshold of inflight events.
|
||||
logstash_inflight_crit | **Optional.** Critical threshold of inflight events.
|
||||
logstash_cpu_warn | **Optional.** Warning threshold for cpu usage in percent.
|
||||
logstash_cpu_crit | **Optional.** Critical threshold for cpu usage in percent.
|
||||
|
|
|
@ -16,6 +16,6 @@
|
|||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
install(
|
||||
FILES databases.conf icingacli.conf ipmi.conf network-components.conf operating-system.conf virtualization.conf vmware.conf storage.conf web.conf hardware.conf network-services.conf metrics.conf
|
||||
FILES databases.conf icingacli.conf ipmi.conf logmanagement.conf network-components.conf operating-system.conf virtualization.conf vmware.conf storage.conf web.conf hardware.conf network-services.conf metrics.conf
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/icinga2/include/plugins-contrib.d
|
||||
)
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
/******************************************************************************
|
||||
* Icinga 2 *
|
||||
* Copyright (C) 2012-2016 Icinga Development Team (https://www.icinga.org/) *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License *
|
||||
* as published by the Free Software Foundation; either version 2 *
|
||||
* of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the Free Software Foundation *
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
******************************************************************************/
|
||||
|
||||
object CheckCommand "logstash" {
|
||||
import "plugin-check-command"
|
||||
command = [ PluginContribDir + "/check_logstash" ]
|
||||
arguments = {
|
||||
"-H" = {
|
||||
value = "$logstash_hostname$"
|
||||
description = "Hostname where Logstash is running"
|
||||
}
|
||||
"-p" = {
|
||||
value = "$logstash_port$"
|
||||
description = "Port where Logstash is listening for API requests"
|
||||
}
|
||||
"--file-descriptor-threshold-warn" = {
|
||||
value = "$logstash_filedesc_warn$"
|
||||
description = "Warning threshold of file descriptor usage in percent"
|
||||
}
|
||||
"--file-descriptor-threshold-crit" = {
|
||||
value = "$logstash_filedesc_crit$"
|
||||
description = "Critical threshold of file descriptor usage in percent"
|
||||
}
|
||||
"--heap-usage-threshold-warn" = {
|
||||
value = "$logstash_heap_warn$"
|
||||
description = "Warning threshold of heap usage in percent"
|
||||
}
|
||||
"--heap-usage-threshold-crit" = {
|
||||
value = "$logstash_heap_crit$"
|
||||
description = "Critical threshold of heap usage in percent"
|
||||
}
|
||||
"--inflight-events-warn" = {
|
||||
value = "$logstash_inflight_warn$"
|
||||
description = "Warning threshold of inflight events"
|
||||
}
|
||||
"--inflight-events-crit" = {
|
||||
value = "$logstash_inflight_crit$"
|
||||
description = "Critical threshold of inflight events"
|
||||
}
|
||||
"--cpu-usage-threshold-warn" = {
|
||||
value = "$logstash_cpu_warn$"
|
||||
description = "Warning threshold for cpu usage in percent"
|
||||
}
|
||||
"--cpu-usage-threshold-crit" = {
|
||||
value = "$logstash_cpu_crit$"
|
||||
description = "Critical threshold for cpu usage in percent"
|
||||
}
|
||||
|
||||
}
|
||||
vars.logstash_hostname = "$check_address$"
|
||||
vars.logstash_port = 9600
|
||||
vars.logstash_filedesc_warn = 85
|
||||
vars.logstash_filedesc_crit = 95
|
||||
vars.logstash_heap_warn = 70
|
||||
vars.logstash_heap_crit = 80
|
||||
}
|
Loading…
Reference in New Issue