We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello everybody,
My environment:
I have Integration the Script in Rocket Chat and configured Graylog to send Webhook.
When I send a test message from Graylog I get the following error message.
I20210131-11:22:08.866(1) server.js:204 Integrations ➔ Incoming WebHook.error [Error running Script in Trigger rocketchat-graylog-hook :] I20210131-11:22:08.867(1) server.js:204 Integrations ➔ Incoming WebHook.error var GRAYLOG_URL="https://graylog.xxxx.xx";var createPermalink=function(m,index){var label=index===0?"Display complete message":"#"+(index+1);return""+label+""};var formatMessages=function(messages){var grouped=messages.reduce(function(acc,m){if(!acc.hasOwnProperty(m.message)){acc[m.message]=[]}acc[m.message].push(m);return acc},{});var result=[];for(var mType in grouped){if(grouped.hasOwnProperty(mType)){var line="Message: "+mType+"Source: "+grouped[mType][0].source+""+grouped[mType].map(createPermalink).join(", ");result.push(line)}}return result.join("-------------")};var parseText=function(result){if(result.matching_messages.length>0){return formatMessages(result.matching_messages)}else{return result.result_description}};var createAlertMessageEvent=function(result){return":warning: Alert: "+result.triggered_condition.title+""+parseText(result)};var makeAttachment=function(text){return{text:text,color:"#e8d612"}};var Script=function(){function Script(){}var _proto=Script.prototype;_proto.process_incoming_request=function process_incoming_request(_ref){var request=_ref.request;return{content:{attachments:[makeAttachment(createAlertMessageEvent(request.content.check_result))]}}};return Script}();
I20210131-11:22:08.869(1) server.js:204 Integrations ➔ Incoming WebHook.error [Stack:] I20210131-11:22:08.870(1) server.js:204 Integrations ➔ Incoming WebHook.error Error: TypeError: Cannot read property 'triggered_condition' of undefined at evalmachine.:11:33 at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
Does someone have an idea what the problem is?
Greetings
Mike
The text was updated successfully, but these errors were encountered:
I think the problem is the Payload in Graylog 4 is different to Graylog 3.
https://docs.graylog.org/en/4.0/pages/alerts.html
https://docs.graylog.org/en/3.0/pages/streams/alerts.html?highlight=alerts#http-alert-notification
Can someone help me with this problem?
Sorry, something went wrong.
No branches or pull requests
Hello everybody,
My environment:
I have Integration the Script in Rocket Chat and configured Graylog to send Webhook.
When I send a test message from Graylog I get the following error message.
I20210131-11:22:08.866(1) server.js:204 Integrations ➔ Incoming WebHook.error [Error running Script in Trigger rocketchat-graylog-hook :]
I20210131-11:22:08.867(1) server.js:204 Integrations ➔ Incoming WebHook.error var GRAYLOG_URL="https://graylog.xxxx.xx";var createPermalink=function(m,index){var label=index===0?"Display complete message":"#"+(index+1);return""+label+""};var formatMessages=function(messages){var grouped=messages.reduce(function(acc,m){if(!acc.hasOwnProperty(m.message)){acc[m.message]=[]}acc[m.message].push(m);return acc},{});var result=[];for(var mType in grouped){if(grouped.hasOwnProperty(mType)){var line="Message: "+mType+"
Source: "+grouped[mType][0].source+"
"+grouped[mType].map(createPermalink).join(", ");result.push(line)}}return result.join("
-------------
")};var parseText=function(result){if(result.matching_messages.length>0){return formatMessages(result.matching_messages)}else{return result.result_description}};var createAlertMessageEvent=function(result){return":warning: Alert: "+result.triggered_condition.title+"
"+parseText(result)};var makeAttachment=function(text){return{text:text,color:"#e8d612"}};var Script=function(){function Script(){}var _proto=Script.prototype;_proto.process_incoming_request=function process_incoming_request(_ref){var request=_ref.request;return{content:{attachments:[makeAttachment(createAlertMessageEvent(request.content.check_result))]}}};return Script}();
I20210131-11:22:08.869(1) server.js:204 Integrations ➔ Incoming WebHook.error [Stack:]
I20210131-11:22:08.870(1) server.js:204 Integrations ➔ Incoming WebHook.error Error: TypeError: Cannot read property 'triggered_condition' of undefined at evalmachine.:11:33 at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
Does someone have an idea what the problem is?
Greetings
Mike
The text was updated successfully, but these errors were encountered: