-
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix downtime and recheck functions for CheckMK 2.3 (#1047)
* Add function _get_csrf_token to Multisite.py * Add function _omd_get_version to Multisite.py * Add function _omd_set_recheck to Multisite.py * Add function _omd_set_downtime to Multisite.py * Add function overrides for Checkmk 2.3+ --------- Co-authored-by: Jinho Kim <[email protected]>
- Loading branch information
Showing
1 changed file
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f9e5441
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jkim2492,
After running Nagstamon with your fixes for a while we found some problem running it on macOS: after the machine was in standby and waking up again, the Checkmk server connection was hanging. When trying to reconfigue it in settings dialog, Nagstamon freezes completely. Do you have any idea why this could happen?
Best regards
Henri
f9e5441
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @HenriWahl,
I can't think of anything particular that would affect the connections after waking up. However, here are a few things that are done differently in this PR compared to the existing one.
self.session.post
instead ofself.FetchURL
inside_omd_set_downtime
self.FetchURL
andcgi_data
parameter, so I opted to useself.session.post
instead of modifyingFetchURLs
self.session.get
instead ofself.FetchURL
inside_omd_get_version
zoneinfo
zoneinfo
module is included by default with Python 3.9+, but might cause problems if Python version is lower StackExchange postWas the problem specific to macOS or was it also reproducible on Linux as well? I haven't noticed such problems on Ubuntu 22.04 yet.
f9e5441
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jkim2492 thanks for your reply. Thanks for the hints. I will try to use the fetchURL method.
We only had this on macOS.
f9e5441
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your hint was very useful. I applied fetch_url() instead of session.post() and session.get() and now it works without freezing. 👍