Graylog2 / graylog2-server

Free and open log management
https://www.graylog.org
Other
7.41k stars 1.07k forks source link

Event Definition : can't convert undefined to object #10674

Open Kn-ut99 opened 3 years ago

Kn-ut99 commented 3 years ago

When a Notification is set on an Event Definition, an error "Something went wrong" is displayed when viewing the Event Definition.

Expected Behavior

When clicking on the name of an Event Definition, a page is displaying the current configuration of the Event Definition.

Current Behavior

On the Event Definition that use a specific Notification (Legacy callback, for Mattermost), Graylog throws an error when clicking on the Event Definition title, thus preventing the display of its current configuration and preventing the alert to be correctly published to Mattermost

can't convert undefined to object

Stack Trace:

value@https://graylog.acme.com/assets/1b3f1b67-51.3433c0ea0395e9c3a16a.js:1:2122
Hi@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:293781
Ri@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:293576
Ls@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:329190
Mc@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:320633
mc@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:320556
sc@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:317586
Za/<@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:269227
434/exports.unstable_runWithPriority@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:780503
Ua@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:268936
Za@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:269174
Va@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:269107
nc@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:314371
yi@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:286185
E/</<@https://graylog.acme.com/assets/app.3433c0ea0395e9c3a16a.js:2:2497815
n@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:97012
614/o.prototype.emit@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:1095242
trigger@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:97893
propagateChanges@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:18871
listAllLegacyTypes/<@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:22102
c@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:340649
i/<[22]</n.exports/I.prototype._settlePromiseFromHandler@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:313576
i/<[22]</n.exports/I.prototype._settlePromise@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:314376
i/<[22]</n.exports/I.prototype._settlePromise0@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:315075
i/<[22]</n.exports/I.prototype._settlePromises@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:316427
u@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:267588
s@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:267528
i/<[2]</a.prototype._drainQueues@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:268642
a/this.drainQueues@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:267461
promise callback*o@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:329580
i/<[2]</a.prototype._queueTick@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:268801
i/<[2]</a.prototype.settlePromises@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:268591
i/<[22]</n.exports/I.prototype._fulfill@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:315465
i/<[22]</n.exports/I.prototype._resolveCallback@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:312320
i/<[22]</n.exports/I.prototype._resolveFromExecutor/r<@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:313197
x6EVibRp/i.prototype.promise/</<@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:560579
ohvG42sD/m.prototype.callback@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:522360
m/<@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:520347
7ltowm8y/n.prototype.emit@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:40583
ohvG42sD/m.prototype._end/e.onreadystatechange@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:524053
EventHandlerNonNull*ohvG42sD/m.prototype._end@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:523819
ohvG42sD/m.prototype.end@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:523336
x6EVibRp/i.prototype.promise/<@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:560395
I@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:280424
i/<[22]</n.exports/I.prototype._resolveFromExecutor@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:313171
I@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:306191
x6EVibRp/i.prototype.promise@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:560370
x6EVibRp/i.prototype.then@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:560679
value@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:37235
T/<@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:38293
T@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:38311
listAllLegacyTypes@https://graylog.acme.com/assets/builtins.3433c0ea0395e9c3a16a.js:2:21982
n@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:97012
614/o.prototype.emit@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:1094809
trigger@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:97893
triggerAsync/<@https://graylog.acme.com/assets/vendor.594b2a39cb22b445205e.js:2:97998
WjuRTkSc/t.exports@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:64278
@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:28950
P@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:28807
S@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:28829
EventHandlerNonNull*GuUTRImU@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:29150
r@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:110
iXAc7REx@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:77446
r@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:110
n04a024L@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:87666
r@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:110
0hnX6zjn@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:2529
r@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:110
jI5PCKEY@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:81283
r@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:110
1@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:3073
r@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:110
@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:938
@https://graylog.acme.com/assets/polyfill.3433c0ea0395e9c3a16a.js:1:947

Component Stack:

    in a
    in div
    in t
    in div
    in t
    in Row
    in a
    in div
    in t
    in div
    in t
    in Row
    in span
    in i
    in Unknown
    in Unknown
    in n
    in t
    in t
    in div
    in t
    in div
    in t
    in AppWithoutSearchBar__StyledRow
    in div
    in t
    in div
    in AppContentGrid__Container
    in u
    in f
    in t
    in t
    in div
    in Lt
    in o
    in ft
    in h
    in Rt
    in t
    in t
    in c
    in t
    in Ir
    in Unknown
    in ConnectStoresWrapper[Unknown/Anonymous] stores=streams
    in je
    in T
    in f
    in v
    in b
    in Unknown
    in n
    in F
    in ConnectStoresWrapper[F] stores=currentUser,server,sessionId
    in je
    in T
    in Z

Possible Solution

Remove the Notification from the Event Definition.

Steps to Reproduce (for bugs)

  1. Create a legacy-alarm-callback-notification-v1 (Legacy Alarm Callbacks / Legacy Slack Alarm Callback) notification with default settings
  2. Create an event definition that uses the above notification
  3. Click on the event definition title

Context

I'm trying to publish our alerts in Mattermost and the only notification settings I found to be working (via the Execute test notification button) is the one described above : Legacy Alarm Callbacks / Legacy Slack Alarm Callback. However this does trigger the bug explained here and alert notifications are not published in Mattermost.

Your Environment

kroepke commented 3 years ago

This seems to be a bug with the legacy plugin support, I'll leave this open because probably others will run into the same thing and it should be fixed as long as we support the legacy ones.

In the meantime, we will have direct support for Mattermost soon: https://github.com/Graylog2/graylog-plugin-integrations/pull/839 (if merged in time, it should be part of the next bugfix release and in 4.1 for sure).