Module: check_mk
Branch: master
Commit: f25eebdd1f68db42291fef08afb0004f3117e5d7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f25eebdd1f68db…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Mon Jan 12 15:41:15 2015 +0100
FIX: agent version was no longer visible in check_mk check output
---
modules/check_mk_base.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 86c904c..fc719da 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -270,7 +270,7 @@ def get_info_for_check(hostname, ipaddress, infotype, max_cachefile_age=None, ig
# checks usually use existing cache files, if check_mk is not misconfigured,
# and thus do no network activity at all...
-def get_host_info(hostname, ipaddress, checkname, max_cachefile_age, ignore_check_interval=False):
+def get_host_info(hostname, ipaddress, checkname, max_cachefile_age=None, ignore_check_interval=False):
# If the check want's the node info, we add an additional
# column (as the first column) with the name of the node
# or None (in case of non-clustered nodes). On problem arises,
Module: check_mk
Branch: master
Commit: 5973ec56699b697e165637915ff9298ca74ca01f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5973ec56699b69…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jan 12 13:56:38 2015 +0100
#1809 FIX cisco_temp_perf: Fixed exception when no temperature threshold provided by device
---
.werks/1809 | 10 +++++++++
ChangeLog | 1 +
checks/cisco_temp_perf | 55 ++++++++++++++++++++++++------------------------
3 files changed, 39 insertions(+), 27 deletions(-)
diff --git a/.werks/1809 b/.werks/1809
new file mode 100644
index 0000000..c060c93
--- /dev/null
+++ b/.werks/1809
@@ -0,0 +1,10 @@
+Title: cisco_temp_perf: Fixed exception when no temperature threshold provided by device
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1421067367
+
+
diff --git a/ChangeLog b/ChangeLog
index 6ec3de3..264e4a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -59,6 +59,7 @@
* 1840 FIX: oracle_tablespaces: fix implementation of magic factor
* 1848 FIX: df: title of pnp graphs for filesystem checks fixed...
* 1209 FIX: livestatus_status: Check handles cluster using in cluster now
+ * 1809 FIX: cisco_temp_perf: Fixed exception when no temperature threshold provided by device
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/checks/cisco_temp_perf b/checks/cisco_temp_perf
index 899990f..2f4ee54 100644
--- a/checks/cisco_temp_perf
+++ b/checks/cisco_temp_perf
@@ -24,27 +24,22 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-# normal(1): the environment is good, such as low
-# temperature.
-#
-# warning(2): the environment is bad, such as temperature
-# above normal operation range but not too
-# high.
-#
-# critical(3): the environment is very bad, such as
-# temperature much higher than normal
-# operation limit.
-#
-# shutdown(4): the environment is the worst, the system
-# should be shutdown immediately.
-#
-# notPresent(5): the environmental monitor is not present,
-# such as temperature sensors do not exist.
-#
-# notFunctioning(6): the environmental monitor does not
-# function properly, such as a temperature
-# sensor generates a abnormal data like
-# 1000 C.
+# normal(1): the environment is good, such as low
+# temperature.
+# warning(2): the environment is bad, such as temperature
+# above normal operation range but not too
+# high.
+# critical(3): the environment is very bad, such as
+# temperature much higher than normal
+# operation limit.
+# shutdown(4): the environment is the worst, the system
+# should be shutdown immediately.
+# notPresent(5): the environmental monitor is not present,
+# such as temperature sensors do not exist.
+# notFunctioning(6): the environmental monitor does not
+# function properly, such as a temperature
+# sensor generates a abnormal data like
+# 1000 C.
cisco_temp_perf_envmon_states = {
1: "normal",
@@ -62,12 +57,14 @@ def inventory_cisco_temp_perf(info):
def check_cisco_temp_perf(item, _no_params, info):
for statustext, temp, max_temp, state, oid_end in info:
if cisco_sensor_item(statustext, oid_end) == item:
- #FIXE saveint needed here? (See if condition)
+ # FIXME saveint needed here? (See if condition)
temp = saveint(temp)
if temp != 0:
- max_temp = int(max_temp)
+ max_temp = max_temp and int(max_temp) or None
perfdata = [("temp", temp, None, max_temp )]
- temptext = ", %d degrees (critical at %d)" % (temp, max_temp)
+ temptext = ", Temperature: %d °C" % temp
+ if max_temp != None:
+ temptext += " (critical at %d °C)" % max_temp
else:
perfdata = []
temptext = ""
@@ -82,7 +79,6 @@ def check_cisco_temp_perf(item, _no_params, info):
return (3, "state is %s" % statename)
else:
return (2, "state is %s%s" % (statename, temptext), perfdata)
- return (3, "Item %s not found in SNMP data" % item)
check_info['cisco_temp_perf'] = {
@@ -94,8 +90,13 @@ check_info['cisco_temp_perf'] = {
lambda oid: "cisco" in oid(".1.3.6.1.2.1.1.1.0").lower() \
and oid(".1.3.6.1.4.1.9.9.13.1.3.1.3.*") != None \
and oid(".1.3.6.1.4.1.9.9.91.1.1.1.1.*") == None,
- "snmp_info" : ( ".1.3.6.1.4.1.9.9.13.1.3.1",
- [2, 3, 4, 6, OID_END ] ), # CISCO-SMI
+ "snmp_info" : (".1.3.6.1.4.1.9.9.13.1.3.1", [ # CISCO-SMI
+ 2, # ciscoEnvMonTemperatureStatusDescr
+ 3, # ciscoEnvMonTemperatureStatusValue
+ 4, # ciscoEnvMonTemperatureThreshold
+ 6, # ciscoEnvMonTemperatureState
+ OID_END
+ ]),
"group" : "temperature_auto",
"includes" : ['cisco_sensor_item.include'],
}
Module: check_mk
Branch: master
Commit: b7f4c0066be9aa6521fe898265d865286859db63
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b7f4c0066be9aa…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jan 12 13:45:56 2015 +0100
#1808 FIX Fixed broken nagios config when using RBN without a host defined
Check_MK generated a broken configuration where the contact group 'check-mk-notify'
was missing when rule based notifications (RBN) were enabled without a single
host configured.
---
.werks/1808 | 12 ++++++++++++
ChangeLog | 1 +
modules/check_mk.py | 6 +++---
3 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/.werks/1808 b/.werks/1808
new file mode 100644
index 0000000..0248259
--- /dev/null
+++ b/.werks/1808
@@ -0,0 +1,12 @@
+Title: Fixed broken nagios config when using RBN without a host defined
+Level: 1
+Component: core
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1421066674
+
+Check_MK generated a broken configuration where the contact group 'check-mk-notify'
+was missing when rule based notifications (RBN) were enabled without a single
+host configured.
diff --git a/ChangeLog b/ChangeLog
index a7023a6..6ec3de3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
* 1792 FIX: Fix path to special agents in case of manual installation
* 1797 FIX: Fix incomplete configuration during checking when using CMC...
* 1832 FIX: Fix "global name 'splitted' is not defined" in bulk inventory...
+ * 1808 FIX: Fixed broken nagios config when using RBN without a host defined...
Checks & Agents:
* 1665 agent_netapp: New special agent for NetApp monitoring via Web-API...
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 875a1ef..8f40887 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -1866,7 +1866,7 @@ def create_nagios_config(outfile = sys.stdout, hostnames = None):
for hostname in hostnames:
create_nagios_config_host(outfile, hostname)
- create_nagios_config_contacts(outfile)
+ create_nagios_config_contacts(outfile, hostnames)
create_nagios_config_hostgroups(outfile)
create_nagios_config_servicegroups(outfile)
create_nagios_config_contactgroups(outfile)
@@ -2551,7 +2551,7 @@ def create_nagios_config_timeperiods(outfile):
outfile.write(" exclude\t\t\t%s\n" % ",".join(tp["exclude"]))
outfile.write("}\n\n")
-def create_nagios_config_contacts(outfile):
+def create_nagios_config_contacts(outfile, hostnames):
if len(contacts) > 0:
outfile.write("\n# ------------------------------------------------------------\n")
outfile.write("# Contact definitions (controlled by variable 'contacts')\n")
@@ -2600,7 +2600,7 @@ def create_nagios_config_contacts(outfile):
outfile.write(" contactgroups\t\t\t%s\n" % ", ".join(cgrs))
outfile.write("}\n\n")
- if enable_rulebased_notifications:
+ if enable_rulebased_notifications and hostnames:
outfile.write(
"# Needed for rule based notifications\n"
"define contact {\n"
Module: check_mk
Branch: master
Commit: e8bb7c633edbfda168d542dd1a9281ac87e29aec
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e8bb7c633edbfd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jan 12 13:13:14 2015 +0100
made forwarded hostname configurable for new check check_mail
---
checks/check_mail | 3 +++
doc/treasures/active_checks/check_mail | 2 +-
web/plugins/wato/active_checks.py | 14 ++++++++------
3 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/checks/check_mail b/checks/check_mail
index 509c87c..386b416 100644
--- a/checks/check_mail
+++ b/checks/check_mail
@@ -59,6 +59,9 @@ def check_mail_arguments(params):
if 'facility' in forward:
args += ' --forward-facility=%d' % forward['facility']
+ if 'host' in forward:
+ args += ' --forward-host=%s' % quote_shell_string(forward['host'])
+
if forward.get('application'):
args += ' --forward-app=%s' % quote_shell_string(forward['application'])
diff --git a/doc/treasures/active_checks/check_mail b/doc/treasures/active_checks/check_mail
index bc77935..7c2ccf6 100755
--- a/doc/treasures/active_checks/check_mail
+++ b/doc/treasures/active_checks/check_mail
@@ -318,7 +318,7 @@ def forward_to_ec(mails):
# Construct the final syslog message
log = '<%d>%s' % (forward_facility + priority, cur_time)
- log += ' %s %s: %s' % (forward_host or 'None', application, log_line)
+ log += ' %s %s: %s' % (forward_host or fetch_server, application, log_line)
messages.append(log)
g_forwarded.append(index)
diff --git a/web/plugins/wato/active_checks.py b/web/plugins/wato/active_checks.py
index 050047b..b7ccfc2 100644
--- a/web/plugins/wato/active_checks.py
+++ b/web/plugins/wato/active_checks.py
@@ -1876,16 +1876,14 @@ register_rule(group,
'but only the whones whose subject matches the given regular expression. '),
)),
('facility', DropdownChoice(
- title = _("Syslog facility for forwarded messages"),
- help = _("When forwarding messages and no facility can be extracted from the "
- "message this facility is used."),
+ title = _("Events: Syslog facility"),
+ help = _("Use this syslog facility for all created events"),
choices = syslog_facilities,
default_value = 2, # mail
)),
('application', Alternative(
- title = _("Syslog application"),
- help = _("When forwarding messages and no facility can be extracted from the "
- "message this application is used."),
+ title = _("Events: Syslog application"),
+ help = _("Use this syslog application for all created events"),
elements = [
FixedValue(None,
title = _("Use the mail subject"),
@@ -1900,6 +1898,10 @@ register_rule(group,
),
]
)),
+ ('host', TextAscii(
+ title = _('Events: Hostname'),
+ help = _('Use this hostname for all created events instead of the name of the mailserver'),
+ )),
('body_limit', Integer(
title = _('Limit length of mail body'),
help = _('When forwarding mails from the mailbox to the event console, the '
Module: check_mk
Branch: master
Commit: 29f7d27528ba9e4633b19895913323fe9dd4f731
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=29f7d27528ba9e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jan 12 13:03:20 2015 +0100
#1807 check_mail: Added new check to check IMAP/POP3 login (incl. forwarding of mails to event console)
A new check has been added which checks whether or not a connect and login to an IMAP/POP3 server is
possible. This check also support fetching of the mails located in the inbox of the logged in mailbox,
parsing and forwarding them to the event console.
---
.werks/1807 | 12 +
ChangeLog | 1 +
checks/check_mail | 83 +++++++
doc/treasures/active_checks/.f12 | 2 +-
doc/treasures/active_checks/check_mail | 396 ++++++++++++++++++++++++++++++++
pnp-templates/check_mk_active-mail.php | 33 +++
web/htdocs/wato.py | 24 ++
web/plugins/wato/active_checks.py | 245 ++++++++++++++++++++
web/plugins/wato/check_parameters.py | 23 --
9 files changed, 795 insertions(+), 24 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=29f7d27528…
Module: check_mk
Branch: master
Commit: c1445c94bb009be2bbb3f1458c66704e5aca5711
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c1445c94bb009b…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Jan 12 11:27:04 2015 +0100
#1209 FIX livestatus_status: Check handles cluster using in cluster now
---
.werks/1209 | 10 ++++++++++
ChangeLog | 1 +
checks/livestatus_status | 4 +++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/1209 b/.werks/1209
new file mode 100644
index 0000000..1f0e940
--- /dev/null
+++ b/.werks/1209
@@ -0,0 +1,10 @@
+Title: livestatus_status: Check handles cluster using in cluster now
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1421058385
+
+
diff --git a/ChangeLog b/ChangeLog
index c484f00..c324fc0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -56,6 +56,7 @@
* 1806 FIX: services check was not recognizing configured state when no service was found
* 1840 FIX: oracle_tablespaces: fix implementation of magic factor
* 1848 FIX: df: title of pnp graphs for filesystem checks fixed...
+ * 1209 FIX: livestatus_status: Check handles cluster using in cluster now
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/checks/livestatus_status b/checks/livestatus_status
index 86bcc2a..07f1980 100644
--- a/checks/livestatus_status
+++ b/checks/livestatus_status
@@ -37,7 +37,9 @@ def livestatus_status_parse(info):
while n < len(info):
site = info[n][0][1:-1]
if n == len(info) - 1 or info[n+1][0].startswith('['):
- parsed[site] = None # Site is down
+ # Handle the case if the check running in cluster
+ if site not in parsed.keys():
+ parsed[site] = None # Site is down
n += 1
else:
headers = info[n+1]
Module: check_mk
Branch: master
Commit: 939152f4368ce775f04b8fec955d56b06befe322
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=939152f4368ce7…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Sat Jan 10 00:09:49 2015 +0100
#1848 FIX df: title of pnp graphs for filesystem checks fixed
The title of pnp graphs for filesystem checks (df...) where broken since the new service description
of these checks ("Filesystem ...") was introduced. This has been fixed now.
---
.werks/1848 | 12 ++++++++++++
ChangeLog | 1 +
pnp-templates/check_mk-df.php | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/1848 b/.werks/1848
new file mode 100644
index 0000000..86f453f
--- /dev/null
+++ b/.werks/1848
@@ -0,0 +1,12 @@
+Title: df: title of pnp graphs for filesystem checks fixed
+Level: 2
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1420844843
+
+The title of pnp graphs for filesystem checks (df...) where broken since the new service description
+of these checks ("Filesystem ...") was introduced. This has been fixed now.
+
diff --git a/ChangeLog b/ChangeLog
index a1e1075..c484f00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -55,6 +55,7 @@
* 1463 FIX: juniper_screenos_mem, juniper_trpz_mem: pnp template fixed
* 1806 FIX: services check was not recognizing configured state when no service was found
* 1840 FIX: oracle_tablespaces: fix implementation of magic factor
+ * 1848 FIX: df: title of pnp graphs for filesystem checks fixed...
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/pnp-templates/check_mk-df.php b/pnp-templates/check_mk-df.php
index ae1645e..8e6e8a1 100644
--- a/pnp-templates/check_mk-df.php
+++ b/pnp-templates/check_mk-df.php
@@ -41,7 +41,7 @@ foreach ($NAME as $i => $n) {
# RRDtool Options
#$servicedes=$NAGIOS_SERVICEDESC
-$fsname = str_replace("_", "/", substr($servicedesc, 3));
+$fsname = str_replace("_", "/", substr($servicedesc,11));
$fstitle = $fsname;
# Hack for windows: replace C// with C:\