telegram: Send messages to Telegram
The telegram() destination sends log messages to Telegram, which is a secure, cloud-based mobile and desktop messaging app.
Note that this destination automatically uses the certificate store of the system (for details, see the curl documentation).
Prerequisites
-
Install the
axosyslog-sclpackage on Debian/Ubuntu. On RHEL and compatible distributions, the SCL files are part of theaxosyslogbase package.Your configuration must also contain
@include "scl.conf", which the default configuration file already does. If the SCL files are missing, AxoSyslog fails to start with anunexpected LL_IDENTIFIERerror.Terminal window @include "scl.conf" -
This feature requires a separate module. Install the
axosyslog-mod-httppackage on Debian/Ubuntu, or theaxosyslog-httppackage on RHEL and compatible distributions. If the module isn’t installed, AxoSyslog fails to start with anunexpected LL_IDENTIFIERerror.
Declaration:
@include "scl.conf"
# ...
telegram(parameters);You can use the proxy() option to configure the HTTP driver in all HTTP-based destinations to use a specific HTTP proxy that is independent from the proxy configured for the system.
Example: Using the telegram() driver
The following example creates a telegram() destination.
@include "scl.conf"
# ...
destination d_telegram {
telegram(
template("${MESSAGE}")
throttle(1)
parse-mode("markdown")
disable-web-page-preview("true")
bot-id("<bot id>")
chat-id("<chat id>")
);
};