Class TelegramConfig
- java.lang.Object
-
- io.fabric8.openshift.api.model.monitoring.v1alpha1.TelegramConfig
-
- All Implemented Interfaces:
Editable<TelegramConfigBuilder>,KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class TelegramConfig extends Object implements Editable<TelegramConfigBuilder>, KubernetesResource
TelegramConfig configures notifications via Telegram. See https://prometheus.io/docs/alerting/latest/configuration/#telegram_config- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TelegramConfig()No args constructor for use in serializationTelegramConfig(String apiURL, SecretKeySelector botToken, String botTokenFile, Long chatID, Boolean disableNotifications, HTTPConfig httpConfig, String message, Long messageThreadID, String parseMode, Boolean sendResolved)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TelegramConfigBuilderedit()Map<String,Object>getAdditionalProperties()StringgetApiURL()apiURL defines the Telegram API URL, e.g. https://api.telegram.org.SecretKeySelectorgetBotToken()TelegramConfig configures notifications via Telegram.StringgetBotTokenFile()botTokenFile defines the file to read the Telegram bot token from.LonggetChatID()chatID defines the Telegram chat ID where messages will be sent.BooleangetDisableNotifications()disableNotifications controls whether Telegram notifications are sent silently.HTTPConfiggetHttpConfig()TelegramConfig configures notifications via Telegram.StringgetMessage()message defines the message template for the Telegram notification.LonggetMessageThreadID()messageThreadID defines the Telegram Group Topic ID for threaded messages.StringgetParseMode()parseMode defines the parse mode for telegram message formatting.BooleangetSendResolved()sendResolved defines whether or not to notify about resolved alerts.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetApiURL(String apiURL)apiURL defines the Telegram API URL, e.g. https://api.telegram.org.voidsetBotToken(SecretKeySelector botToken)TelegramConfig configures notifications via Telegram.voidsetBotTokenFile(String botTokenFile)botTokenFile defines the file to read the Telegram bot token from.voidsetChatID(Long chatID)chatID defines the Telegram chat ID where messages will be sent.voidsetDisableNotifications(Boolean disableNotifications)disableNotifications controls whether Telegram notifications are sent silently.voidsetHttpConfig(HTTPConfig httpConfig)TelegramConfig configures notifications via Telegram.voidsetMessage(String message)message defines the message template for the Telegram notification.voidsetMessageThreadID(Long messageThreadID)messageThreadID defines the Telegram Group Topic ID for threaded messages.voidsetParseMode(String parseMode)parseMode defines the parse mode for telegram message formatting.voidsetSendResolved(Boolean sendResolved)sendResolved defines whether or not to notify about resolved alerts.TelegramConfigBuildertoBuilder()
-
-
-
Constructor Detail
-
TelegramConfig
public TelegramConfig()
No args constructor for use in serialization
-
TelegramConfig
public TelegramConfig(String apiURL, SecretKeySelector botToken, String botTokenFile, Long chatID, Boolean disableNotifications, HTTPConfig httpConfig, String message, Long messageThreadID, String parseMode, Boolean sendResolved)
-
-
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.
-
edit
public TelegramConfigBuilder edit()
- Specified by:
editin interfaceEditable<TelegramConfigBuilder>
-
toBuilder
public TelegramConfigBuilder toBuilder()
-
-