Skip to content

Instantly share code, notes, and snippets.

@vhsantos
Last active September 19, 2023 20:25
Show Gist options
  • Save vhsantos/477a81961a3bf7d1c6dc7c67ceb2a513 to your computer and use it in GitHub Desktop.
Save vhsantos/477a81961a3bf7d1c6dc7c67ceb2a513 to your computer and use it in GitHub Desktop.
Centreon Telegram Bot

Centreon Telegram Bot Instructions

Centreon Telegram Bot is a software to interact with Centreon Monitoring Servers via API using any Telegram software client.

Basically, it connect to Centreon API to get the information of hosts/services and show to users. After this, the User can choice to take actions to ONE or ALL service/host with problem.

Configurations

First of all, you will need:

  • A Centreon Monitoring Server.
  • A Telegram account.

Centreon API

You need to configure your Centreon's account to allow you or another users to have access to API. This option is disabled by default and to enable it, follow this steps:

  • Conecte to you Centreon Server using your browser and a admin account.
  • Go to Configuration -> Users -> Contacts/Users.
  • Select the User that you want to configure.
  • Go to Centreon Authentication stash.
  • Enable the option 'Reach API Realtime'.

Note: We strongly recommend that you use an User WITHOUT admin privileges.

To check/disable the Admin privileges to an user, follow this steps:

  • Conecte to you Centreon Server using your browser and a admin account.
  • Go to Configuration -> Users -> Contacts/Users.
  • Select the User that you want to configure.
  • Go to Centreon Authentication stash.
  • DISABLE the option 'Admin'

Telegram

Now, you only need to open your Telegram client and search by the CentreonTelegramBot and add it to your contacts. After this, you will see a /start button in the chat panel, use it to start the bot and the wizzard to connect to your centreon server will begin.

Usage

For now, the bot permit you to:

  • Show the hosts/services problems.
  • Acknowledge the hosts/services problems.
  • Set Downtimes to hosts/services problems.

Ideas, problems or others??

You can contact me at (VHS) at Centreon Telegram Group (click in the link to go to chat group).

TODO

  • Add more commands (disable downtime, acknoledge, check, etc).
  • Add some options to commands.

Disclaimer

I don't have any direct relation with Centreon or Telegram and this SOFTWARE PRODUCT is provided by THE PROVIDER "as is" and "with all faults." THE PROVIDER makes no representations or warranties of any kind concerning the safety, suitability, lack of viruses, inaccuracies, typographical errors, or other harmful components of this SOFTWARE PRODUCT. There are inherent dangers in the use of any software, and you are solely responsible for determining whether this SOFTWARE PRODUCT is compatible with your equipment and other software installed on your equipment. You are also solely responsible for the protection of your equipment and backup of your data, and THE PROVIDER will not be liable for any damages you may suffer in connection with using, modifying, or distributing this SOFTWARE PRODUCT.

Centreon and Telegram are registered trademarks of their respective owners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment