Module: check_mk
Branch: master
Commit: 2283e6df41c1fbb242d76256ac6db530d562f405
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2283e6df41c1fb…
Author: Sven Rueß <sr(a)mathias-kettner.de>
Date: Tue Mar 31 17:33:04 2015 +0200
Fixed formatting in werk #1954
---
.werks/1954 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.werks/1954 b/.werks/1954
index 1364ce3..a259dd6 100644
--- a/.werks/1954
+++ b/.werks/1954
@@ -15,4 +15,4 @@ Discovery function now handles the agent output as followed:
</ul>
Supported agents on Windows, Linux, FreeBSD, MacOSX and Solaris now return the same agent output as followed:
-<Searchpattern or Absolute file path>|<Filesize or "missing">|<Modification time of file>
+[Searchpattern or Absolute file path]|[Filesize or "missing"]|[Modification time of file]
Module: check_mk
Branch: master
Commit: 3c00329436ceef6fd7783acd4f2d1e7c6cbf0383
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3c00329436ceef…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Mar 31 17:08:58 2015 +0200
#2184 statgrab_mem: converted to the same logic as the other memory checks
The check plugin <tt>statgrab_mem</tt> now uses the same implementation
as <tt>solaris_mem</tt> and many other memory checks. That makes the
output compatible.
Note: This change is incompatible since existing rules for memory
levels do not apply any longer. Now the same WATO rule set as for
other memory checks is being used. Please create new rules if you
have the need for custom levels.
---
.werks/2184 | 16 ++++++++++++++++
ChangeLog | 2 ++
checks/statgrab_mem | 3 +--
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/.werks/2184 b/.werks/2184
new file mode 100644
index 0000000..a6d2164
--- /dev/null
+++ b/.werks/2184
@@ -0,0 +1,16 @@
+Title: statgrab_mem: converted to the same logic as the other memory checks
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.7i1
+Date: 1427814376
+Class: feature
+
+The check plugin <tt>statgrab_mem</tt> now uses the same implementation
+as <tt>solaris_mem</tt> and many other memory checks. That makes the
+output compatible.
+
+Note: This change is incompatible since existing rules for memory
+levels do not apply any longer. Now the same WATO rule set as for
+other memory checks is being used. Please create new rules if you
+have the need for custom levels.
diff --git a/ChangeLog b/ChangeLog
index db81301..5f1fcd4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -150,6 +150,8 @@
* 1902 mk_oracle: Performance hint for RMAN checks...
* 1903 mk_oracle: Remote Monitoring of Oracle Databases...
* 2183 ps: allow levels of used RAM in percentage of total RAM of host...
+ * 2184 statgrab_mem: converted to the same logic as the other memory checks...
+ NOTE: Please refer to the migration notes!
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
diff --git a/checks/statgrab_mem b/checks/statgrab_mem
index 3b6e4e5..6e706c8 100644
--- a/checks/statgrab_mem
+++ b/checks/statgrab_mem
@@ -51,13 +51,12 @@ def check_statgrab_mem(_no_item, params, parsed):
return check_memory(params, parsed)
-
check_info["statgrab_mem"] = {
'parse_function' : parse_statgrab_mem,
'inventory_function' : inventory_statgrab_mem,
'check_function' : check_statgrab_mem,
'service_description' : 'Memory used',
'has_perfdata' : True,
- 'group' : "statgrab_mem",
+ 'group' : "memory",
'includes' : [ "mem.include" ],
}
Module: check_mk
Branch: master
Commit: b6e839b03dc5f8fcba0fdebb4a9c5a7cea06f80e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b6e839b03dc5f8…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Mar 31 17:05:24 2015 +0200
#2183 ps: allow levels of used RAM in percentage of total RAM of host
You can now specify the levels for the memory usage of a process
or group of processes in relation to the total RAM memory of a host.
This makes it easier to find memory consuming processes in general,
without the need for different levels for every single host.
Note: these levels only work if the agent output provides information
about the total memory. This is the case for at least the usual
agents for Linux, Windows and Solaris.
---
.werks/2183 | 16 ++++++++++
ChangeLog | 4 +--
checks/mem | 2 +-
checks/mem.include | 1 +
checks/ps | 25 ++++++++++++----
checks/ps.include | 25 +++++++++++++++-
checks/solaris_mem | 53 ++++++++++++++++++---------------
checks/statgrab_mem | 54 ++++++++++------------------------
modules/check_mk.py | 11 +++++--
web/plugins/wato/check_parameters.py | 22 +++++++++-----
10 files changed, 130 insertions(+), 83 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=b6e839b03d…
Fixed discovery function for fileinfo groups and equalize agent output of fileinfo agents
Message-ID: <551a9d69.2w4b49gN7ROrf3MZ%sr(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Module: check_mk
Branch: master
Commit: 198af74bdf59aff5828385cf63ebbc462c0a16d9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=198af74bdf59af…
Author: Sven Rueß <sr(a)mathias-kettner.de>
Date: Tue Mar 31 15:05:49 2015 +0200
#1954 FIX fileinfo / fileinfo.group: Fixed discovery function for fileinfo groups and equalize agent output of fileinfo agents
Discovery function now handles the agent output as followed:
<ul>
<li>File Pattern match: For every matching file a new item is returned and a new service is created.</li>
<li>File Pattern mismatch: This pattern will be ignored. No item is returned and no service is created.</li>
<li>Group Pattern match or mismatch: For every group a new item is returned and a new service is created.</li>
</ul>
Supported agents on Windows, Linux, FreeBSD, MacOSX and Solaris now return the same agent output as followed:
<Searchpattern or Absolute file path>|<Filesize or "missing">|<Modification time of file>
---
.werks/1954 | 18 +++++
ChangeLog | 4 +-
agents/check_mk_agent.freebsd | 9 ++-
agents/check_mk_agent.linux | 9 ++-
agents/check_mk_agent.macosx | 9 ++-
agents/check_mk_agent.solaris | 22 ++++--
checkman/fileinfo | 118 ++++++++++++++++----------------
checkman/fileinfo.groups | 150 +++++++++++++++++++++--------------------
checks/fileinfo | 4 +-
9 files changed, 195 insertions(+), 148 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=198af74bdf…
Module: check_mk
Branch: master
Commit: 6f259ff8876d736b209e9a662252dc058574f57e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6f259ff8876d73…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Mar 31 06:54:39 2015 +0200
Make Multisite work with Nagios again
---
livestatus/src/Makefile.am | 2 +-
livestatus/src/MetricsColumn.cc | 35 ++++++++++++++++++++++++++++++++++
livestatus/src/MetricsColumn.h | 40 +++++++++++++++++++++++++++++++++++++++
livestatus/src/TableHosts.cc | 4 ++++
livestatus/src/TableServices.cc | 4 ++++
5 files changed, 84 insertions(+), 1 deletion(-)
diff --git a/livestatus/src/Makefile.am b/livestatus/src/Makefile.am
index 2233d64..151a34c 100644
--- a/livestatus/src/Makefile.am
+++ b/livestatus/src/Makefile.am
@@ -33,7 +33,7 @@ livestatus_so_SOURCES = \
ContactsColumn.cc CustomVarsColumn.cc CustomVarsFilter.cc DoubleColumn.cc \
DoubleColumnFilter.cc DowntimeOrComment.cc DownCommColumn.cc EmptyColumn.cc \
Filter.cc GlobalCountersColumn.cc HostContactsColumn.cc HostgroupsColumn.cc \
- HostlistColumn.cc HostlistColumnFilter.cc HostlistStateColumn.cc \
+ HostlistColumn.cc HostlistColumnFilter.cc HostlistStateColumn.cc MetricsColumn.cc \
HostSpecialIntColumn.cc ServiceSpecialIntColumn.cc InputBuffer.cc IntColumn.cc IntColumnFilter.cc \
ListColumn.cc ListColumnFilter.cc OffsetDoubleColumn.cc OffsetIntColumn.cc \
OffsetStringColumn.cc OffsetTimeperiodColumn.cc OringFilter.cc OutputBuffer.cc \
diff --git a/livestatus/src/MetricsColumn.cc b/livestatus/src/MetricsColumn.cc
new file mode 100644
index 0000000..d31da0f
--- /dev/null
+++ b/livestatus/src/MetricsColumn.cc
@@ -0,0 +1,35 @@
+// +------------------------------------------------------------------+
+// | ____ _ _ __ __ _ __ |
+// | / ___| |__ ___ ___| | __ | \/ | |/ / |
+// | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+// | | |___| | | | __/ (__| < | | | | . \ |
+// | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+// | |
+// | 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-
+// 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.
+
+#include "MetricsColumn.h"
+#include "Query.h"
+
+void MetricsColumn::output(void *data, Query *query)
+{
+ data = shiftPointer(data);
+ if (!data) return;
+
+ query->outputBeginList();
+ query->outputEndList();
+}
diff --git a/livestatus/src/MetricsColumn.h b/livestatus/src/MetricsColumn.h
new file mode 100644
index 0000000..ccdf555
--- /dev/null
+++ b/livestatus/src/MetricsColumn.h
@@ -0,0 +1,40 @@
+// +------------------------------------------------------------------+
+// | ____ _ _ __ __ _ __ |
+// | / ___| |__ ___ ___| | __ | \/ | |/ / |
+// | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+// | | |___| | | | __/ (__| < | | | | . \ |
+// | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+// | |
+// | 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-
+// 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.
+
+#ifndef MetricsColumn_h
+#define MetricsColumn_h
+
+#include "Column.h"
+
+class MetricsColumn : public Column
+{
+public:
+ MetricsColumn(string name, string description, int indirect_offset)
+ : Column(name, description, indirect_offset) {}
+ int type() { return COLTYPE_LIST; }
+ void output(void *, Query *);
+ // Filter *createFilter(int opid, char *value);
+};
+
+#endif // MetricsColumn_h
diff --git a/livestatus/src/TableHosts.cc b/livestatus/src/TableHosts.cc
index 6ed28ae..10bffe5 100644
--- a/livestatus/src/TableHosts.cc
+++ b/livestatus/src/TableHosts.cc
@@ -44,6 +44,7 @@
#include "ServicelistColumn.h"
#include "ServicelistStateColumn.h"
#include "HostgroupsColumn.h"
+#include "MetricsColumn.h"
#include "ContactgroupsColumn.h"
#include "HostSpecialIntColumn.h"
#include "HostSpecialDoubleColumn.h"
@@ -356,6 +357,9 @@ void TableHosts::addColumns(Table *table, string prefix, int indirect_offset)
table->addColumn(new ServicelistColumn(prefix + "services_with_fullstate",
"A list of all services including full state information. The list of entries can grow in future versions.",
(char *)(&hst.services) - ref, indirect_offset, false, 3));
+
+ table->addColumn(new MetricsColumn(prefix + "metrics",
+ "A dummy column in order to be compatible with Check_MK Multisite", indirect_offset));
}
void *TableHosts::findObject(char *objectspec)
diff --git a/livestatus/src/TableServices.cc b/livestatus/src/TableServices.cc
index 1a397c9..1c4d9e5 100644
--- a/livestatus/src/TableServices.cc
+++ b/livestatus/src/TableServices.cc
@@ -45,6 +45,7 @@
#include "CustomVarsColumn.h"
#include "ServicegroupsColumn.h"
#include "ContactgroupsColumn.h"
+#include "MetricsColumn.h"
#include "tables.h"
#include "auth.h"
#include "strutil.h"
@@ -409,6 +410,9 @@ void TableServices::addColumns(Table *table, string prefix, int indirect_offset,
"A list of all service groups the service is in", (char *)(&svc.servicegroups_ptr) - ref, indirect_offset));
table->addColumn(new ContactgroupsColumn(prefix + "contact_groups",
"A list of all contact groups this service is in", (char *)(&svc.contact_groups) - ref, indirect_offset));
+
+ table->addColumn(new MetricsColumn(prefix + "metrics",
+ "A dummy column in order to be compatible with Check_MK Multisite", indirect_offset));
}