Skip to content

[Alerts] Can not get the "resolved" messages working with RocketChat #7385

Answered by Ruppsn
Ruppsn asked this question in Q&A

You must be logged in to vote

If someone is interessted in integrating RocketChat. It is working but you need a script to resolve the payload
Here is what i used for debugging. Thanks @puzzle

/*
 * This script is an edited form of https://github.com/puzzle/prometheus-rocket-chat/blob/master/webhook.js
 */
class Script {
  process_incoming_request({ request }) {

    // For debugging uncomment 
    //console.log(request.content);

    // Return a rocket.chat message object.
    // If channel is undefined, the default channel from the webhook configuration is used
    return {
      content: {
        //username: "hubert",
        attachments: this.getAlerts(request.content),
        channel: request.content.alerts[0].l…

Replies: 1 comment 13 replies

You must be logged in to vote
13 replies
@grandwizard28

@Ruppsn

@Ruppsn

@Ruppsn

Answer selected by Ruppsn
@Ruppsn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants