Question

Centreon and telegram

  • 10 September 2022
  • 4 replies
  • 236 views

Badge +1

Hello, 

 

I have some problem with my centreon and telegram notification I follow the tutorial 

  1. install : https://github.com/centreon/centreon-plugins.git
  2. add  bot and conversation (and take token)
  3. add notification command in my centreon 
  4. add the notification at my user 

I test with my phone (create ping host) and when ping is down I don’t have telegram message 

 

Thanks for you help 


4 replies

Userlevel 4
Badge +14

Hello @etomrio 

Could you share your definition of notification Host command ? And the same command when you execute it from your poller ?

Badge +1

Hello, 

 

yes ! 

 

curl -s -X POST https://api.telegram.org/botMYIDOTTELEGRAM
/sendMessage -d text="El Host $HOSTNAME$ ($HOSTADDRESS$) esta en estado $HOSTSTATE$, más info: $HOSTOUTPUT$ - $LONGDATETIME$" -d chat_id=-MYIDCHAT

 

thanks

Userlevel 4
Badge +14

Hello,

You could add the absolute path of cURL and test it, or simply add a ressource https://docs.centreon.com/docs/monitoring/basic-objects/macros/#resource-macros with the absolute path of binary cURL ?

But, i think you could use the Centreon Plugins Telegram Notification here https://github.com/centreon/centreon-plugins/tree/master/notification/telegram

You could inspired with this tutorial :

I've tried the Centreon Plugins Slack Notification with Mattermost here, you could inspired with the Command notification here : https://thewatch.centreon.com/data-usage-and-visualization-38/feature-of-chatops-module-546

Regards,

Badge +1

OK tanks I will try 

Reply