Class SlackConfig

    • Method Detail

      • getActions

        public List<SlackAction> getActions()
        actions defines a list of Slack actions that are sent with each notification.
      • setActions

        public void setActions​(List<SlackAction> actions)
        actions defines a list of Slack actions that are sent with each notification.
      • getApiURL

        public SecretKeySelector getApiURL()
        SlackConfig configures notifications via Slack. See https://prometheus.io/docs/alerting/latest/configuration/#slack_config
      • setApiURL

        public void setApiURL​(SecretKeySelector apiURL)
        SlackConfig configures notifications via Slack. See https://prometheus.io/docs/alerting/latest/configuration/#slack_config
      • getCallbackId

        public String getCallbackId()
        callbackId defines an identifier for the message used in interactive components.
      • setCallbackId

        public void setCallbackId​(String callbackId)
        callbackId defines an identifier for the message used in interactive components.
      • getChannel

        public String getChannel()
        channel defines the channel or user to send notifications to.
      • setChannel

        public void setChannel​(String channel)
        channel defines the channel or user to send notifications to.
      • getColor

        public String getColor()
        color defines the color of the left border of the Slack message attachment. Can be a hex color code (e.g., "#ff0000") or a predefined color name.
      • setColor

        public void setColor​(String color)
        color defines the color of the left border of the Slack message attachment. Can be a hex color code (e.g., "#ff0000") or a predefined color name.
      • getFallback

        public String getFallback()
        fallback defines a plain-text summary of the attachment for clients that don't support attachments.
      • setFallback

        public void setFallback​(String fallback)
        fallback defines a plain-text summary of the attachment for clients that don't support attachments.
      • getFields

        public List<SlackField> getFields()
        fields defines a list of Slack fields that are sent with each notification.
      • setFields

        public void setFields​(List<SlackField> fields)
        fields defines a list of Slack fields that are sent with each notification.
      • getFooter

        public String getFooter()
        footer defines small text displayed at the bottom of the message attachment.
      • setFooter

        public void setFooter​(String footer)
        footer defines small text displayed at the bottom of the message attachment.
      • getHttpConfig

        public HTTPConfig getHttpConfig()
        SlackConfig configures notifications via Slack. See https://prometheus.io/docs/alerting/latest/configuration/#slack_config
      • setHttpConfig

        public void setHttpConfig​(HTTPConfig httpConfig)
        SlackConfig configures notifications via Slack. See https://prometheus.io/docs/alerting/latest/configuration/#slack_config
      • getIconEmoji

        public String getIconEmoji()
        iconEmoji defines the emoji to use as the bot's avatar (e.g., ":ghost:").
      • setIconEmoji

        public void setIconEmoji​(String iconEmoji)
        iconEmoji defines the emoji to use as the bot's avatar (e.g., ":ghost:").
      • getIconURL

        public String getIconURL()
        iconURL defines the URL to an image to use as the bot's avatar.
      • setIconURL

        public void setIconURL​(String iconURL)
        iconURL defines the URL to an image to use as the bot's avatar.
      • getImageURL

        public String getImageURL()
        imageURL defines the URL to an image file that will be displayed inside the message attachment.
      • setImageURL

        public void setImageURL​(String imageURL)
        imageURL defines the URL to an image file that will be displayed inside the message attachment.
      • getLinkNames

        public Boolean getLinkNames()
        linkNames enables automatic linking of channel names and usernames in the message. When true, @channel and @username will be converted to clickable links.
      • setLinkNames

        public void setLinkNames​(Boolean linkNames)
        linkNames enables automatic linking of channel names and usernames in the message. When true, @channel and @username will be converted to clickable links.
      • getMessageText

        public String getMessageText()
        messageText defines text content of the Slack message. If set, this is sent as the top-level 'text' field in the Slack payload. It requires Alertmanager >= v0.31.0.
      • setMessageText

        public void setMessageText​(String messageText)
        messageText defines text content of the Slack message. If set, this is sent as the top-level 'text' field in the Slack payload. It requires Alertmanager >= v0.31.0.
      • getMrkdwnIn

        public List<String> getMrkdwnIn()
        mrkdwnIn defines which fields should be parsed as Slack markdown. Valid values include "pretext", "text", and "fields".
      • setMrkdwnIn

        public void setMrkdwnIn​(List<String> mrkdwnIn)
        mrkdwnIn defines which fields should be parsed as Slack markdown. Valid values include "pretext", "text", and "fields".
      • getPretext

        public String getPretext()
        pretext defines optional text that appears above the message attachment block.
      • setPretext

        public void setPretext​(String pretext)
        pretext defines optional text that appears above the message attachment block.
      • getSendResolved

        public Boolean getSendResolved()
        sendResolved defines whether or not to notify about resolved alerts.
      • setSendResolved

        public void setSendResolved​(Boolean sendResolved)
        sendResolved defines whether or not to notify about resolved alerts.
      • getShortFields

        public Boolean getShortFields()
        shortFields determines whether fields are displayed in a compact format. When true, fields are shown side by side when possible.
      • setShortFields

        public void setShortFields​(Boolean shortFields)
        shortFields determines whether fields are displayed in a compact format. When true, fields are shown side by side when possible.
      • getText

        public String getText()
        text defines the main text content of the Slack message attachment.
      • setText

        public void setText​(String text)
        text defines the main text content of the Slack message attachment.
      • getThumbURL

        public String getThumbURL()
        thumbURL defines the URL to an image file that will be displayed as a thumbnail on the right side of the message attachment.
      • setThumbURL

        public void setThumbURL​(String thumbURL)
        thumbURL defines the URL to an image file that will be displayed as a thumbnail on the right side of the message attachment.
      • getTimeout

        public String getTimeout()
        timeout defines the maximum time to wait for a webhook request to complete, before failing the request and allowing it to be retried. It requires Alertmanager >= v0.30.0.
      • setTimeout

        public void setTimeout​(String timeout)
        timeout defines the maximum time to wait for a webhook request to complete, before failing the request and allowing it to be retried. It requires Alertmanager >= v0.30.0.
      • getTitle

        public String getTitle()
        title defines the title text displayed in the Slack message attachment.
      • setTitle

        public void setTitle​(String title)
        title defines the title text displayed in the Slack message attachment.
      • getTitleLink

        public String getTitleLink()
        titleLink defines the URL that the title will link to when clicked.
      • setTitleLink

        public void setTitleLink​(String titleLink)
        titleLink defines the URL that the title will link to when clicked.
      • getUsername

        public String getUsername()
        username defines the slack bot user name.
      • setUsername

        public void setUsername​(String username)
        username defines the slack bot user name.
      • getAdditionalProperties

        public Map<String,​Object> getAdditionalProperties()
      • setAdditionalProperty

        public void setAdditionalProperty​(String name,
                                          Object value)
      • setAdditionalProperties

        public void setAdditionalProperties​(Map<String,​Object> additionalProperties)