Alarm could not be sent, but the test succeeded


My Librenms suddenly cannot send telegram alert, but the test button can be sent to telegram normally.

Alert history and notification records are also normal.

Version Info.:

Component Version
LibreNMS 1.42
DB Schema 257
PHP 7.0.30-0ubuntu0.16.04.1
MySQL 10.0.34-MariaDB-0ubuntu0.16.04.1
RRDTool 1.5.5


The alert template has been converted to the new version of the alert template, and alert sending has started using the new alert transport setting.

However, when I use ./alert.php, there are several times when the message appears:

root@mon1:/opt/librenms# ./alerts.php
Start: Fri, 03 Aug 2018 10:30:56 +0800
Issuing Alert-UID #40852/1: telegram => ^[[A
string(21) "API '' returned Error"
string(8) "Params: "
string(152) "Return: {"ok":false,"error_code":400,"description":"Bad Request: can't parse entities: Unsupported start tag \"[email protected]\" at byte 

offset 120"}"
ERROR: HTTP Status code 400
Issuing Alert-UID #40723/1:
In : eval()'d code line 11:

  Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)

Can I solve the problem from there? thanks.

Post the template you are using and also the rule that is being triggered here please.

I have tests using custom template and default template.

right is my template, left is default template


I’m all the alert rules that didn’t send the alert, one of them was

macros.device_down = 1

1 Like

perhaps look at this post Alert Transport stopped working

thanks pdgaaa.

I’ve set up a new template “Default Template” for LibreNMS Docs:

But it still couldn’t be sent, It appears in Alert History that the message content failed before the last message was sent to telegram

I found the reason.

As the picture shows, I have set alert to admins, and if a member of admins has a set email,

it will fail, and if I remove the email, ex: “Max”, the alert will send successfully