Plugin Web-Hooks avec Mattermost
-
Bonjour,
j'aimerais faire fonctionner le plugin Web-Hooks avec Mattermost mais quand je met test j'obtiens :Code: -32000 Message: unknown error from the peer
Voici mon fichier log
plugin.test { "id": "web-hooks", "data": { "url": "https://XXXXXXXX" } } { "code": 400, "url": "https://XXXXXXXXX", "message": "Bad Request", "name": "Error", "stack": "Error: Bad Request at onResponse (/opt/xo/xo-builds/xen-orchestra-202204160737/node_modules/http-request-plus/index.js:255:21) at AsyncResource.runInAsyncScope (async_hooks.js:197:9) at cb (/opt/xo/xo-builds/xen-orchestra-202204160737/node_modules/bluebird/js/release/util.js:355:42) at tryCatcher (/opt/xo/xo-builds/xen-orchestra-202204160737/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/opt/xo/xo-builds/xen-orchestra-202204160737/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/opt/xo/xo-builds/xen-orchestra-202204160737/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/opt/xo/xo-builds/xen-orchestra-202204160737/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/opt/xo/xo-builds/xen-orchestra-202204160737/node_modules/bluebird/js/release/promise.js:729:18) at _drainQueueStep (/opt/xo/xo-builds/xen-orchestra-202204160737/node_modules/bluebird/js/release/async.js:93:12) at _drainQueue (/opt/xo/xo-builds/xen-orchestra-202204160737/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/opt/xo/xo-builds/xen-orchestra-202204160737/node_modules/bluebird/js/release/async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (/opt/xo/xo-builds/xen-orchestra-202204160737/node_modules/bluebird/js/release/async.js:15:14) at processImmediate (internal/timers.js:464:21) at process.callbackTrampoline (internal/async_hooks.js:130:17)" }
Merci de votre aide
-
Hi,
This forum is in English, so everyone can read/understand or participate. If we got enough traction or demand, we'll create a dedicated language section, but the past experiences showed it only helped to fragment the community.
Also, I edited your post to use Markdown syntax for logs. Please do so for the next one
To answer you, I would say to double check your URL configured in your plugin.
edit: you also need to provide more context than this. Are you using XOA or XO from the sources? Are you up-to-date? What is your plugin configuration?
edit2: Are you sure you aren't mixing Backup report with Slack/Mattermost and web-hooks? They are different.
-
Here is a plugin configuration to get backup reports with Mattermost:
For web-hooks, you need to get something able to parse the message on the destination, which is different than a "transport" plugin for Backup reports and such.
-
Hello;
I don't necessarily speak English well.
I tested the slack transport option for the Backups and these work really well.
Only what I would like is that when VMs are created, migrated, stopped and started I can be informed through Mattermost. And having seen the options that web-hook offers (and which would be fine for me to do what I have to do) I was super excited by the plugin.
If you can help me set it up that would be great.
Thank you for your time. -
You need a custom endpoint that will parse that and send it to Mattermost then
-
How do I do this?
-
You would have to write a daemon, listing for webhooks, parse it, and then send it to Mattermost with the expected payload.