News:

We really need your input in this questionnaire

Main Menu

Telegram channel Issue

Started by jbriseno, April 29, 2022, 10:05:27 PM

Previous topic - Next topic

jbriseno

Hi, there. We are using NetXMC ver. 4.x  We decide to add a Telegram bot service into the netxmc server. But, It doesn't work. Beacuse an image worth than a thousand words. I Attach it

Sequential steps to config the Telegram bot

I created a Telgram bot
Add it into the Notification channels menu option.
Telegram configuration according with the netxmc online documentation
Testing the Telegram channel using the send notification option from the Tools menu
Notification to the Telegram bot has been enqueded. Then the Telegram configuration changed to error status on the Notification channels.

Any idea is welcome ! Thanks in advance.

Jose

Victor Kirhenshtein

Hi,

please set debug level to 6 for tag ncd.telegram, try to send notification again, and check server log.

Best regards,
Victor

jbriseno

Hi, Victor. First thank you for your time to reply this post. Second, I attach a text file with the log information related with Telegram channel. I hope this helps.
Any comment is welcome

My best
Jose

Filipp Sudanov

Can you show screenshot of notification driver properties (specifically Driver Configuration there).

jbriseno

Hi, Filipp. First thanks for reply my post. I attach a screenshot with the Telegram conf. Please, let me know if you need other kind of info.
Thanks in Advance.

jbriseno

Hi, Filipp. I decded to add the Telgram conf status screenshot from the Notification Channel window. In case you need it.

Filipp Sudanov

In Driver configuration we should only have configuration parameters for the driver in name=value format. So for Telegram only these parameters are allowed:

• AuthToken
• DisableIPv4 - true to disable IPv4 usage
• DisableIPv6 - true to disable IPv6 usage
• ParseMode - Text formatting style: Markdown, HTML or MarkdownV2. See Telegram API documentation on formatting syntax: https://core.telegram.org/bots/api#formatting-options
• Proxy - proxy url or ip or full configuration if format [scheme]://[login:password]@IP:[PORT]
• ProxyPort - proxy port
• ProxyType - proxy type: http, https, socks4, socks4a, socks5 or socks5h
• ProxyUser - proxy user name
• ProxyPassword - proxy user password

So just remove
Utelred_bot
Hi.

lines and it should work.
The text of the message is defined in properties of specific action that is used for notification.

jbriseno

Hi, Filipp. I appreciate your time to reply the post. I got it.

Thanks 1

jbriseno

Hi, Filipp. I followed your Telegram channel conf. However, The Telegram Channel error still there. I attach a PDF file with the sequentai steps that I followed, in the bottom of this file, I added the Event monior message when I sent the message to Telegram channel. I hope this help, too.
Any comments are welcome.
Thanks in advance

My best, José

Filipp Sudanov

Channel configuration looks fine.

The Utelred_bot that you specify as recipient - is it the same bot that you use for notification sending (the AuthToken is from that bot?).

If it's a different bot, I am not sure, if one bot can send messages to another. But generally recipient should be a name of either a group, channel or username. Or, second option, recipient could be numeric ID of group, channel or chat.

Try to send a message to your telegram account. For this in your telegram profile you need to set a username. Then you need to send a message from yourself to the bot (bots can not initiate dialogs). And then try to send notification to your username (without @) from NetXMS.


jbriseno

Hi, Filipp. I attach an image with the instructions that you mention in latest reply of this post. I hope this helps.

My best

Jose

Filipp Sudanov

And what there is in the log with debug level to 6 for tag ncd.telegram?

jbriseno

Hi, Filipp. I attach the netXMC log file with the tag ncd.telegram. I hope this helps.
My best, Jose.

Victor Kirhenshtein

Hi,

it doesn't look like debug level is set correctly. You can open server debug console (either from desktop client via Tools -> Server Console, or from command line on server machine by running nxadm -i) and enter command debug to get current debug levels. Then you can set debug level for required tag with command debug ncd.telegram 7.

Best regards,
Victor

jbriseno

Hi, Victor. I got it. I attach the log file with the netxmc debug configuration you mentioned in the latest post.  I hope this helps.
My best
Jose