Module: check_mk
Branch: master
Commit: 059307146eff747c2de3724f9a510b48897b5ff6
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=059307146eff74…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Mar 15 17:17:02 2016 +0100
GUI cleanup: moved button for deleting a host to header
It is now a context button just like the other buttons, and not anymore a
submit button of the form
---
web/htdocs/wato.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 14bb805..7bd26d1 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -1217,9 +1217,13 @@ def mode_edit_host(phase, new, is_cluster):
html.context_button(_("Clustered Services"),
folder_preserving_link([("mode", "edit_ruleset"), ("varname", "clustered_services")]), "rulesets")
- if config.may("wato.rename_hosts") and not Folder.current().locked_hosts():
- html.context_button(_("Rename %s") % (is_cluster and _("Cluster") or _("Host")),
- folder_preserving_link([("mode", "rename_host"), ("host", hostname)]), "rename_host")
+ if not Folder.current().locked_hosts():
+ if config.may("wato.rename_hosts"):
+ html.context_button(is_cluster and _("Rename Cluster") or _("Rename Host"),
+ folder_preserving_link([("mode", "rename_host"), ("host", hostname)]), "rename_host")
+ html.context_button(is_cluster and _("Delete Cluster") or _("Delete Host"),
+ html.makeactionuri([("delete", "1")]), "delete")
+
if not is_cluster:
html.context_button(_("Diagnostic"),
folder_preserving_link([("mode", "diag_host"), ("host", hostname)]), "diagnose")
@@ -1308,8 +1312,6 @@ def mode_edit_host(phase, new, is_cluster):
html.image_button("save", _("Save & Finish"), "submit")
if not is_cluster:
html.image_button("diag_host", _("Save & Test"), "submit")
- if not new:
- html.image_button("delete", _("Delete host!"), "submit")
html.hidden_fields()
html.end_form()
Module: check_mk
Branch: master
Commit: 1b7bc9f8c49290921a1fc9b9136974de11bfaa0c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1b7bc9f8c49290…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Mar 15 17:05:22 2016 +0100
Updated bug entries #2429
---
.bugs/2429 | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/.bugs/2429 b/.bugs/2429
new file mode 100644
index 0000000..572b641
--- /dev/null
+++ b/.bugs/2429
@@ -0,0 +1,10 @@
+Title: OMD site with AUTOSTART off is partially started after server boot
+Component: core
+State: open
+Date: 2016-03-15 17:04:31
+Targetversion: 1.2.8
+Class: bug
+
+If you boot your server then a site with AUTOSTART off
+is partially started due to the crontab entry being started.
+This prevents e.g. omd config.
Module: check_mk
Branch: master
Commit: c925cd06c6f54cb9a3ffc2667eb74f665b6cdea1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c925cd06c6f54c…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Tue Mar 15 16:44:12 2016 +0100
3102 added option to availability to include host alias in reports
In addition to the new option to display the host alias, the option "do not display the host name"
now works in host availability views as well, but only if the alias is selected to be displayed. You still
can't have a table with only the availability column.
---
.werks/3102 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/availability.py | 36 +++++++++++++++++++++++++++---------
3 files changed, 39 insertions(+), 9 deletions(-)
diff --git a/.werks/3102 b/.werks/3102
new file mode 100644
index 0000000..19db742
--- /dev/null
+++ b/.werks/3102
@@ -0,0 +1,11 @@
+Title: added option to availability to include host alias in reports
+Level: 1
+Component: reporting
+Compatible: compat
+Version: 1.2.9i1
+Date: 1458056479
+Class: feature
+
+In addition to the new option to display the host alias, the option "do not display the host name"
+now works in host availability views as well, but only if the alias is selected to be displayed. You still
+can't have a table with only the availability column.
diff --git a/ChangeLog b/ChangeLog
index 974f177..72b8788 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -145,6 +145,7 @@
Reporting & Availability:
* 3267 New availability option for reclassifying host state "unreachable"...
+ * 3102 added option to availability to include host alias in reports...
* 3249 FIX: Fix missing filter for non-OK services when report is called via context button
* 3268 FIX: Availability options were invalid after resetting them...
* 3269 FIX: Fix rendering of floating point values < 1 in graphs (e.g. CPU load)
diff --git a/web/htdocs/availability.py b/web/htdocs/availability.py
index 4e004b2..bef5903 100644
--- a/web/htdocs/availability.py
+++ b/web/htdocs/availability.py
@@ -149,6 +149,7 @@ def get_avoption_entries(what):
choices = [
( "omit_headers", _("Do not display column headers")),
( "omit_host", _("Do not display the host name")),
+ ( "show_alias", _("Display the host alias")),
( "use_display_name", _("Use alternative display name for services")),
( "omit_buttons", _("Do not display icons for history and timeline")),
( "display_timeline_legend", _("Display legend for timeline")),
@@ -589,6 +590,8 @@ def get_availability_rawdata(what, filterheaders, only_sites, av_object, include
columns.append("log_output")
if "use_display_name" in avoptions["labelling"]:
columns.append("service_display_name")
+ if "show_alias" in avoptions["labelling"]:
+ columns.append("host_alias")
# If we group by host/service group then make sure that that information is available
if avoptions["grouping"] not in [ None, "host" ]:
@@ -665,6 +668,7 @@ def compute_availability(what, av_rawdata, avoptions):
display_name = span.get("service_display_name", service)
state = span["state"]
+ host_alias = span.get("host_alias", site_host[1])
consider = True
if state == -1:
@@ -741,6 +745,7 @@ def compute_availability(what, av_rawdata, avoptions):
availability_entry = {
"site" : site_host[0],
"host" : site_host[1],
+ "alias" : host_alias,
"service" : service,
"display_name" : display_name,
"states" : states,
@@ -917,15 +922,24 @@ def layout_availability_table(what, group_title, availability_table, avoptions):
}
# Titles for the columns that specify the object
+ titles = []
if what == "bi":
- av_table["object_titles"] = [ _("Aggregate") ]
- elif what == "host":
- av_table["object_titles"] = [ _("Host") ]
- else: # service
- if "omit_host" in labelling:
- av_table["object_titles"] = [ _("Service") ]
- else:
- av_table["object_titles"] = [ _("Host"), _("Service") ]
+ titles.append(_("Aggregate"))
+ else:
+ # in service availability we can only omit the host. In the
+ # host availability this is only possible if the alias is
+ # being displayed, Otherwise the table wouldn't make sense
+ # and the pdf renderer would crash
+ if "omit_host" not in labelling or\
+ (what == "host" and "show_alias" not in labelling):
+ titles.append(_("Host"))
+ if "show_alias" in labelling:
+ titles.append(_("Alias"))
+
+ if what != "host":
+ titles.append(_("Service"))
+
+ av_table["object_titles"] = titles
# Headers for availability cells
av_table["cell_titles"] = []
@@ -947,6 +961,7 @@ def layout_availability_table(what, group_title, availability_table, avoptions):
for entry in availability_table:
site = entry["site"]
host = entry["host"]
+ alias = entry["alias"]
service = entry["service"]
row = {}
@@ -975,8 +990,11 @@ def layout_availability_table(what, group_title, availability_table, avoptions):
objectcells.append((service, bi_url))
else:
host_url = "view.py?" + html.urlencode_vars([("view_name", "hoststatus"), ("site", site), ("host", host)])
- if not "omit_host" in labelling or what == "host":
+ if "omit_host" not in labelling or\
+ (what == "host" and "show_alias" not in labelling):
objectcells.append((host, host_url))
+ if "show_alias" in labelling:
+ objectcells.append((alias, host_url))
if what == "service":
if "use_display_name" in labelling:
service_name = entry["display_name"]
Module: check_mk
Branch: master
Commit: 27f3b0777d06d7a0037e8868347b2332ef9e5412
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=27f3b0777d06d7…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Tue Mar 15 14:24:34 2016 +0100
3101 zpool: new check to monitor usage of zfs pools
There is already a check (zfsget) to monitor usage of zfs mountpoints, but in complex setups where
the pools don't map 1:1 to mountpoints, the existing check doesn't give a correct picture of the
underlying pools.
---
.werks/3101 | 11 +++++++
ChangeLog | 1 +
agents/check_mk_agent.solaris | 3 ++
checkman/zpool | 16 +++++++++
checks/zpool | 72 +++++++++++++++++++++++++++++++++++++++++
5 files changed, 103 insertions(+)
diff --git a/.werks/3101 b/.werks/3101
new file mode 100644
index 0000000..c41d185
--- /dev/null
+++ b/.werks/3101
@@ -0,0 +1,11 @@
+Title: zpool: new check to monitor usage of zfs pools
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.9i1
+Date: 1458048130
+Class: feature
+
+There is already a check (zfsget) to monitor usage of zfs mountpoints, but in complex setups where
+the pools don't map 1:1 to mountpoints, the existing check doesn't give a correct picture of the
+underlying pools.
diff --git a/ChangeLog b/ChangeLog
index d82beae..974f177 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,7 @@
* 3004 agent_vsphere: now able to configure used piggyback name for virtualmachines...
* 3095 prism_info, prism_containers, prism_alerts: added checks to monitor a Nutanix Prism cluster
* 3096 check_mailboxes: new active check to monitor age and count of mails in imap mailboxes
+ * 3101 zpool: new check to monitor usage of zfs pools...
* 3073 FIX: windows agent: relative paths to mrpe scripts are now treated as relative to the agent installation directory...
* 3061 FIX: mk_jolokia: Fixed debugging of the agent plugin
* 3074 FIX: windows agent: fixed incorrect values for 32-bit performance counters
diff --git a/agents/check_mk_agent.solaris b/agents/check_mk_agent.solaris
index 3cf8046..cfccfda 100755
--- a/agents/check_mk_agent.solaris
+++ b/agents/check_mk_agent.solaris
@@ -239,6 +239,9 @@ echo $load 1/$ps $$ $procs
# zpool status
if [ -x /sbin/zpool ]; then
run_cached -s zpool_status 120 "/sbin/zpool status -x"
+
+ echo '<<<zpool>>>'
+ zpool list
fi
diff --git a/checkman/zpool b/checkman/zpool
new file mode 100644
index 0000000..f0ceb69
--- /dev/null
+++ b/checkman/zpool
@@ -0,0 +1,16 @@
+title: ZFS Storage Pool sizes
+agents: solaris
+catalog: os/storage
+license: GPL
+distribution: check_mk
+description:
+ Checks the current size and usage of ZFS storage pools. The information
+ is read by the agent from {zpool list}. This check can be configured
+ using the filesystem rule.
+
+ In a simple setup where a pool is mapped 1:1 to a mountpoint and where no
+ snapshots are used, this will report the same information as the zfsget
+ check.
+
+inventory:
+ The inventory will create one service per pool.
diff --git a/checks/zpool b/checks/zpool
new file mode 100644
index 0000000..d4b995b
--- /dev/null
+++ b/checks/zpool
@@ -0,0 +1,72 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2014 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-
+# tails. 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.
+
+
+# NAME SIZE ALLOC FREE CAP HEALTH ALTROOT
+# app02 39.8G 14.1G 25.6G 35% ONLINE -
+# rpool 39.8G 32.9G 6.81G 82% ONLINE -
+
+
+def parse_zpool(info):
+ result = {}
+ header = [item.lower() for item in info[0]]
+ for line in info[1:]:
+ result[line[0]] = dict(zip(header, line))
+ return result
+
+def inventory_zpool(parsed):
+ return df_inventory(parsed.keys())
+
+
+def check_zpool(item, params, parsed):
+ def mb(val):
+ # split number from unit
+ for idx, ch in enumerate(val):
+ if ch not in "0123456789.-":
+ break
+ num = float(val[:idx])
+ unit = val[idx:].lstrip().lower()
+ unit = ["b", "k", "m", "g", "t"].index(unit)
+
+ return num * (1024 ** (unit - 2))
+
+ fslist = []
+ for pool, entry in parsed.iteritems():
+ if "patterns" in params or item == pool:
+ fslist.append((pool, mb(entry['size']), mb(entry['free']), 0))
+
+ return df_check_filesystem_list(item, params, fslist)
+
+
+check_info['zpool'] = {
+ "check_function" : check_zpool,
+ "inventory_function" : inventory_zpool,
+ "parse_function" : parse_zpool,
+ "service_description" : "Pool %s",
+ "has_perfdata" : True,
+ "group" : "filesystem",
+}
+
Module: check_mk
Branch: master
Commit: 7cb51b792f1339f9c79d1c35edc94a40641e8cd2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7cb51b792f1339…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Tue Mar 15 13:28:32 2016 +0100
3100 FIX fixed exception when trying to create a wato folder when that folder already exists
---
.werks/3100 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/watolib.py | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.werks/3100 b/.werks/3100
new file mode 100644
index 0000000..01259a6
--- /dev/null
+++ b/.werks/3100
@@ -0,0 +1,9 @@
+Title: fixed exception when trying to create a wato folder when that folder already exists
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1458044804
+
diff --git a/ChangeLog b/ChangeLog
index 8d9191a..d82beae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -131,6 +131,7 @@
* 3283 FIX: Bulk import of hosts: It is now possible again to import a simple list of hosts...
* 3284 FIX: Bulk import of hosts: Fixed disabling of reading first line as header...
* 3270 FIX: Fix button [Deprecated Rulesets] within deprecated manual checks rulesets
+ * 3100 FIX: fixed exception when trying to create a wato folder when that folder already exists
Notifications:
* 3263 Notifications: allow users to restrict by their contact groups...
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index b6536f0..e0e8ccc 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -4517,7 +4517,7 @@ def must_be_in_contactgroups(cgspec):
def check_wato_foldername(htmlvarname, name, just_name = False):
- if not just_name and name in Folder.current().has_subfolder(name):
+ if not just_name and Folder.current().has_subfolder(name):
raise MKUserError(htmlvarname, _("A folder with that name already exists."))
if not name: