Module: check_mk
Branch: master
Commit: f9c0fea8cf6d7abf033801b7b4d357353a8b8c7d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f9c0fea8cf6d7a…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Jul 2 18:08:13 2014 +0200
First steps in Wato global configuration cleanup
---
web/plugins/wato/check_mk_configuration.py | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index 4a0aaac..b7ea47e 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -25,6 +25,7 @@
# Boston, MA 02110-1301 USA.
+deprecated = _("Deprecated")
# .--Global Settings-----------------------------------------------------.
# | ____ _ _ _ ____ _ _ _ |
# | / ___| | ___ | |__ __ _| | / ___| ___| |_| |_(_)_ __ __ _ ___ |
@@ -1304,7 +1305,7 @@ register_configvar(group,
"option. This will retain the old service descriptions and the old "
"performance data.")))
-register_configvar(group,
+register_configvar(deprecated,
"if_inventory_uses_description",
Checkbox(title = _("Use description as service name for network interface checks"),
label = _("use description"),
@@ -1312,7 +1313,7 @@ register_configvar(group,
"of the port number. If no description is available then the port number is "
"used anyway.")))
-register_configvar(group,
+register_configvar(deprecated,
"if_inventory_uses_alias",
Checkbox(title = _("Use alias as service name for network interface checks"),
label = _("use alias"),
@@ -1320,14 +1321,14 @@ register_configvar(group,
"of the port number. If no alias is available then the port number is used "
"anyway.")))
-register_configvar(group,
+register_configvar(deprecated,
"if_inventory_portstates",
ListChoice(title = _("Network interface port states to inventorize"),
help = _("When doing inventory on switches or other devices with network interfaces "
"then only ports found in one of the configured port states will be added to the monitoring."),
choices = _if_portstate_choices))
-register_configvar(group,
+register_configvar(deprecated,
"if_inventory_porttypes",
ListChoice(title = _("Network interface port types to inventorize"),
help = _("When doing inventory on switches or other devices with network interfaces "
@@ -1335,7 +1336,7 @@ register_configvar(group,
choices = _if_porttype_choices,
columns = 3))
-register_configvar(group,
+register_configvar(deprecated,
"diskstat_inventory_mode",
DropdownChoice(
title = _("Inventory mode for disk IO checks"),
@@ -1365,7 +1366,7 @@ register_configvar(group,
group = _("Check configuration")
-register_configvar(group,
+register_configvar(deprecated,
"if_inventory_monitor_state",
Checkbox(title = _("Monitor port state of network interfaces"),
label = _("monitor port state"),
@@ -1376,7 +1377,7 @@ register_configvar(group,
"by overridden on a per-host and per-port base by defining special check "
"parameters via a rule.")))
-register_configvar(group,
+register_configvar(deprecated,
"if_inventory_monitor_speed",
Checkbox(title = _("Monitor port speed of network interfaces"),
label = _("monitor port speed"),
@@ -1420,7 +1421,7 @@ register_configvar(group,
),
)
-register_configvar(group,
+register_configvar(deprecated,
"printer_supply_default_levels",
Tuple(
title = _("Printer supply default levels"),
Module: check_mk
Branch: master
Commit: 1ae3f62efd6dcfd04c1f4ae20fc6f78fd725c046
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1ae3f62efd6dcf…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jul 2 16:04:34 2014 +0200
aix_memory: new check for RAM and SWAP on AIX
---
.werks/1041 | 8 +++
ChangeLog | 5 +-
agents/check_mk_agent.aix | 3 +-
checkman/aix_memory | 39 ++++++++++++++
checkman/mem.used | 2 +-
checks/aix_memory | 94 +++++++++++++++++++++++++++++++++
pnp-templates/check_mk-aix_memory.php | 1 +
web/plugins/perfometer/check_mk.py | 1 +
8 files changed, 149 insertions(+), 4 deletions(-)
diff --git a/.werks/1041 b/.werks/1041
new file mode 100644
index 0000000..6cc46cd
--- /dev/null
+++ b/.werks/1041
@@ -0,0 +1,8 @@
+Title: aix_memory: new check for RAM and SWAP on AIX
+Level: 2
+Component: checks
+Version: 1.2.5i5
+Date: 1404309861
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index dfa3ed5..561e058 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,7 +4,7 @@
NOTE: Please refer to the migration notes!
* 1038 Massive speedup of cmk --snmptranslate
* 1035 FIX: Do not fail on errors in *.mk files anymore - except in interactive mode...
- * 0174 FIX: FIX: Fixed appending of --keepalive-fd parameters to checkhelps...
+ * 0174 FIX: Fixed appending of --keepalive-fd parameters to checkhelpers...
Checks & Agents:
* 0168 f5_bigip_pool: Added Wato configuration...
@@ -12,9 +12,10 @@
* 0169 websphere_mq_channels,ebsphere_mq_queues: New Checks to monitor IBM Websphere MQ Queues and Channels...
* 1034 Always provide also 64 bit version of Windows agent
* 0170 hp_proliant_power: New check to monitor the Power Meter on Prolaint Servers and iLO Boards
- * 0997 New checks and an special agent for ALLNET IP Sensoric devices...
* 0172 zfsget: Check is now usable in cluster_mode...
* 1039 aix_diskiod: new check for disk IO on AIX
+ * 0997 New checks and an special agent for ALLNET IP Sensoric devices...
+ * 1041 aix_memory: new check for RAM and SWAP on AIX
* 0994 FIX: agent plugin smart: fixed syntax error
* 0989 FIX: logwatch.ec: Fix forwarding multiple messages via syslog/TCP...
* 0943 FIX: if.include: fixed incorrect traffic percentage values in the check output of if checks...
diff --git a/agents/check_mk_agent.aix b/agents/check_mk_agent.aix
index 401b858..b6f97ca 100755
--- a/agents/check_mk_agent.aix
+++ b/agents/check_mk_agent.aix
@@ -74,7 +74,8 @@ echo '<<<aix_diskiod>>>'
iostat -d | tr -s ' ' | grep hdisk
echo '<<<aix_memory>>>'
-vmstat -v | tr -s ' ' | cut -d " " -f 2
+vmstat -v | tr -s ' '
+swap -s
echo '<<<mpstat_aix>>>'
mpstat -a | tail -n1
diff --git a/checkman/aix_memory b/checkman/aix_memory
new file mode 100644
index 0000000..6297d00
--- /dev/null
+++ b/checkman/aix_memory
@@ -0,0 +1,39 @@
+title: Usage of physical and virtual RAM
+agents: aix
+catalog: os/kernel
+license: GPL
+distribution: check_mk
+description:
+ This check measures the current usage of physical RAM and
+ virtual memory used by processes on AIX. You can define a warning
+ and critical level for the usage of virtual memory,
+ {not} for the usage of RAM.
+
+ This check uses the same logic as {mem.used} - the memory check
+ for Linux. Please see details there.
+
+inventory:
+ One check is created if a non-empty {<<<aix_memory>>>} section is
+ present in the agent output.
+
+perfdata:
+ Three variables are stored: the physical RAM,
+ the used swap space and the sum of both. Maximum
+ values for both variables are also transmitted, so that
+ they can be visualized. All values are in Megabytes (1024 * 1024 bytes).
+
+ The template for PNP4Nagios that is shipped with Check_MK
+ stacks swap usage on top of RAM usage und thus shows
+ the amount of virtual RAM that is used by processes.
+
+[parameters]
+parameters (dict):
+ {"levels"}: A pair of two int or float values: if these are
+ float it means the the percentage of virtual memory used
+ by processes at which WARNING/CRIT state is triggered. If the
+ two numbers are defined as an integer value then they are interpreted
+ as an absolute value in megabytes.
+
+ {"average"}: This key is optional. If set (integer), it means
+ a number of minutes. The levels are then applied to the
+ averaged value over that time horizon.
diff --git a/checkman/mem.used b/checkman/mem.used
index 9d469fd..0284cc5 100644
--- a/checkman/mem.used
+++ b/checkman/mem.used
@@ -71,7 +71,7 @@ perfdata:
If averaging is turned on, then a value {memusedavg} is added.
[parameters]
-parameters (dict): The check previous used a pair of
+parameters (dict): The check previously used a pair of
two numbers as a parameter. While this is internally still
supported, the new format is a dictionary with the following
keys:
diff --git a/checks/aix_memory b/checks/aix_memory
new file mode 100644
index 0000000..78e8412
--- /dev/null
+++ b/checks/aix_memory
@@ -0,0 +1,94 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk 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 in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA
+
+# Example output from agent:
+# <<<aix_memory>>>
+# 32702464 memory pages
+# 31736528 lruable pages
+# 858141 free pages
+# 4 memory pools
+# 6821312 pinned pages
+# 80.0 maxpin percentage
+# 3.0 minperm percentage
+# 90.0 maxperm percentage
+# 8.8 numperm percentage
+# 2808524 file pages
+# 0.0 compressed percentage
+# 0 compressed pages
+# 8.8 numclient percentage
+# 90.0 maxclient percentage
+# 2808524 client pages
+# 0 remote pageouts scheduled
+# 354 pending disk I/Os blocked with no pbuf
+# 860832 paging space I/Os blocked with no psbuf
+# 2228 filesystem I/Os blocked with no fsbuf
+# 508 client filesystem I/Os blocked with no fsbuf
+# 1372 external pager filesystem I/Os blocked with no fsbuf
+# 88.8 percentage of memory used for computational pages
+# allocated = 8257536 blocks used = 1820821 blocks free = 6436715 blocks
+#
+# The first part is the output of vmstat -v, the last line is the output
+# of swap -s and show the swap space usage
+
+# Parse AIX vmstat output into something compatible with the Linux
+# output from /proc/meminfo. AIX speaks of 4k pages while Linux of kilobytes.
+def parse_aix_memory(info):
+ parsed = {}
+ for line in info:
+ if line[0] == "allocated": # Swap space
+ parsed["SwapTotal"] = int(line[2]) * 4
+ parsed["SwapFree"] = int(line[10]) * 4
+ else:
+ varname = " ".join(line[1:])
+ if varname == "memory pages":
+ parsed["MemTotal"] = int(line[0]) * 4
+ elif varname == "free pages":
+ parsed["MemFree"] = int(line[0]) * 4
+ elif varname == "file pages":
+ parsed["Cached"] = int(line[0]) * 4
+ return parsed
+
+
+def check_aix_memory(_no_item, params, info):
+ meminfo = parse_aix_memory(info)
+ return check_memory(params, meminfo)
+
+
+def inventory_aix_memory(info):
+ meminfo = parse_aix_memory(info)
+ if "MemFree" in meminfo:
+ return [(None, {})]
+
+
+check_info['aix_memory'] = {
+ "check_function" : check_aix_memory,
+ "inventory_function" : inventory_aix_memory,
+ "service_description" : "Memory used",
+ "has_perfdata" : True,
+ "group" : "memory",
+ "default_levels_variable" : "memory_default_levels",
+ "includes" : [ "mem.include" ],
+}
diff --git a/pnp-templates/check_mk-aix_memory.php b/pnp-templates/check_mk-aix_memory.php
new file mode 120000
index 0000000..0a74994
--- /dev/null
+++ b/pnp-templates/check_mk-aix_memory.php
@@ -0,0 +1 @@
+check_mk-mem.used.php
\ No newline at end of file
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index 549eaa2..ce4958c 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -206,6 +206,7 @@ def perfometer_check_mk_mem_used(row, check_command, perf_data):
return "%d%%" % (100 * (virt_used / ram_total)), h
perfometers["check_mk-mem.used"] = perfometer_check_mk_mem_used
+perfometers["check_mk-aix_memory"] = perfometer_check_mk_mem_used
perfometers["check_mk-hr_mem"] = perfometer_check_mk_mem_used
def perfometer_check_mk_mem_win(row, check_command, perf_data):
Module: check_mk
Branch: master
Commit: 3adcbc97de3464b44b2e8faa37c4d3d02d33d52d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3adcbc97de3464…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jul 2 16:06:00 2014 +0200
Fixed typo in werk
---
.werks/997 | 2 +-
ChangeLog | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.werks/997 b/.werks/997
index a642269..89275b2 100644
--- a/.werks/997
+++ b/.werks/997
@@ -1,4 +1,4 @@
-Title: New checks and an special agent for ALLNET IP Sensoric devices
+Title: New checks and a special agent for ALLNET IP Sensoric devices
Level: 2
Component: checks
Version: 1.2.5i5
diff --git a/ChangeLog b/ChangeLog
index 9e5b0e1..0d6e465 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,7 +14,7 @@
* 0170 hp_proliant_power: New check to monitor the Power Meter on Prolaint Servers and iLO Boards
* 0172 zfsget: Check is now usable in cluster_mode...
* 1039 aix_diskiod: new check for disk IO on AIX
- * 0997 New checks and an special agent for ALLNET IP Sensoric devices...
+ * 0997 New checks and a special agent for ALLNET IP Sensoric devices...
* 0175 logwatch.groups: New logwatch subcheck who can be used to group logfiles together....
* 1041 aix_memory: new check for RAM and SWAP on AIX
* 0994 FIX: agent plugin smart: fixed syntax error
Module: check_mk
Branch: master
Commit: 6a069acf5b7e13e1bf677513f23621e26407b7f7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6a069acf5b7e13…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jul 2 15:56:10 2014 +0200
quicksearch: now able to search for multiple hosts at once
In the quicksearch snapin you can now enter the following syntax
C+:
h:firsthost h:otherhost h:testhost
C-:
The quicksearch dropdown will show the matches for the given names (case insensitive, no exact match).
If you want an exact hostname match you need to finish the name with $.<br>
When you press enter a host search formular will show up with the hosts given in the quicksearch field.<br>
The feature also works with host ip addresses<br>
In the quicksearch dropdown you can mix hostnames and ipaddresses - they will both show up in the dropdown.
However, the search formular is only able to display either one or the other.
---
.werks/949 | 21 +++++++++++++++++++++
ChangeLog | 3 ++-
web/plugins/sidebar/search.py | 35 +++++++++++++++++++++++++++++++++++
3 files changed, 58 insertions(+), 1 deletion(-)
diff --git a/.werks/949 b/.werks/949
new file mode 100644
index 0000000..9e0c832
--- /dev/null
+++ b/.werks/949
@@ -0,0 +1,21 @@
+Title: quicksearch: now able to search for multiple hosts at once
+Level: 1
+Component: multisite
+Version: 1.2.5i5
+Date: 1404308868
+Class: feature
+
+In the quicksearch snapin you can now enter the following syntax
+C+:
+h:firsthost h:otherhost h:testhost
+C-:
+
+The quicksearch dropdown will show the matches for the given names (case insensitive, no exact match).
+If you want an exact hostname match you need to finish the name with $.<br>
+
+When you press enter a host search formular will show up with the hosts given in the quicksearch field.<br>
+The feature also works with host ip addresses<br>
+
+In the quicksearch dropdown you can mix hostnames and ipaddresses - they will both show up in the dropdown.
+However, the search formular is only able to display either one or the other.
+
diff --git a/ChangeLog b/ChangeLog
index 2dc1629..56a49f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,7 +15,7 @@
* 0172 zfsget: Check is now usable in cluster_mode...
* 1039 aix_diskiod: new check for disk IO on AIX
* 0997 New checks and an special agent for ALLNET IP Sensoric devices...
- * 0175 logwatch.groups: New logwatch subcheck who can be used to group logfiles together.
+ * 0175 logwatch.groups: New logwatch subcheck who can be used to group logfiles together....
* 0994 FIX: agent plugin smart: fixed syntax error
* 0989 FIX: logwatch.ec: Fix forwarding multiple messages via syslog/TCP...
* 0943 FIX: if.include: fixed incorrect traffic percentage values in the check output of if checks...
@@ -30,6 +30,7 @@
Multisite:
* 1013 Sort host names naturally, e.g. foobar11 comes after foobar2...
* 1033 New Mutisite filter for the number of services a host has...
+ * 0949 quicksearch: now able to search for multiple hosts at once...
* 0945 FIX: Sidebar snapin "Problem hosts": Now excludes hosts and services in downtime
* 1036 FIX: doc/treasures/downtime: fix --url option, better error output
diff --git a/web/plugins/sidebar/search.py b/web/plugins/sidebar/search.py
index c9ca971..5590f46 100644
--- a/web/plugins/sidebar/search.py
+++ b/web/plugins/sidebar/search.py
@@ -164,6 +164,19 @@ search_plugins.append({
'match_url_tmpl' : 'view.py?view_name=searchhost&hostalias=%(search)s&filled_in=filter'
})
+def search_hosts_filter(filters, host_is_ip = False):
+ lq_filter = ""
+ filter_template = host_is_ip and "Filter: host_address ~~ %s\n" or "Filter: host_name ~~ %s\n"
+ for name, value in filters:
+ lq_filter += filter_template % value
+ if len(filters) > 1:
+ lq_filter += 'Or: %d\n' % len(filters)
+
+ return lq_filter
+
+def search_hosts_url_tmpl(used_filters, data, host_is_ip = False):
+ filter_field = host_is_ip and "host_address=(%s)" or "host=(%s)" % "|".join(map(lambda x: x[1], used_filters))
+ return 'view.py?view_name=searchhost&filled_in=filter&' + filter_field
def search_host_service_filter(filters, host_is_ip = False):
def get_filters(filter_type):
@@ -262,3 +275,25 @@ search_plugins.append({
"match_url_tmpl_func" : lambda x,y: match_host_service_url_tmpl(x, y, host_is_ip = True),
"search_url_tmpl_func" : lambda x,y: search_host_service_url_tmpl(x, y, host_is_ip = True),
})
+
+search_plugins.append({
+ "id" : "host_multi",
+ "qs_show" : "host_name",
+ "required_types" : ["hosts"],
+ "lq_table" : "hosts",
+ "lq_columns" : ["host_name", "host_address"],
+ "filter_func" : lambda x: search_hosts_filter(x),
+ "match_url_tmpl_func" : lambda x,y: "view.py?view_name=host&host=%(host_name)s&site=%(site)s" % y,
+ "search_url_tmpl_func" : lambda x,y: search_hosts_url_tmpl(x, y),
+})
+
+search_plugins.append({
+ "id" : "host_multi_address",
+ "qs_show" : "host_address",
+ "required_types" : ["hosts"],
+ "lq_table" : "hosts",
+ "lq_columns" : ["host_address", "host_name"],
+ "filter_func" : lambda x: search_hosts_filter(x, True),
+ "match_url_tmpl_func" : lambda x,y: "view.py?view_name=host&host_address=%(host_address)s&site=%(site)s" % y,
+ "search_url_tmpl_func" : lambda x,y: search_hosts_url_tmpl(x, y, True),
+})
Module: check_mk
Branch: master
Commit: f41c5c27333b0ef021e02fa01010fc4c4cfa2ade
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f41c5c27333b0e…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Jul 2 14:58:55 2014 +0200
typos
---
.werks/175 | 2 ++
checkman/logwatch.groups | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/.werks/175 b/.werks/175
index 39710f0..56bd00c 100644
--- a/.werks/175
+++ b/.werks/175
@@ -5,4 +5,6 @@ Version: 1.2.5i5
Date: 1404305698
Class: feature
+This check is used to group multiple logfiles together. This is usefull in cases when a logrotation mechanism is used,
+with no permanent name for the current logfile.
diff --git a/checkman/logwatch.groups b/checkman/logwatch.groups
index 4422ab8..dc508de 100644
--- a/checkman/logwatch.groups
+++ b/checkman/logwatch.groups
@@ -4,8 +4,8 @@ catalog: os/files
license: GPL
distribution: check_mk
description:
- This check is used to group multiple logfiles together. This is for example usefall in cases
- when a logrotation mechanism is in use, but there is no permanent name for the current logfile.
+ This check is used to group multiple logfiles together. This is usefull in cases when a logrotation mechanism is used,
+ with no permanent name for the current logfile.
Please refer to to manpage of {{logwatch}} for more details about logfile monitoring.