20. 06. 2025 Andrea Mariani NetEye, Unified Monitoring

NEP Telegram Notification

Some time ago, my colleague Giuseppe Di Garbo published this article on the NetEye Blog, where he explained how to integrate NetEye notifications with Telegram.

It was a great starting point, and in fact many of us used it to enable NetEye’s notification system to send alerts directly to the Telegram app for many customers.

Later, Telegram introduced the possibility of using threads (topics) within groups, so something more structured and easier to manage was needed both in terms of installation and configuration.

Well, today we can say it: we have a NEP for Telegram notifications!

Let’s Look at How to Install and Configure It

Obviously, installation follows what has been the standard procedure for NEP packages for a few years now. Once the NEP package list has been updated, you can run:

nep-setup list

nep-setup install nep-notification-telegram

Now comes the slightly more complex part: creating the bot and retrieving the following values: bot_token, thread_id, and chat_id.

As Giuseppe already described in his article, the basic configuration is essentially unchanged:

  • Open Telegram and search for @BotFather
  • Send /newbot and follow the instructions
  • Choose a name and username (e.g., myname_bot, NOTE: it must end with _bot)
  • You’ll receive a token like this:
123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11

Save it, we’ll need it later.

Now:

  • Create a group
  • Add the bot as a member
  • If you want to use threads, enable “Topics” in the group settings
  • Write a message in the group or in a thread (e.g., “test”)

Retrieve All ID’s via curl

After sending a message in the group, run:

curl -s "https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates"

Check the response. You should see something like this:

{
  "message": {
    "chat": {
      "id": -1001234567890,
      "title": "NetEye Notifications"
    },
    "message_thread_id": 33,
    "text": "test"
  }
}

Take note of the following:

  • chat.id = this is your chat ID, to use as telegram_chat_id
  • message_thread_id = this is your thread ID (optional, but very useful if you’re using topics), to use as telegram_thread_id

Sending Test Messages

Before configuring NetEye, you can test if everything works with:

curl -s -X POST "https://api.telegram.org/bot<YOUR_TOKEN>/sendMessage" \
  -d "chat_id=-1001234567890" \
  -d "message_thread_id=33" \
  -d "text=Test notification from NetEye" \
  -d "parse_mode=HTML"

The Final Step

Now take all the IDs and tokens you’ve collected so far and insert them into the User Notification Template in NetEye.

So that’s it, enjoy your easily configurable Telegram notifications.

These Solutions are Engineered by Humans

Did you find this article interesting? Does it match your skill set? Our customers often present us with problems that need customized solutions. In fact, we’re currently hiring for roles just like this and others here at Würth Phoenix.

Andrea Mariani

Andrea Mariani

Author

Andrea Mariani

Leave a Reply

Your email address will not be published. Required fields are marked *

Archive