Module: check_mk
Branch: master
Commit: 3768828da12d1f735da83248b969f074bac66d47
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3768828da12d1f…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Oct 22 16:03:02 2014 +0200
Preparing new Notification Method Spectrum (via snmp trap)
---
notifications/spectrum | 62 +++++++++++++++++++++++++++++++++++++
web/plugins/wato/notifications.py | 20 ++++++++++++
2 files changed, 82 insertions(+)
diff --git a/notifications/spectrum b/notifications/spectrum
new file mode 100755
index 0000000..82f8310
--- /dev/null
+++ b/notifications/spectrum
@@ -0,0 +1,62 @@
+#!/usr/bin/python
+# Sepectrum Server
+
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | 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.
+
+
+import os, subprocess
+
+def send_trap(oids, target, community):
+ cmd = ["/usr/sbin/snmptrap", '-v', '1', '-c', community, target ]
+ for oid, text in oids.items():
+ cmd += [oid, str(text)]
+ p = subprocess.Popen(cmd, stdin = subprocess.PIPE)
+ return True
+
+def main():
+ # gather all options from env
+ context = dict([
+ (var[7:], value.decode("utf-8"))
+ for (var, value)
+ in os.environ.items()])
+ oids = {
+ "1.3.6.1.4.1.13424.10.5.2.1.1.1" : context['MONITORING_HOST'],
+ "1.3.6.1.4.1.13424.10.5.2.1.1.2" : context['HOSTNAME'],
+ "1.3.6.1.4.1.13424.10.5.2.1.1.3" : context['HOSTADDRESS'],
+ "1.3.6.1.4.1.13424.10.5.2.1.1.4" : context['HOSTCONTACTGROUPNAMES'],
+ "1.3.6.1.4.1.13424.10.5.2.1.1.5" : context['SERVICEDESC'],
+ "1.3.6.1.4.1.13424.10.5.2.1.1.6" : context['SERVICESTATE'],
+ "1.3.6.1.4.1.13424.10.5.2.1.1.7" : context['SERVICEOUTPUT'],
+ "1.3.6.1.4.1.13424.10.5.2.1.1.8" : "HARD", # Notifications always are in HARDSTATE
+ "1.3.6.1.4.1.13424.10.5.2.1.1.9" : context['SERVICEDESC'],
+ "1.3.6.1.4.1.13424.10.5.2.1.1.10" : 3, #SPECIFIC TRAP (type) NUMBER
+ "1.3.6.1.4.1.13424.10.5.2.1.1.11" : "CNO Digital Lvl2 Support (P3 ET, call xxxxx)", #CALLOUT STRING
+ "1.3.6.1.4.1.13424.10.5.2.1.1.12" : context['SERVICEURL'],
+ "1.3.6.1.4.1.13424.10.5.2.1.1.13" : "%s Alarm on host %s" % (context['SERVICEDESC'], context['HOSTNAME']),
+ "1.3.6.1.4.1.13424.10.5.2.1.1.14" : context['SERVICEGROUPNAMES'],
+ }
+ send_trap(oids, context['PARAMETER_DESTINATION'], context['PARAMETER_COMMUNITY'])
+
+main()
diff --git a/web/plugins/wato/notifications.py b/web/plugins/wato/notifications.py
index 33d8830..12d4733 100644
--- a/web/plugins/wato/notifications.py
+++ b/web/plugins/wato/notifications.py
@@ -197,3 +197,23 @@ register_notification_parameters("mkeventd",
]
)
)
+
+
+register_notification_parameters("spectrum",
+ Dictionary(
+ optional_keys = None,
+ elements = [
+ ("destination",
+ IPv4Address(
+ title = _("Destination IP"),
+ help = _("IP Address of the Spectrum server receiving the SNMP trap")
+ ),
+ ),
+ ("community",
+ TextAscii(
+ title = _("SNMP Community"),
+ help = _("SNMP Community for the SNMP trap")
+ ),
+ ),
+ ])
+ )
Module: check_mk
Branch: master
Commit: 9f9dbf92b0316b50d83c0c70eee4552decddf99b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9f9dbf92b0316b…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Wed Oct 22 10:57:32 2014 +0200
oracle_instance: this key new oracle check has a man page
---
checkman/oracle_instance | 124 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 124 insertions(+)
diff --git a/checkman/oracle_instance b/checkman/oracle_instance
new file mode 100644
index 0000000..73e726d
--- /dev/null
+++ b/checkman/oracle_instance
@@ -0,0 +1,124 @@
+title: Oracle Database Instance
+agents: linux, aix, hpux, solaris, windows
+distribution: check_mk
+catalog: app/oracle
+license: GPL
+description:
+ This check monitors the state of an Oracle Instance. The check depends on
+ the state of the database.
+
+ The database must be a Primary Database and OPEN (startup in sqlplus) or
+ a Physical Standby Database and OPEN or MOUNTED. The state is CRITICAL when
+ this is not true.
+
+ The archive logmode, logging option, logins and uptime are also checked:
+ the state is WARNING when the Database is in NOARCHIVELOG or in ARCHIVELOG
+ and FORCE LOGGING is disabled. The state is CRITICAL when logins are not
+ possible. This behaviour can be changed with rules. The rule for logins
+ is only working when the connection is established with 'sysdba'. Otherwise
+ the rule for logins is always CRITICAL.
+
+ This check requires the new agent plugin mk_oracle(.new) from our plugin
+ directory.
+
+ You can find a description for a basic configuration below. More details for
+ special setups will be available on the homepage of the Check_MK project.
+ https://mathias-kettner.de/checkmk_oracle.html
+
+ There are two configuration files important and stored in $MK_CONFDIR.
+ {sqlnet.ora} is a static file and is essential for the connection to the
+ database. It is also used to disable trace. Otherwise the oracle client
+ might create a lot of trace data in $HOME of the root user and may fill the
+ '/' filesystem.
+
+ {mk_oracle.cfg} is the main configuration file for the plugin. Most
+ importantly, it contains the {credentials} for the connection to the
+ database. The ':' is used as a field separator in each line defining
+ the credentials. <sysdba>, <Host> and <Port> are optional: per default
+ <sysdba> is empty, Host=localhost and Port=1521. Host and Port depends on
+ the Listener configuration of the database. DBUSER is used as a default for
+ all Instances on the Host. This default could be replaced for each Instance
+ with a DBUSER_<ORACLE_SID> entry. ASMUSER is a special entry for an Oracle
+ ASM Instance. ASM needs a 'sysdba' or 'asmsnmp' entry because this instance
+ is not OPEN. There is no ASMUSER_<ORACLE_SID> entry!
+
+ ASMUSER=<Username>:<Password>:<sysdba/asmsnmp>:<Host>:<Port>
+
+ DBUSER=<Username>:<Password>:<sysdba>:<Host>:<Port>
+
+ DBUSER_<ORACLE_SID>=<Username>:<Password>:<sysdba>:<Host>:<Port>
+
+ The configuration of a normal Instance is very easy. An example for ASM
+ follows afterwards below.
+
+ sqlplus / as sysdba
+
+ create user check_mk identifiebd by checkmk;
+
+ grant connect, select_catalog_role to check_mk;
+
+ An additional grant for a configuration to a Physical Standby Database is
+ mandatory when the Standby is not running in OPEN mode. In most setups,
+ the Standby is running in MOUNT state requiring a 'SYSDBA' connection
+ due to the closed Data Dictionary. This grant is needed on the Primary as
+ well. Otherwise mk_oracle is not able to monitor the Instance after a role
+ change on the old Primary.
+
+ grant sysdba to check_mk;
+
+ Example for ASM:
+
+ An ASM Instance does not have a data dictionary. This is why a sysdba or
+ asmsnmp connection is required. Oracle changed the security in Release 11.1.
+ The connection with sqlplus must be carried out with 'as sysasm'. Older
+ versions are working like a normal Instance requiring a 'as sysdba'
+ connection. There is no requirement to create a new user for mk_oracle.
+ You cold use the existent default user asmsnmp.
+
+ sqlplus / as sysasm
+
+ create user check_mk identifiebd by checkmk;
+
+ grant sysdba to check_mk;
+
+ There is no ASM Instance Check at the moment. The configuration is needed
+ for the other checks.
+
+ More details can be found in the documentation in
+ https://mathias-kettner.de/checkmk_oracle.html
+
+examples:
+ factory_settings["oracle_instance_defaults"] = {
+ "logins" : 2,
+ "noforcelogging" : 1,
+ "noarchivelog" : 1,
+ }
+
+item:
+ ORA <ORACLE_SID> Instance
+
+[parameters]
+parameters (dict):
+
+ "archivelog": (int) - State if Archive Logmode is enabled. No check is
+ done by default. 0 OK, 1 WARNING, 2 CRIITCAL or 3 UNKNOWN
+
+ "noarchivelog": (int) - State in if Archive Logmode is disabled. 1 is
+ default. 0 OK, 1 WARNING, 2 CRIITCAL or 3 UNKNOWN
+
+ "forcelogging": (int) - State if of Force Logging is enabled. No check is
+ done by default. 0 OK, 1 WARNING, 2 CRIITCAL or 3 UNKNOWN
+
+ "noforcelogging": (int) - State if Force Logging is disabled. 1 is
+ default. 0 OK, 1 WARNING, 2 CRIITCAL or 3 UNKNOWN
+
+ "logins": (int) - State if logins are not possible. 3 is default. 0
+ OK, 1 WARNING, 2 CRIITCAL or 3 UNKNOWN
+
+ "uptime_min": (int, int) - Minimum required uptime (warn, crit) in seconds.
+
+perfdata:
+ The uptime in seconds.
+
+inventory:
+ One service will be created for each Oracle Instance.
Module: check_mk
Branch: master
Commit: 0637604da191e59a45e4afcb2e8915e7e853b2dd
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0637604da191e5…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Oct 20 18:18:07 2014 +0200
#1422 agent_vsphere: now able to configure where the power state of a vm or esx-host should be assigned
Previously the virtual machines and hosts power states were always assigned to the queried vCenter or host system.<br>
You can now configure via WATO rule <tt>Check state of VMWare ESX via vSphere</tt> that this information is piggybacked
'down' to the esx hosts or the virtual machines.<br>
With this new feature a virtual machine may also have the following informations<br>
<tt>ESX Hostsystem OK - Running on esx.mathias-kettner.de</tt><br>
<tt>VM LinuxIII OK - power state: poweredOn, running on [esx.mathias-kettner.de]</tt>
---
.werks/1422 | 18 ++++++++
ChangeLog | 1 +
agents/special/agent_vsphere | 77 +++++++++++++++++++++++++++----
checks/agent_vsphere | 6 +++
web/plugins/wato/datasource_programs.py | 24 +++++++++-
5 files changed, 115 insertions(+), 11 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=0637604da1…
Module: check_mk
Branch: master
Commit: 5d55442c99a0f7525651744b66413b6b244192f2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5d55442c99a0f7…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Oct 20 15:37:42 2014 +0200
#1131 FIX esx_vsphere_hostsystem.maintenance: fixed misspelling in service description
"Maintenace Mode" has been renamed to "Maintenance Mode".
Note: This is only a minor incompatible change, since this check has no performance data.<br>
If you have any rules specifically configured for this check (e.g disabled services)
you need to update the service description filter.
---
.werks/1131 | 13 +++++++++++++
ChangeLog | 2 ++
checks/esx_vsphere_hostsystem | 2 +-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/1131 b/.werks/1131
new file mode 100644
index 0000000..8e867be
--- /dev/null
+++ b/.werks/1131
@@ -0,0 +1,13 @@
+Title: esx_vsphere_hostsystem.maintenance: fixed misspelling in service description
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.5i6
+Date: 1413811961
+Class: fix
+
+"Maintenace Mode" has been renamed to "Maintenance Mode".
+Note: This is only a minor incompatible change, since this check has no performance data.<br>
+If you have any rules specifically configured for this check (e.g disabled services)
+you need to update the service description filter.
+
diff --git a/ChangeLog b/ChangeLog
index 3185931..a8ed333 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -112,6 +112,8 @@
* 1126 FIX: bluecat_ntp: check no longer crashes on evaluating sysLeap values higher than 1...
* 1127 FIX: bluecat_dhcp: fixed exception when data was available.. returns UNKNOWN when data is missing
* 1128 FIX: bluecat_dns: now reports UNKNOWN if no snmp data is available
+ * 1131 FIX: esx_vsphere_hostsystem.maintenance: fixed misspelling in service description...
+ NOTE: Please refer to the migration notes!
Multisite:
* 1066 New Dashboard Designer...
diff --git a/checks/esx_vsphere_hostsystem b/checks/esx_vsphere_hostsystem
index 745e97f..4db95de 100644
--- a/checks/esx_vsphere_hostsystem
+++ b/checks/esx_vsphere_hostsystem
@@ -278,7 +278,7 @@ def check_esx_vsphere_hostsystem_maintenance(_no_item, params, info):
check_info['esx_vsphere_hostsystem.maintenance'] = {
"inventory_function" : inventory_esx_vsphere_hostsystem_maintenance,
"check_function" : check_esx_vsphere_hostsystem_maintenance,
- "service_description" : "Maintenace Mode",
+ "service_description" : "Maintenance Mode",
"group" : "esx_hostystem_maintenance",
}
Module: check_mk
Branch: master
Commit: ed70f8eec3a05b5d9a235d0e390b1c81f555fe12
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ed70f8eec3a05b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Oct 20 10:59:48 2014 +0200
Dashlet titles can now be localized with custom localizations
---
web/htdocs/dashboard.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index 97d7d9a..ad5fcdb 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -474,7 +474,9 @@ def render_dashlet(name, board, nr, dashlet, wato_folder, add_url_vars):
if title and dashlet.get('show_title'):
url = dashlet.get("title_url", None)
if url:
- title = '<a href="%s">%s</a>' % (url, title)
+ title = '<a href="%s">%s</a>' % (url, _u(title))
+ else:
+ title = _u(title)
html.write('<div class="title" id="dashlet_title_%d">%s</div>' % (nr, title))
if dashlet.get("background", True):
bg = " background"
@@ -855,7 +857,7 @@ def page_edit_dashlet():
default_value = True,
)),
('title', TextUnicode(
- title = _('Custom Title'),
+ title = _('Custom Title') + '<sup>*</sup>',
help = _('Most dashlets have a hard coded default title. For example the view snapin '
'has even a dynamic title which defaults to the real title of the view. If you '
'like to use another title, set it here.'),
@@ -934,6 +936,9 @@ def page_edit_dashlet():
visuals.render_context_specs(dashlet, context_specs)
forms.end()
+ url = "wato.py?mode=edit_configvar&varname=user_localizations"
+ html.message("<sup>*</sup>" + _("These texts may be localized depending on the users' "
+ "language. You can configure the localizations <a href=\"%s\">in the global settings</a>.") % url)
html.button("save", _("Save"))
html.hidden_fields()
html.end_form()