Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Monitoring
Checkmk
Commits
9f1ff24e
Commit
9f1ff24e
authored
May 24, 2022
by
root
Browse files
Merge branch 'master' of
https://github.com/tribe29/checkmk
parents
372aa370
5a50beb6
Changes
2
Hide whitespace changes
Inline
Side-by-side
.werks/14118
0 → 100644
View file @
9f1ff24e
Title: Notification spooler: Fix execution of notifications on sites only forwarding
Class: fix
Compatible: compat
Component: notifications
Date: 1652947508
Edition: cee
Knowledge: doc
Level: 1
State: unknown
Version: 2.2.0i1
On sites which had the option "Forward to remote site by notification spooler"
configured, the answer of the target site also lead to execution of of the
notification at this site, leading to duplicated notifications.
Furthermore, the result of the execution was not logged to history.
cmk/utils/notify.py
View file @
9f1ff24e
...
...
@@ -7,7 +7,7 @@
import
os
import
subprocess
from
logging
import
Logger
from
typing
import
List
,
NewType
,
Optional
from
typing
import
List
,
NewType
,
Optional
,
TypedDict
import
cmk.utils.defines
from
cmk.utils.exceptions
import
MKGeneralException
...
...
@@ -25,6 +25,14 @@ NotificationPluginName = NewType("NotificationPluginName", str)
NotificationContext
=
NewType
(
"NotificationContext"
,
dict
[
str
,
str
])
class
NotificationResult
(
TypedDict
,
total
=
False
):
plugin
:
NotificationPluginName
status
:
NotificationResultCode
output
:
List
[
str
]
forward
:
bool
context
:
NotificationContext
def
_state_for
(
exit_code
:
NotificationResultCode
)
->
str
:
return
cmk
.
utils
.
defines
.
service_state_name
(
exit_code
,
"UNKNOWN"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment