Ad Widget

Collapse

Integration with Telegram

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mgfeal
    Junior Member
    • Mar 2019
    • 7

    #1

    Integration with Telegram

    Hi!

    I'm trying to send alerts using Telegram
    I created a bot and a group. It's all ok.

    Use Telegram it's easy. If you browse:

    Your message is sent.

    Now I want to launch this wget command when a problem appear.
    How can I do it?

    I'm testing doing this:
    Administration - Media type
    Name: Telegram
    Type: Script
    Script name: telegram.sh

    In /usr/lib/zabbix/alertscripts I created a telegram.sh file with this code:

    #!/bin/bash
    wget "https://api.telegram.org/bot....../sendMessage?chat_id=-3......&text=test"


    Then I changed chmod to 755 this file.
    If I execute it, works perfect.

    So, now I tried to configure the alerts.
    In Administration - Users in Admin (user that I'm using) in Media added a new Media:
    Type: Telegram
    Send to: I don't know why I need to put some text in this box.
    When active: 1-7,00:00-24:00
    Use if severity: all checked
    Enabled: checked


    Now I force a problem. When the problem appears at Monitoring - Problems I don't receive the message.

    Anybody can help me?

    Thanks!!
Working...