Branch: refs/heads/master
Home: https://github.com/tribe29/checkmk
Commit: ac150ec82d0c14edda0426f442e01831a8ae4ac2
https://github.com/tribe29/checkmk/commit/ac150ec82d0c14edda0426f442e01831a…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
M cmk/base/notify.py
Log Message:
-----------
Notify helper: Improve handling of corrupt spool files
* Improve logging of unhandled exception
* Fix traceback in notify.log in case of corrupt files
* Do not read files that are currently being written
(empty file created for locking during create_spoolfile())
Change-Id: I3927c929bd87fb6e32c996c43ac1362b1709e862
Commit: 069a35d4897e4649191b0d3cf0eab3a7b9121561
https://github.com/tribe29/checkmk/commit/069a35d4897e4649191b0d3cf0eab3a7b…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
A .werks/14284
M cmk/base/notify.py
M cmk/utils/notify.py
Log Message:
-----------
14284 FIX Notification spooler: Fix producing corrupted spool files
The Notification Spooler could create corrupted spool files which resulted in
error messages like this in the <tt>var/log/mknotifyd.log</tt> log:
C+:
2022-07-18 21:49:14,276 [40] [cmk.mknotifyd] Corrupted spoolfile /omd/sites/stable/var/check_mk/notify/spool/ccaae1d5-8b33-403c-bbd8-e1b8796035ca:
Traceback (most recent call last):
File "/omd/sites/stable/lib/python3/cmk/cee/mknotifyd/spool_handler.py", line 70, in _process_spool_directory
content: Message = evaluate_file(spoolfile_path)
File "/omd/sites/stable/lib/python3/cmk/cee/mknotifyd/utils.py", line 50, in evaluate_file
return ast.literal_eval(f.read())
File "/omd/sites/stable/lib/python3.9/ast.py", line 62, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
File "/omd/sites/stable/lib/python3.9/ast.py", line 50, in parse
return compile(source, filename, mode, flags,
File "<unknown>", line 0
SyntaxError: unexpected EOF while parsing
2022-07-18 21:49:14,728 [20] [cmk.mknotifyd] got exit code 2
2022-07-18 21:49:14,728 [40] [cmk.mknotifyd] exception handling notification result 2 for 82bcd0e5-5d28-4162-9f46-84d008e1d73d:
Traceback (most recent call last):
File "/omd/sites/stable/lib/python3/cmk/cee/mknotifyd/notification_queue.py", line 129, in _handle_result
content = evaluate_file(path.joinpath(filename))
File "/omd/sites/stable/lib/python3/cmk/cee/mknotifyd/utils.py", line 50, in evaluate_file
return ast.literal_eval(f.read())
File "/omd/sites/stable/lib/python3.9/ast.py", line 62, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
File "/omd/sites/stable/lib/python3.9/ast.py", line 50, in parse
return compile(source, filename, mode, flags,
File "<unknown>", line 0
SyntaxError: unexpected EOF while parsing
C-:
The <tt>var/log/notify.log</tt> could also show errors in this situation, with messages like this:
C+:
2022-07-18 20:40:55,960 [40] [cmk.base.notify] ERROR:
Traceback (most recent call last):
File "/omd/sites/stable/lib/python3/cmk/base/notify.py", line 1765, in handle_spoolfile
raw_context = data["context"]
KeyError: 'context'
C-:
Change-Id: I8239d1c1e449b8250a9d3eba31ac3cea756e071c
Commit: 6fc816399532cb53132edf8d5066a579d5454c21
https://github.com/tribe29/checkmk/commit/6fc816399532cb53132edf8d5066a579d…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
A .werks/14285
Log Message:
-----------
14285 FIX Fix frozen Microcore (Livestatus not responding) during config reloads
The reload of the Microcore core and it's helper processed could freeze when
the core had notifications pending during reload. This was caused by a deadlock
between the Notification helper and the Microcore. The Microcore was still
alive but waiting to the notification helper to terminate while the
notification helper waited for the Microcore.
>From the user perspective this resulted in Livestatus not being responsive
while the cmc.log showed a message like: <tt>still X unsent events, sending
them now</tt>.
Change-Id: I8ac1a2a179e44f761c21a7a7a3e0ebb3ab4cc976
Commit: a7872277462892f9e9680bffcb7186b0afbbe968
https://github.com/tribe29/checkmk/commit/a7872277462892f9e9680bffcb7186b0a…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
M cmk/base/notify.py
Log Message:
-----------
Apply connect timeout to local livestatus connections
In case the core is not responsive for some reason, then it is better
to continue without sending the command and logging it instead of
blocking endlessly.
Change-Id: Ie6f6667053b6bd2423dee40f829656725aeb0bdb
Commit: 6d8f86f0015c41ebc60959a10f6d1b3b19afdf2a
https://github.com/tribe29/checkmk/commit/6d8f86f0015c41ebc60959a10f6d1b3b1…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
M cmk/base/notify.py
M cmk/utils/notify.py
M tests/unit/cmk/base/test_notify.py
Log Message:
-----------
Cleanup livestatus usage from RBN processing
In case a user configured the contact selection option "Members of
contact groups" (contact_groups), a Livestatus query was made to get the
members of the configured contact groups. This was done every time such
a rule matched a notification.
In specific situations such a lookup could cause dead locks between the
Microcore and the notify helper. Since the notification helpers have the
whole base configuration in memory, we can simply lookup the group
memberships without the Livestatus lookup.
Change-Id: Ia78b26153ea53ea39e3e7e4be5922e93eab268d8
Commit: 1474accd2380a506cbe2498d30a466eb3a14c735
https://github.com/tribe29/checkmk/commit/1474accd2380a506cbe2498d30a466eb3…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
A .werks/14286
M cmk/notification_plugins/mail.py
Log Message:
-----------
14286 FIX mail: Add timeout to graph processing of HTML mail notifications
In case fetching the graphs takes more than 10 seconds, the notification plugin
aborts waiting for the graphs and continues to send the notification without
graphs.
Change-Id: I207d83f440fc2b0c34fbb8175db254baf2ef3226
Commit: b7d19451a8d5c1284fdb6eb0a281a8f83e66fdc0
https://github.com/tribe29/checkmk/commit/b7d19451a8d5c1284fdb6eb0a281a8f83…
Author: Mathias Laurin <mathias.laurin(a)tribe29.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
M doc/documentation/arch-comp-liveproxyd-classes.puml
Log Message:
-----------
Add missing elem to liveproxy class diagram
Change-Id: I7ecf4648cc37043d7ed855118a7880fd497a26bd
Commit: 3b5fe28807449e286d96c99f0803a0a4d24f32e1
https://github.com/tribe29/checkmk/commit/3b5fe28807449e286d96c99f0803a0a4d…
Author: Lisa Pichler <lisa.pichler(a)tribe29.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
A .werks/14499
Log Message:
-----------
14499 FIX activate changes: performance issues when synchronising users and user settings
managed services snapshot: use os.link instead of copytree
SUP-10229
Change-Id: I99ba424a90639d96936796724c8f1422c9bd2739
Compare: https://github.com/tribe29/checkmk/compare/ef62c40b55fb...3b5fe2880744
Branch: refs/heads/2.1.0
Home: https://github.com/tribe29/checkmk
Commit: 6415864b97fa2add998f6980b5094610255be0aa
https://github.com/tribe29/checkmk/commit/6415864b97fa2add998f6980b50946102…
Author: Checkmk release system <feedback(a)checkmk.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
M agents/check_mk_agent.aix
M agents/check_mk_agent.freebsd
M agents/check_mk_agent.hpux
M agents/check_mk_agent.linux
M agents/check_mk_agent.macosx
M agents/check_mk_agent.netbsd
M agents/check_mk_agent.openbsd
M agents/check_mk_agent.openvms
M agents/check_mk_agent.openwrt
M agents/check_mk_agent.solaris
M agents/cmk-agent-ctl/src/constants.rs
M agents/plugins/apache_status.py
M agents/plugins/asmcmd.sh
M agents/plugins/db2_mem
M agents/plugins/dnsclient
M agents/plugins/hpux_lunstats
M agents/plugins/hpux_statgrab
M agents/plugins/ibm_mq
M agents/plugins/isc_dhcpd.py
M agents/plugins/jar_signature
M agents/plugins/kaspersky_av
M agents/plugins/lnx_quota
M agents/plugins/lvm
M agents/plugins/mailman_lists
M agents/plugins/mk_apt
M agents/plugins/mk_ceph
M agents/plugins/mk_cups_queues
M agents/plugins/mk_db2.aix
M agents/plugins/mk_db2.linux
M agents/plugins/mk_docker.py
M agents/plugins/mk_errpt.aix
M agents/plugins/mk_filehandler
M agents/plugins/mk_filestats.py
M agents/plugins/mk_haproxy.freebsd
M agents/plugins/mk_informix
M agents/plugins/mk_inotify.py
M agents/plugins/mk_inventory.aix
M agents/plugins/mk_inventory.linux
M agents/plugins/mk_inventory.solaris
M agents/plugins/mk_iptables
M agents/plugins/mk_jolokia.py
M agents/plugins/mk_logins
M agents/plugins/mk_logwatch.py
M agents/plugins/mk_mongodb.py
M agents/plugins/mk_mysql
M agents/plugins/mk_nfsiostat
M agents/plugins/mk_omreport
M agents/plugins/mk_oracle
M agents/plugins/mk_oracle_crs
M agents/plugins/mk_postgres.py
M agents/plugins/mk_redis
M agents/plugins/mk_sap.aix
M agents/plugins/mk_sap.py
M agents/plugins/mk_sap_hana
M agents/plugins/mk_saprouter
M agents/plugins/mk_scaleio
M agents/plugins/mk_site_object_counts
M agents/plugins/mk_sshd_config
M agents/plugins/mk_suseconnect
M agents/plugins/mk_tinkerforge.py
M agents/plugins/mk_tsm
M agents/plugins/mk_zypper
M agents/plugins/mtr.py
M agents/plugins/netstat.aix
M agents/plugins/netstat.linux
M agents/plugins/netstat.solaris
M agents/plugins/nfsexports
M agents/plugins/nfsexports.solaris
M agents/plugins/nginx_status.py
M agents/plugins/plesk_backups.py
M agents/plugins/plesk_domains.py
M agents/plugins/runas
M agents/plugins/smart
M agents/plugins/symantec_av
M agents/plugins/unitrends_backup
M agents/plugins/unitrends_replication.py
M agents/plugins/vxvm
M agents/plugins/websphere_mq
M agents/plugins/zorp
M agents/windows/plugins/ad_replication.bat
M agents/windows/plugins/arcserve_backup.ps1
M agents/windows/plugins/citrix_farm.ps1
M agents/windows/plugins/citrix_licenses.vbs
M agents/windows/plugins/citrix_xenapp.ps1
M agents/windows/plugins/hyperv_vms.ps1
M agents/windows/plugins/hyperv_vms_guestinfos.ps1
M agents/windows/plugins/iis_app_pool_state.ps1
M agents/windows/plugins/kaspersky_av_client.vbs
M agents/windows/plugins/mcafee_av_client.bat
M agents/windows/plugins/megaraid.bat
M agents/windows/plugins/mk_dhcp_enabled.bat
M agents/windows/plugins/mk_inventory.vbs
M agents/windows/plugins/mk_msoffice.ps1
M agents/windows/plugins/mk_mysql.vbs
M agents/windows/plugins/mk_oracle.ps1
M agents/windows/plugins/msexch_dag.ps1
M agents/windows/plugins/msexch_database.ps1
M agents/windows/plugins/mssql.vbs
M agents/windows/plugins/netstat_an.bat
M agents/windows/plugins/rds_licenses.vbs
M agents/windows/plugins/rstcli.bat
M agents/windows/plugins/sansymphony.ps1
M agents/windows/plugins/storcli.bat
M agents/windows/plugins/tsm_checks.bat
M agents/windows/plugins/veeam_backup_status.ps1
M agents/windows/plugins/win_dhcp_pools.bat
M agents/windows/plugins/win_dmidecode.bat
M agents/windows/plugins/win_license.bat
M agents/windows/plugins/win_printers.ps1
M agents/windows/plugins/windows_broadcom_bonding.bat
M agents/windows/plugins/windows_if.ps1
M agents/windows/plugins/windows_intel_bonding.bat
M agents/windows/plugins/windows_multipath.vbs
M agents/windows/plugins/windows_os_bonding.ps1
M agents/windows/plugins/windows_tasks.ps1
M agents/windows/plugins/windows_updates.vbs
M agents/windows/plugins/wmic_if.bat
M agents/wnx/src/common/wnx_version.h
M bin/livedump
M bin/mkbackup
M bin/mkbench
M cmk/utils/version.py
M configure.ac
M defines.make
M docker/Dockerfile
Log Message:
-----------
Set version to 2.1.0p9
Branch: refs/heads/master
Home: https://github.com/tribe29/checkmk
Commit: ef62c40b55fb324259a9d55c402330f4a94ec702
https://github.com/tribe29/checkmk/commit/ef62c40b55fb324259a9d55c402330f4a…
Author: LukaRacic <luka.racic(a)tribe29.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
R checkman/fjdarye500_pfm
A checkman/fjdarye_pcie_flash_modules
R checks/fjdarye500_pfm
A cmk/base/plugins/agent_based/fjdarye_pcie_flash_modules.py
M cmk/update_config.py
R tests/unit/checks/test_fjdarye500_pfm.py
M tests/unit/checks/test_generic_legacy_conversion.py
A tests/unit/cmk/base/plugins/agent_based/test_fjdarye_pcie_flash_modules.py
Log Message:
-----------
fjdarye500_pfm: Migrated check to new API
Change-Id: Ic2e9279b10fdb4bc3c5697cc1baea49a37712ba4
Branch: refs/heads/2.0.0
Home: https://github.com/tribe29/checkmk
Commit: a7b45642d07b4bb9183bd30b3bd03f1a15968d1d
https://github.com/tribe29/checkmk/commit/a7b45642d07b4bb9183bd30b3bd03f1a1…
Author: Checkmk release system <feedback(a)checkmk.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
M agents/check_mk_agent.aix
M agents/check_mk_agent.freebsd
M agents/check_mk_agent.hpux
M agents/check_mk_agent.linux
M agents/check_mk_agent.macosx
M agents/check_mk_agent.netbsd
M agents/check_mk_agent.openbsd
M agents/check_mk_agent.openvms
M agents/check_mk_agent.openwrt
M agents/check_mk_agent.solaris
M agents/plugins/apache_status.py
M agents/plugins/asmcmd.sh
M agents/plugins/db2_mem
M agents/plugins/dnsclient
M agents/plugins/hpux_lunstats
M agents/plugins/hpux_statgrab
M agents/plugins/ibm_mq
M agents/plugins/isc_dhcpd.py
M agents/plugins/jar_signature
M agents/plugins/kaspersky_av
M agents/plugins/lnx_quota
M agents/plugins/lvm
M agents/plugins/mailman_lists
M agents/plugins/mk_apt
M agents/plugins/mk_ceph
M agents/plugins/mk_cups_queues
M agents/plugins/mk_db2.aix
M agents/plugins/mk_db2.linux
M agents/plugins/mk_docker.py
M agents/plugins/mk_errpt.aix
M agents/plugins/mk_filehandler
M agents/plugins/mk_filestats.py
M agents/plugins/mk_haproxy.freebsd
M agents/plugins/mk_informix
M agents/plugins/mk_inotify.py
M agents/plugins/mk_inventory.aix
M agents/plugins/mk_inventory.linux
M agents/plugins/mk_inventory.solaris
M agents/plugins/mk_iptables
M agents/plugins/mk_jolokia.py
M agents/plugins/mk_logins
M agents/plugins/mk_logwatch.py
M agents/plugins/mk_mongodb.py
M agents/plugins/mk_mysql
M agents/plugins/mk_nfsiostat
M agents/plugins/mk_omreport
M agents/plugins/mk_oracle
M agents/plugins/mk_oracle_crs
M agents/plugins/mk_postgres.py
M agents/plugins/mk_redis
M agents/plugins/mk_sap.aix
M agents/plugins/mk_sap.py
M agents/plugins/mk_sap_hana
M agents/plugins/mk_saprouter
M agents/plugins/mk_scaleio
M agents/plugins/mk_site_object_counts
M agents/plugins/mk_sshd_config
M agents/plugins/mk_suseconnect
M agents/plugins/mk_tinkerforge.py
M agents/plugins/mk_tsm
M agents/plugins/mk_zypper
M agents/plugins/mtr.py
M agents/plugins/netstat.aix
M agents/plugins/netstat.linux
M agents/plugins/netstat.solaris
M agents/plugins/nfsexports
M agents/plugins/nfsexports.solaris
M agents/plugins/nginx_status.py
M agents/plugins/plesk_backups.py
M agents/plugins/plesk_domains.py
M agents/plugins/runas
M agents/plugins/smart
M agents/plugins/symantec_av
M agents/plugins/unitrends_replication.py
M agents/plugins/vxvm
M agents/plugins/websphere_mq
M agents/windows/plugins/ad_replication.bat
M agents/windows/plugins/arcserve_backup.ps1
M agents/windows/plugins/citrix_farm.ps1
M agents/windows/plugins/citrix_licenses.vbs
M agents/windows/plugins/citrix_xenapp.ps1
M agents/windows/plugins/hyperv_vms.ps1
M agents/windows/plugins/hyperv_vms_guestinfos.ps1
M agents/windows/plugins/iis_app_pool_state.ps1
M agents/windows/plugins/kaspersky_av_client.vbs
M agents/windows/plugins/mcafee_av_client.bat
M agents/windows/plugins/megaraid.bat
M agents/windows/plugins/mk_dhcp_enabled.bat
M agents/windows/plugins/mk_inventory.vbs
M agents/windows/plugins/mk_msoffice.ps1
M agents/windows/plugins/mk_mysql.vbs
M agents/windows/plugins/mk_oracle.ps1
M agents/windows/plugins/msexch_dag.ps1
M agents/windows/plugins/msexch_database.ps1
M agents/windows/plugins/mssql.vbs
M agents/windows/plugins/netstat_an.bat
M agents/windows/plugins/rds_licenses.vbs
M agents/windows/plugins/rstcli.bat
M agents/windows/plugins/sansymphony.ps1
M agents/windows/plugins/storcli.bat
M agents/windows/plugins/tsm_checks.bat
M agents/windows/plugins/veeam_backup_status.ps1
M agents/windows/plugins/win_dhcp_pools.bat
M agents/windows/plugins/win_dmidecode.bat
M agents/windows/plugins/win_license.bat
M agents/windows/plugins/win_printers.ps1
M agents/windows/plugins/windows_broadcom_bonding.bat
M agents/windows/plugins/windows_if.ps1
M agents/windows/plugins/windows_intel_bonding.bat
M agents/windows/plugins/windows_multipath.vbs
M agents/windows/plugins/windows_os_bonding.ps1
M agents/windows/plugins/windows_tasks.ps1
M agents/windows/plugins/windows_updates.vbs
M agents/windows/plugins/wmic_if.bat
M agents/wnx/src/common/wnx_version.h
M bin/livedump
M bin/mkbackup
M bin/mkbench
M cmk/utils/version.py
M configure.ac
M defines.make
M docker/Dockerfile
Log Message:
-----------
Set version to 2.0.0p28
Branch: refs/heads/2.1.0
Home: https://github.com/tribe29/checkmk
Commit: 2a2a6000ecd35a2bf97e464616df106da84aa693
https://github.com/tribe29/checkmk/commit/2a2a6000ecd35a2bf97e464616df106da…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
M cmk/base/notify.py
M tests/unit/cmk/base/test_notify.py
Log Message:
-----------
Cleanup livestatus usage from RBN processing
In case a user configured the contact selection option "Members of
contact groups" (contact_groups), a Livestatus query was made to get the
members of the configured contact groups. This was done every time such
a rule matched a notification.
In specific situations such a lookup could cause dead locks between the
Microcore and the notify helper. Since the notification helpers have the
whole base configuration in memory, we can simply lookup the group
memberships without the Livestatus lookup.
Change-Id: Ia78b26153ea53ea39e3e7e4be5922e93eab268d8
Commit: 1842cef032abb988b6b32c424efe99ff28fcab72
https://github.com/tribe29/checkmk/commit/1842cef032abb988b6b32c424efe99ff2…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
A .werks/14285
Log Message:
-----------
14285 FIX Fix frozen Microcore (Livestatus not responding) during config reloads
The reload of the Microcore core and it's helper processed could freeze when
the core had notifications pending during reload. This was caused by a deadlock
between the Notification helper and the Microcore. The Microcore was still
alive but waiting to the notification helper to terminate while the
notification helper waited for the Microcore.
>From the user perspective this resulted in Livestatus not being responsive
while the cmc.log showed a message like: <tt>still X unsent events, sending
them now</tt>.
Change-Id: I8ac1a2a179e44f761c21a7a7a3e0ebb3ab4cc976
Commit: a4b509ece12f374b79239a4276af4ec30e1be6a7
https://github.com/tribe29/checkmk/commit/a4b509ece12f374b79239a4276af4ec30…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
M cmk/base/notify.py
Log Message:
-----------
Apply connect timeout to local livestatus connections
In case the core is not responsive for some reason, then it is better
to continue without sending the command and logging it instead of
blocking endlessly.
Change-Id: Ie6f6667053b6bd2423dee40f829656725aeb0bdb
Commit: 8ccae23d9a02e629c86004ab0a3b9762ed512c24
https://github.com/tribe29/checkmk/commit/8ccae23d9a02e629c86004ab0a3b9762e…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
A .werks/14286
M cmk/notification_plugins/mail.py
Log Message:
-----------
14286 FIX mail: Add timeout to graph processing of HTML mail notifications
In case fetching the graphs takes more than 10 seconds, the notification plugin
aborts waiting for the graphs and continues to send the notification without
graphs.
Change-Id: I207d83f440fc2b0c34fbb8175db254baf2ef3226
Commit: 9a68d80fd1746839851166236ac1f4990568e329
https://github.com/tribe29/checkmk/commit/9a68d80fd1746839851166236ac1f4990…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
M tests/integration/cmk/base/test_automations.py
Log Message:
-----------
Fix integration test after 1e0b49acabef83f2ce66be34ef773ec8c2e85b31
Change-Id: Ie217e8a3c964c7d2b1982402fb7bc781b97ee504
Compare: https://github.com/tribe29/checkmk/compare/6ea5cc167033...9a68d80fd174
Branch: refs/heads/2.1.0
Home: https://github.com/tribe29/checkmk
Commit: 568695fd89aafe931633143854123b1e7cf33dfb
https://github.com/tribe29/checkmk/commit/568695fd89aafe931633143854123b1e7…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
M cmk/base/notify.py
Log Message:
-----------
Notify helper: Improve handling of corrupt spool files
* Improve logging of unhandled exception
* Fix traceback in notify.log in case of corrupt files
* Do not read files that are currently being written
(empty file created for locking during create_spoolfile())
Change-Id: I3927c929bd87fb6e32c996c43ac1362b1709e862
Commit: 6ea5cc1670338289340c601ecf8968f1185df153
https://github.com/tribe29/checkmk/commit/6ea5cc1670338289340c601ecf8968f11…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
A .werks/14284
M cmk/base/notify.py
M cmk/utils/notify.py
Log Message:
-----------
14284 FIX Notification spooler: Fix producing corrupted spool files
The Notification Spooler could create corrupted spool files which resulted in
error messages like this in the <tt>var/log/mknotifyd.log</tt> log:
C+:
2022-07-18 21:49:14,276 [40] [cmk.mknotifyd] Corrupted spoolfile /omd/sites/stable/var/check_mk/notify/spool/ccaae1d5-8b33-403c-bbd8-e1b8796035ca:
Traceback (most recent call last):
File "/omd/sites/stable/lib/python3/cmk/cee/mknotifyd/spool_handler.py", line 70, in _process_spool_directory
content: Message = evaluate_file(spoolfile_path)
File "/omd/sites/stable/lib/python3/cmk/cee/mknotifyd/utils.py", line 50, in evaluate_file
return ast.literal_eval(f.read())
File "/omd/sites/stable/lib/python3.9/ast.py", line 62, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
File "/omd/sites/stable/lib/python3.9/ast.py", line 50, in parse
return compile(source, filename, mode, flags,
File "<unknown>", line 0
SyntaxError: unexpected EOF while parsing
2022-07-18 21:49:14,728 [20] [cmk.mknotifyd] got exit code 2
2022-07-18 21:49:14,728 [40] [cmk.mknotifyd] exception handling notification result 2 for 82bcd0e5-5d28-4162-9f46-84d008e1d73d:
Traceback (most recent call last):
File "/omd/sites/stable/lib/python3/cmk/cee/mknotifyd/notification_queue.py", line 129, in _handle_result
content = evaluate_file(path.joinpath(filename))
File "/omd/sites/stable/lib/python3/cmk/cee/mknotifyd/utils.py", line 50, in evaluate_file
return ast.literal_eval(f.read())
File "/omd/sites/stable/lib/python3.9/ast.py", line 62, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
File "/omd/sites/stable/lib/python3.9/ast.py", line 50, in parse
return compile(source, filename, mode, flags,
File "<unknown>", line 0
SyntaxError: unexpected EOF while parsing
C-:
The <tt>var/log/notify.log</tt> could also show errors in this situation, with messages like this:
C+:
2022-07-18 20:40:55,960 [40] [cmk.base.notify] ERROR:
Traceback (most recent call last):
File "/omd/sites/stable/lib/python3/cmk/base/notify.py", line 1765, in handle_spoolfile
raw_context = data["context"]
KeyError: 'context'
C-:
Change-Id: I8239d1c1e449b8250a9d3eba31ac3cea756e071c
Compare: https://github.com/tribe29/checkmk/compare/7f30b856f184...6ea5cc167033