Class TelegramConfig

    • Method Detail

      • getApiURL

        public String getApiURL()
        apiURL defines the Telegram API URL, e.g. https://api.telegram.org. If not specified, the default Telegram API URL will be used.
      • setApiURL

        public void setApiURL​(String apiURL)
        apiURL defines the Telegram API URL, e.g. https://api.telegram.org. If not specified, the default Telegram API URL will be used.
      • getBotToken

        public SecretKeySelector getBotToken()
        TelegramConfig configures notifications via Telegram. See https://prometheus.io/docs/alerting/latest/configuration/#telegram_config
      • setBotToken

        public void setBotToken​(SecretKeySelector botToken)
        TelegramConfig configures notifications via Telegram. See https://prometheus.io/docs/alerting/latest/configuration/#telegram_config
      • getBotTokenFile

        public String getBotTokenFile()
        botTokenFile defines the file to read the Telegram bot token from. It is mutually exclusive with `botToken`. Either `botToken` or `botTokenFile` is required. It requires Alertmanager >= v0.26.0.
      • setBotTokenFile

        public void setBotTokenFile​(String botTokenFile)
        botTokenFile defines the file to read the Telegram bot token from. It is mutually exclusive with `botToken`. Either `botToken` or `botTokenFile` is required. It requires Alertmanager >= v0.26.0.
      • getChatID

        public Long getChatID()
        chatID defines the Telegram chat ID where messages will be sent. This can be a user ID, group ID, or channel ID (with @ prefix for public channels).
      • setChatID

        public void setChatID​(Long chatID)
        chatID defines the Telegram chat ID where messages will be sent. This can be a user ID, group ID, or channel ID (with @ prefix for public channels).
      • getDisableNotifications

        public Boolean getDisableNotifications()
        disableNotifications controls whether Telegram notifications are sent silently. When true, users will receive the message without notification sounds.
      • setDisableNotifications

        public void setDisableNotifications​(Boolean disableNotifications)
        disableNotifications controls whether Telegram notifications are sent silently. When true, users will receive the message without notification sounds.
      • getHttpConfig

        public HTTPConfig getHttpConfig()
        TelegramConfig configures notifications via Telegram. See https://prometheus.io/docs/alerting/latest/configuration/#telegram_config
      • setHttpConfig

        public void setHttpConfig​(HTTPConfig httpConfig)
        TelegramConfig configures notifications via Telegram. See https://prometheus.io/docs/alerting/latest/configuration/#telegram_config
      • getMessage

        public String getMessage()
        message defines the message template for the Telegram notification. This is the content that will be sent to the specified chat.
      • setMessage

        public void setMessage​(String message)
        message defines the message template for the Telegram notification. This is the content that will be sent to the specified chat.
      • getMessageThreadID

        public Long getMessageThreadID()
        messageThreadID defines the Telegram Group Topic ID for threaded messages. This allows sending messages to specific topics within Telegram groups. It requires Alertmanager >= 0.26.0.
      • setMessageThreadID

        public void setMessageThreadID​(Long messageThreadID)
        messageThreadID defines the Telegram Group Topic ID for threaded messages. This allows sending messages to specific topics within Telegram groups. It requires Alertmanager >= 0.26.0.
      • getParseMode

        public String getParseMode()
        parseMode defines the parse mode for telegram message formatting. Valid values are "MarkdownV2", "Markdown", and "HTML". This determines how text formatting is interpreted in the message.
      • setParseMode

        public void setParseMode​(String parseMode)
        parseMode defines the parse mode for telegram message formatting. Valid values are "MarkdownV2", "Markdown", and "HTML". This determines how text formatting is interpreted in the message.
      • 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.
      • getAdditionalProperties

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

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

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