lists.checkmk.com
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
List overview
Download
Checkmk git commits
December 2014
----- 2024 -----
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
checkmk-commits@lists.checkmk.com
6 participants
519 discussions
Start a n
N
ew thread
Check_MK Git: check_mk: #1780 FIX Fix broken icon in host diagnostic mode
by Mathias Kettner
Module: check_mk Branch: master Commit: d6cd7acc7928d0f0b9e235949a802d89c85c1184 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d6cd7acc7928d0…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Mon Dec 15 22:31:16 2014 +0100 #1780 FIX Fix broken icon in host diagnostic mode --- .werks/1779 | 9 +++++++++ .werks/1780 | 9 +++++++++ ChangeLog | 2 ++ web/htdocs/js/wato.js | 4 ++-- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.werks/1779 b/.werks/1779 new file mode 100644 index 0000000..604a5ea --- /dev/null +++ b/.werks/1779 @@ -0,0 +1,9 @@ +Title: Fix broken icon in host diagnostic mode +Level: 1 +Component: wato +Compatible: compat +Version: 1.2.6b2 +Date: 1418679041 +Class: fix + + diff --git a/.werks/1780 b/.werks/1780 new file mode 100644 index 0000000..8e5911f --- /dev/null +++ b/.werks/1780 @@ -0,0 +1,9 @@ +Title: Fix broken icon in host diagnostic mode +Level: 1 +Component: wato +Compatible: compat +Version: 1.2.6b2 +Date: 1418679067 +Class: fix + + diff --git a/ChangeLog b/ChangeLog index b34e312..3da2bb8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,8 @@ WATO: * 1760 Added search form to manual checks page * 1761 FIX: Ruleset search is now consistent for host & serviceparameters and manual checks + * 1779 FIX: Fix broken icon in host diagnostic mode + * 1780 FIX: Fix broken icon in host diagnostic mode Notifications: * 1662 notification plugin spectrum: finalized script. now able to handle host notications diff --git a/web/htdocs/js/wato.js b/web/htdocs/js/wato.js index 2b8bae4..23000dc 100644 --- a/web/htdocs/js/wato.js +++ b/web/htdocs/js/wato.js @@ -810,11 +810,11 @@ function handle_host_diag_result(ident, response_text) { var retry = document.getElementById(ident + '_retry'); if (response_text[0] == "0") { - img.src = "images/icon_success.gif"; + img.src = "images/icon_success.png"; log.className = "log diag_success"; } else { - img.src = "images/icon_failed.gif"; + img.src = "images/icon_failed.png"; log.className = "log diag_failed"; }
9 years, 9 months
1
0
0
0
Check_MK Git: check_mk: Removed duplicate Werk
by Mathias Kettner
Module: check_mk Branch: master Commit: ae167e3cbd47b9f5e3ec8993441090948a31133b URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ae167e3cbd47b9…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Mon Dec 15 22:31:57 2014 +0100 Removed duplicate Werk --- .werks/1780 | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.werks/1780 b/.werks/1780 deleted file mode 100644 index 8e5911f..0000000 --- a/.werks/1780 +++ /dev/null @@ -1,9 +0,0 @@ -Title: Fix broken icon in host diagnostic mode -Level: 1 -Component: wato -Compatible: compat -Version: 1.2.6b2 -Date: 1418679067 -Class: fix - -
9 years, 9 months
1
0
0
0
Check_MK Git: check_mk: Fixed ChangeLog
by Mathias Kettner
Module: check_mk Branch: master Commit: 92bd8cc37828de0f9fde73e40ae0d5cf6dd4279e URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=92bd8cc37828de…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Mon Dec 15 22:34:09 2014 +0100 Fixed ChangeLog --- ChangeLog | 2 -- 1 file changed, 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3da2bb8..b34e312 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,8 +20,6 @@ WATO: * 1760 Added search form to manual checks page * 1761 FIX: Ruleset search is now consistent for host & serviceparameters and manual checks - * 1779 FIX: Fix broken icon in host diagnostic mode - * 1780 FIX: Fix broken icon in host diagnostic mode Notifications: * 1662 notification plugin spectrum: finalized script. now able to handle host notications
9 years, 9 months
1
0
0
0
Check_MK Git: check_mk: logins: fixed a typo
by Goetz Golla
Module: check_mk Branch: master Commit: 3e399e15c56ffdce0091392e5a4b7111bd5d5437 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3e399e15c56ffd…
Author: Goetz Golla <gg(a)mathias-kettner.de> Date: Mon Dec 15 16:55:46 2014 +0100 logins: fixed a typo --- checks/logins | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checks/logins b/checks/logins index ac9636c..766bdd2 100644 --- a/checks/logins +++ b/checks/logins @@ -45,7 +45,7 @@ def check_logins(_no_item, params, info): elif logins >= warn: state = 1 - infotext = "%d logins on system, levels at %d/%d" % ( users, warn, crit ) + infotext = "%d logins on system, levels at %d/%d" % ( logins, warn, crit ) perfdata = [ ( "logins", logins, warn, crit, 0 ) ] yield state, infotext, perfdata
9 years, 9 months
1
0
0
0
Check_MK Git: check_mk: Conflicts:
by Andreas Boesl
Module: check_mk Branch: master Commit: 4096c435dfcc8706c94c9a9b8b377eae7560ded8 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4096c435dfcc87…
Author: Andreas Boesl <ab(a)mathias-kettner.de> Date: Mon Dec 15 15:36:59 2014 +0100 Conflicts: doc/treasures/mknotifyd --- .werks/1664 | 10 ++++++++++ ChangeLog | 1 + doc/treasures/mknotifyd | 42 ++++++++++++++++++++++++------------------ 3 files changed, 35 insertions(+), 18 deletions(-) diff --git a/.werks/1664 b/.werks/1664 new file mode 100644 index 0000000..455453c --- /dev/null +++ b/.werks/1664 @@ -0,0 +1,10 @@ +Title: mknotifyd: further performance improvements for notification forwarding +Level: 1 +Component: notifications +Class: fix +Compatible: compat +State: unknown +Version: 1.2.7i1 +Date: 1418654079 + + diff --git a/ChangeLog b/ChangeLog index 43c6fb9..b34e312 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,7 @@ Notifications: * 1662 notification plugin spectrum: finalized script. now able to handle host notications * 1661 FIX: mknotifyd: improved performance when receiving forwarded notifications + * 1664 FIX: mknotifyd: further performance improvements for notification forwarding 1.2.6b1: diff --git a/doc/treasures/mknotifyd b/doc/treasures/mknotifyd index 69925b7..39a9e57 100755 --- a/doc/treasures/mknotifyd +++ b/doc/treasures/mknotifyd @@ -115,7 +115,7 @@ class SpoolfilesHandler: while not self._should_terminate: self.process_directory(g_spool_dir) self.process_directory(g_deferred_dir, g_config["notification_deferred_retention_time"]) - time.sleep(3) + time.sleep(1) except Exception, e: log("Error processing spoolfile %s" % format_exception()) @@ -123,7 +123,7 @@ class SpoolfilesHandler: self._is_running = False - def process_directory(self, dir_path, files_older_than = None): + def process_directory(self, dir_path, files_older_than = 3): for root, dirs, files in os.walk(dir_path): for spoolfile in files: now = time.time() @@ -134,7 +134,6 @@ class SpoolfilesHandler: file_age = now - os.stat(spoolfile_path)[8] if file_age < files_older_than: - verbose("File age %d" % file_age, 2) continue try: @@ -157,13 +156,16 @@ class SpoolfilesHandler: del content["forward"] verbose("Forward notification to %s %s" % (host, port), 2) sock.connect((host, int(port))) - sock.send(pickle.dumps(content)) + data_to_send = pickle.dumps(content) + sock.send("%10d" % len(data_to_send)) + sock.send(data_to_send) + # Wait for OK response while True: - readable = select.select([sock], [], [], 1)[0] + readable = select.select([sock], [], [], 5)[0] data = None try: - chunk = sock.recv(8192) + chunk = sock.recv(16) response_text += chunk if not chunk: break @@ -239,17 +241,21 @@ class TcpServer: client_data = "" chunk_count = 0 client_socket, addr_info = s.accept() - from_name = "%s:%s" % addr_info + from_name = "%s:%s" % addr_info + data_ready = True + data_header = client_socket.recv(10) + data_size = int(data_header) while True: try: - data_ready = select.select([client_socket], [], [], 0.2)[0] - if data_ready: - chunk = client_socket.recv(8192) - if not chunk: - break - chunk_count += 1 - client_data += chunk - else: + chunk = client_socket.recv(data_size) + chunk_count += 1 + client_data += chunk + if len(client_data) >= data_size: + break + + # Break if not data was received for the last 5 seconds + data_ready = select.select([client_socket], [], [], 5)[0] + if not data_ready: break except: break # Error while reading @@ -268,8 +274,8 @@ class TcpServer: verbose("client data processed - sending OK", 2) client_socket.send("OK") + client_socket.close() except Exception, e: - log("Error processing data from %s: %s\n%s" % (from_name, e, format_exception())) try: if client_socket: @@ -361,7 +367,7 @@ def load_configuration(): for d, sb, fs in os.walk(config_dir) ], []) list_of_files.sort(cmp = cmp_config_paths) for path in list_of_files: - verbose("Reading configuration file %s" % path) + verbose("Reading configuration file %s" % path, 3) execfile(path, {}, g_config) except: g_config = last_config @@ -464,7 +470,7 @@ def run_notifyd(): g_spoolfiles_handler._should_terminate = True now = time.time() while (g_tcp_server._is_running or g_spoolfiles_handler._is_running) \ - and time.time() - now < 4: + and time.time() - now < 6: time.sleep(0.1) if g_tcp_server._is_running:
9 years, 9 months
1
0
0
0
Check_MK Git: check_mk: Fixed syntax error in wato
by Bastian Kuhn
Module: check_mk Branch: master Commit: 89006a2433438d5183ccf9fd75a3c3ef4eb9ae29 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=89006a2433438d…
Author: Bastian Kuhn <bk(a)mathias-kettner.de> Date: Mon Dec 15 14:41:58 2014 +0100 Fixed syntax error in wato --- web/plugins/wato/notifications.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/plugins/wato/notifications.py b/web/plugins/wato/notifications.py index 27e57ae..d821fee 100644 --- a/web/plugins/wato/notifications.py +++ b/web/plugins/wato/notifications.py @@ -221,11 +221,11 @@ register_notification_parameters("spectrum", TextAscii( title = _("SNMP Community"), help = _("SNMP Community for the SNMP trap") - ), + )), ("baseoid", TextAscii( title = _("Base OID"), - help = _("The base OID for the trap content") + help = _("The base OID for the trap content"), default_value = "1.3.6.1.4.1.1234" ), ),
9 years, 9 months
1
0
0
0
Check_MK Git: check_mk: #1204 FIX veeam_client: Not longer throwing an error in case of currenlty running backup
by Bastian Kuhn
Module: check_mk Branch: master Commit: fe851fbf81075d69ff0d9dd22f96342c89d36406 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fe851fbf81075d…
Author: Bastian Kuhn <bk(a)mathias-kettner.de> Date: Mon Dec 15 14:33:42 2014 +0100 #1204 FIX veeam_client: Not longer throwing an error in case of currenlty running backup --- .werks/1204 | 10 ++++++++++ ChangeLog | 1 + checks/veeam_client | 3 ++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.werks/1204 b/.werks/1204 new file mode 100644 index 0000000..c39d540 --- /dev/null +++ b/.werks/1204 @@ -0,0 +1,10 @@ +Title: veeam_client: Not longer throwing an error in case of currenlty running backup +Level: 1 +Component: checks +Class: fix +Compatible: compat +State: unknown +Version: 1.2.7i1 +Date: 1418650305 + + diff --git a/ChangeLog b/ChangeLog index b743f34..43c6fb9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ * 1778 FIX: cisco_secure: do not warn for port where port security cannot be enabled * 1764 FIX: mk_sap: Fixed exception when saving status file * 1663 FIX: winperf_if: fixed incorrect enumeration of interface index... + * 1204 FIX: veeam_client: Not longer throwing an error in case of currenlty running backup Multisite: * 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report... diff --git a/checks/veeam_client b/checks/veeam_client index 489a76d..e84fd8f 100644 --- a/checks/veeam_client +++ b/checks/veeam_client @@ -105,7 +105,8 @@ def check_veeam_client(item, params, parsed): if "StopTime" not in data: state = 2 infotexts.append("No complete Backup(!!)") - else: + # If the Backup currently is running, the stop time is strange. + elif data['StopTime'] != "01.01.1900 00:00:00": stop_time = time.mktime(time.strptime( data['StopTime'], "%d.%m.%Y %H:%M:%S")) now = time.time() age = now - stop_time
9 years, 9 months
1
0
0
0
Check_MK Git: check_mk: Updated bug entries #2169
by Andreas Boesl
Module: check_mk Branch: master Commit: 6c1805d1e385bb845f39836c3389d29320922284 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6c1805d1e385bb…
Author: Andreas Boesl <ab(a)mathias-kettner.de> Date: Mon Dec 15 13:41:11 2014 +0100 Updated bug entries #2169 --- .bugs/2169 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.bugs/2169 b/.bugs/2169 new file mode 100644 index 0000000..15255e0 --- /dev/null +++ b/.bugs/2169 @@ -0,0 +1,9 @@ +Title: Passive checks in multisite show "Active check" enabled/disabled icons +Component: multisite +State: open +Date: 2014-12-15 13:38:37 +Targetversion: future +Class: bug + +Setting active checks enabled/disabled for a -passive- check will show +the corresponding active check icon, e.g. a green check mark, on the passive check.
9 years, 9 months
1
0
0
0
Check_MK Git: check_mk: #1663 FIX winperf_if: fixed incorrect enumeration of interface index
by Andreas Boesl
Module: check_mk Branch: master Commit: 2eb43b69693f548c7894feab5e62f8f507dad7e8 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2eb43b69693f54…
Author: Andreas Boesl <ab(a)mathias-kettner.de> Date: Mon Dec 15 13:37:20 2014 +0100 #1663 FIX winperf_if: fixed incorrect enumeration of interface index The previous update broke services, which used the interface index as item. This has been fixed. --- .werks/1663 | 11 +++++++++++ ChangeLog | 1 + checks/winperf_if | 6 +++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.werks/1663 b/.werks/1663 new file mode 100644 index 0000000..59bc02a --- /dev/null +++ b/.werks/1663 @@ -0,0 +1,11 @@ +Title: winperf_if: fixed incorrect enumeration of interface index +Level: 2 +Component: checks +Class: fix +Compatible: compat +State: unknown +Version: 1.2.7i1 +Date: 1418646805 + +The previous update broke services, which used the interface index as item. +This has been fixed. diff --git a/ChangeLog b/ChangeLog index c572ca5..b743f34 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ * 1756 FIX: agent_ibmsvc: do not abort execution if one of the sections fail * 1778 FIX: cisco_secure: do not warn for port where port security cannot be enabled * 1764 FIX: mk_sap: Fixed exception when saving status file + * 1663 FIX: winperf_if: fixed incorrect enumeration of interface index... Multisite: * 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report... diff --git a/checks/winperf_if b/checks/winperf_if index 33d7117..eb67c56 100644 --- a/checks/winperf_if +++ b/checks/winperf_if @@ -151,10 +151,10 @@ def convert_winperf_if(info): converted = [] # Sort NIC names are create artifical index - nic_names = nics.keys() + nic_index = dict(map(lambda x: (x[1], x[0] + 1), enumerate(nic_names))) nic_names.sort(reverse=True) - for nr, nic_name in enumerate(nic_names): + for nic_name in nic_names: nic = nics[nic_name] mac_txt = nic.get('MACAddress') bandwidth = saveint(nic.get('Speed')) @@ -163,7 +163,7 @@ def convert_winperf_if(info): else: mac = '' converted.append(( - str(nr + 1), + str(nic_index[nic_name]), nic_name, "loopback" in nic_name.lower() and '24' or '6', bandwidth or nic[10], # Aktuelle Bandbreite
9 years, 9 months
1
0
0
0
Check_MK Git: check_mk: Conflicts:
by Andreas Boesl
Module: check_mk Branch: master Commit: 01e6a59d4480073446fea17c3a3932adca36c3ce URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=01e6a59d448007…
Author: Andreas Boesl <ab(a)mathias-kettner.de> Date: Mon Dec 15 12:12:06 2014 +0100 Conflicts: ChangeLog notifications/spectrum --- .werks/1662 | 10 ++++++ ChangeLog | 1 + notifications/spectrum | 63 +++++++++++++++++++++---------------- web/plugins/wato/notifications.py | 6 ++++ 4 files changed, 53 insertions(+), 27 deletions(-) diff --git a/.werks/1662 b/.werks/1662 new file mode 100644 index 0000000..bf4cbc3 --- /dev/null +++ b/.werks/1662 @@ -0,0 +1,10 @@ +Title: notification plugin spectrum: finalized script. now able to handle host notications +Level: 1 +Component: notifications +Class: feature +Compatible: compat +State: unknown +Version: 1.2.7i1 +Date: 1418641728 + + diff --git a/ChangeLog b/ChangeLog index f61ded8..c572ca5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,7 @@ * 1761 FIX: Ruleset search is now consistent for host & serviceparameters and manual checks Notifications: + * 1662 notification plugin spectrum: finalized script. now able to handle host notications * 1661 FIX: mknotifyd: improved performance when receiving forwarded notifications diff --git a/notifications/spectrum b/notifications/spectrum index aa7c6c4..3bbd0a4 100755 --- a/notifications/spectrum +++ b/notifications/spectrum @@ -26,17 +26,24 @@ # Boston, MA 02110-1301 USA. -import os, subprocess +import os, subprocess, sys -# Note: This notifcation plugin can only handle service notifications -# Host notifications will fail +# Note: This script contains an example configuration +# You will probably have to modify the sent information 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)] + cmd = ["/usr/bin/snmptrap", '-v', '1', '-c', community, target, "1.3.6.1.4.1.100.1.2.3", "172.25.221.23", "6", "1", "\"\"" ] + for oid, value in oids.items(): + # Feel free to add more types. Currently only Integer and Strings are supported + oid_type = type(value) + oid_id = oid_type == int and "i" or "s" + if oid_type in [str, unicode]: + value = "\"%s\"" % value.replace("\"", " ") + cmd += [oid, oid_id, "%s" % value] + + sys.stderr.write("%r" % cmd) p = subprocess.Popen(cmd, stdin = subprocess.PIPE) - return True + return p.wait() def main(): # gather all options from env @@ -49,31 +56,33 @@ def main(): if "PARAMETER_1" in context: context["PARAMETER_COMMUNITY"] = context["PARAMETER_1"] context["PARAMETER_DESTINATION"] = context["PARAMETER_2"] + context["PARAMETER_BASEOID"] = context["PARAMETER_3"] + base_oid = context.get("PARAMETER_BASEOID", "1.3.6.1.4.1.1234") - complete_service_url = context["MONITORING_HOST"] + # adjust these oids to your needs + complete_url = "https://" + context["MONITORING_HOST"] if "OMD_SITE" in context: - complete_service_url += "/" + context["OMD_SITE"] - complete_service_url += context['SERVICEURL'] + complete_url += "/" + context["OMD_SITE"] + complete_url += context.get("SERVICEURL", context.get("HOSTURL")) - # adjust these oids to your needs - # Note: HOSTCONTACTGROUPNAMES is only available via cmc 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" : complete_service_url, - "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'], + base_oid + ".1" : context['MONITORING_HOST'], + base_oid + ".2" : context['HOSTNAME'], + base_oid + ".3" : context['HOSTADDRESS'], + base_oid + ".4" : context.get('HOSTGROUPNAMES', ""), + base_oid + ".5" : context.get('SERVICEDESC', 'Connectivity'), + base_oid + ".6" : context.get('SERVICESTATE', context.get('HOSTSTATE')), + base_oid + ".7" : context.get('SERVICEOUTPUT', context.get("HOSTOUTPUT")), + base_oid + ".8" : "HARD", # Notifications always are in HARDSTATE + base_oid + ".9" : context.get('SERVICEDESC', 'Connectivity'), + base_oid + ".10" : 3, #SPECIFIC TRAP (type) NUMBER + base_oid + ".11" : "Call number 123456", #CALLOUT STRING + base_oid + ".12" : complete_url, + base_oid + ".13" : "%s alarm on host %s" % (context.get('SERVICEDESC', 'Connectivity'), context['HOSTNAME']), + base_oid + ".14" : context.get('SERVICEGROUPNAMES', ""), } - send_trap(oids, context['PARAMETER_DESTINATION'], context['PARAMETER_COMMUNITY']) + + sys.exit(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 0814e4b..27e57ae 100644 --- a/web/plugins/wato/notifications.py +++ b/web/plugins/wato/notifications.py @@ -222,6 +222,12 @@ register_notification_parameters("spectrum", title = _("SNMP Community"), help = _("SNMP Community for the SNMP trap") ), + ("baseoid", + TextAscii( + title = _("Base OID"), + help = _("The base OID for the trap content") + default_value = "1.3.6.1.4.1.1234" + ), ), ]) )
9 years, 9 months
1
0
0
0
← Newer
1
...
9
10
11
12
13
14
15
...
52
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Results per page:
10
25
50
100
200