This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Rocketchat incoming grafana webhook script | |
// See the following links for some documentation: | |
// * Grafana outgoing format: https://grafana.com/docs/grafana/latest/alerting/manage-notifications/webhook-notifier/ | |
// * Rocketchat incoming message format: https://developer.rocket.chat/reference/api/rest-api/endpoints/core-endpoints/chat-endpoints/postmessage#attachments-detail | |
class Script { | |
process_incoming_request({ request }) { | |
var attachments = []; | |
request.content.alerts.map(function(item) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
format = "$cmd_duration$character [$hostname:](bold purple)$all $directory [ ](bold green)" | |
[line_break] | |
disabled = true | |
[character] | |
error_symbol = "[](bold red)" | |
success_symbol = "[](bold green)" | |
[cmd_duration] |