PRTG Telegram
Telegram
, . , , , .
PRTG (Paessler Router Traffic Grapher), e-mail, SMS, Push-. -, . Telegram, . , . , Telegram " ".
, Telegram PRTG , Telegram. : , PRTG, , .
- Telegram
- ,
- PRTG https://api.telegram.org/
, "The Botfather". Telegram:

/newbot Botfather . , :

API , . , . , /setprivacy /setjoingroups.
, .


/start, . , . ,
, API . , <apikey> API :
https://api.telegram.org/bot<apikey>/getMe
- :
{ "ok": true, "result": { "id": 1234567890, "first_name": "PRTGNotiBot", "username": "PRTGNotificationBot" }}
- , , API . , getMe getUpdates. , .
{ "ok": true, "result": [{ "update_id": 521075218, "message": { "message_id": 3, "from": { "id": 11512298, "first_name": "xxxxxxxxx", "last_name": "xxxxxxxxx", "username": "xxxxxxxxx" }, "chat": { "id":-12345690, "title": "[Paessler] IT", "type": "group", "all_members_are_administrators": true }, "date": 1493834122, "text": "/start", "entities": [{ "type": "bot_command", "offset": 0, "length": 6 }] } }]}
, "-". PRTG. Setup > Account Settings > Notifications.

:

, ( pingsensor)

HTTP. https://api.telegram.org/bot<your-api-key>/sendMessage, API .

Postdata :
chat_id=-<your-chat-id>&text=There's a *%status* sensor in your PRTG*Last Message* %lastmessage*Down since* %since*Device* %device*Group* %group&parse_mode=Markdown
- chat-id , .
- text , . .
- %status PRTG. Telegram API. parse_mode=Markdown.
, , :
chat_id=-123456890&text=%device% is *%status*!&parse_mode=Markdown
, , , .
, - :

, . Telegram - , PING. Devices, PING .

. Add State Trigger . :

, . , .
. .