]> granicus.if.org Git - icinga2/blob - itl/plugins-contrib.d/logmanagement.conf
ITL: Add logstash CheckCommand
[icinga2] / itl / plugins-contrib.d / logmanagement.conf
1 /******************************************************************************
2  * Icinga 2                                                                   *
3  * Copyright (C) 2012-2016 Icinga Development Team (https://www.icinga.org/)  *
4  *                                                                            *
5  * This program is free software; you can redistribute it and/or              *
6  * modify it under the terms of the GNU General Public License                *
7  * as published by the Free Software Foundation; either version 2             *
8  * of the License, or (at your option) any later version.                     *
9  *                                                                            *
10  * This program is distributed in the hope that it will be useful,            *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
13  * GNU General Public License for more details.                               *
14  *                                                                            *
15  * You should have received a copy of the GNU General Public License          *
16  * along with this program; if not, write to the Free Software Foundation     *
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
18  ******************************************************************************/
19
20 object CheckCommand "logstash" {
21         import "plugin-check-command"
22         command = [ PluginContribDir + "/check_logstash" ]
23         arguments = {
24                 "-H" = {
25                         value = "$logstash_hostname$"
26                         description = "Hostname where Logstash is running"
27                 }
28                 "-p" = {
29                         value = "$logstash_port$"
30                         description = "Port where Logstash is listening for API requests"
31                 }
32                 "--file-descriptor-threshold-warn" = {
33                         value = "$logstash_filedesc_warn$"
34                         description = "Warning threshold of file descriptor usage in percent"
35                 }
36                 "--file-descriptor-threshold-crit" = {
37                         value = "$logstash_filedesc_crit$"
38                         description = "Critical threshold of file descriptor usage in percent"
39                 }
40                 "--heap-usage-threshold-warn" = {
41                         value = "$logstash_heap_warn$"
42                         description = "Warning threshold of heap usage in percent"
43                 }
44                 "--heap-usage-threshold-crit" = {
45                         value = "$logstash_heap_crit$"
46                         description = "Critical threshold of heap usage in percent"
47                 }
48                 "--inflight-events-warn" = {
49                         value = "$logstash_inflight_warn$"
50                         description = "Warning threshold of inflight events"
51                 }
52                 "--inflight-events-crit" = {
53                         value = "$logstash_inflight_crit$"
54                         description = "Critical threshold of inflight events"
55                 }
56                 "--cpu-usage-threshold-warn" = {
57                         value = "$logstash_cpu_warn$"
58                         description = "Warning threshold for cpu usage in percent"
59                 }
60                 "--cpu-usage-threshold-crit" = {
61                         value = "$logstash_cpu_crit$"
62                         description = "Critical threshold for cpu usage in percent"
63                 }
64
65         }
66         vars.logstash_hostname = "$check_address$"
67         vars.logstash_port = 9600
68         vars.logstash_filedesc_warn = 85
69         vars.logstash_filedesc_crit = 95
70         vars.logstash_heap_warn = 70
71         vars.logstash_heap_crit = 80
72 }