Skip to main content
Version: ⭐ 23.10

Notify with Telegram bot


This documentation is a community contribution from YPSI:


How it works​

Telegram notifications connector uses the perl Centreon plugin to send notification through Telegram using their REST API



centreon plugin with telegram​

First of all, you need the Centreon Telegram plugin to be installed on your Centreon server. First, install Git, then execute the following commands:

mkdir /usr/lib/centreon/git-plugins
cd /usr/lib/centreon/git-plugins
git clone
chown -R centreon-engine. /usr/lib/centreon/git-plugins

Telegram configuration​

First of all, reach and sign in


Then, proceed to talk to the BotFather and tell him the following command



As asked by the BotFather, you need to give your bot a name and a username for your bot. This one must end with _bot. To avoid confusion, you can use the same name for both like shown in the picture below.


Like said by the BotFather, it is very important that you save your token. We are going to need it to send notifications later on.

Now we need to create a new group. To do so, use the telegram menu as follow


When creating your group, add your bot to it



Get your chat-id from telegram​

On the telegram webapp page, click on the group previously created to obtain a chat-id from URL


for example, if the url is as follow: then, your chat-id is 123456.

Note that while 123456 is your chat-id, you'll need to use -123456 in your configuration otherwise it won't work

Command creation in Centreon​

Service notification command​

service command

/usr/lib/centreon/git-plugins/centreon-plugins/src/ \
--plugin=notification::telegram::plugin \
--mode=alert \
--http-peer-addr='' --bot-token='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--chat-id='-xxxxxxxxxx' --host-name='$HOSTNAME$' --service-description='$SERVICEDESC$' --service-state=$SERVICESTATE$ \

Host notification command​

host command

/usr/lib/centreon/git-plugins/centreon-plugins/src/ \
--plugin=notification::telegram::plugin \
--mode=alert \
--http-peer-addr='' \
--bot-token='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--chat-id='-xxxxxxx' \
--host-name='$HOSTNAME$' \
--host-state=$HOSTSTATE$ \


/usr/lib/centreon/git-plugins/centreon-plugins/src/ \ 
--plugin=notification::telegram::plugin \
--mode=alert \
--http-peer-addr='' \
--bot-token='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--chat-id='-xxxxxxxx' \
--host-name='nirvana' \
--service-description='yellow-submarine' \
--service-output='highway to hell'

service notification

/usr/lib/centreon/git-plugins/centreon-plugins/src/ \
--plugin=notification::telegram::plugin \
--mode=alert \
--http-peer-addr='' \
--bot-token='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--chat-id='-xxxxxxx' \
--host-name='REM' \
--host-state=DOWN \
--host-output='let the sky fall'

host notification

Message options​

When sending your notification you can add various options that you can list using the --help option of the Centreon plugin.

Below are some of the available options:

--centreon-tokenan autologin token from centreon
--centreon-urlthe centreon url
--graph-urlgraph url. You can use the above options as macro here%{centreon_url}/include/views/graphs/generateGraphs/generateImage.php?username=myuser&token=%{centreon_token}&hostname=%{host_name}&service=%{service_description}
--link-urla link url%{centreon_url}/main.php?p=20201&o=svc&host_search=%{host_name}&svc_search=%{service_description}
--proxyurlthe url to your proxy if needed

All options can be displayed with the following command:

/usr/lib/centreon/git-plugins/centreon-plugins/src/ \
--plugin=notification::telegram::plugin \
--mode=alert \