Thanks:
But i see only one transport, so seems we have found the issue … but how to solve it since the transport is recreated and when i do a test with telegram the message is popping up…
Rule name: Devices up/down
Alert rule: macros.device_down = 1
Alert query: SELECT * FROM devices WHERE (devices.device_id = ?) AND (devices.status = 0 && (devices.disabled = 0 && devices.ignore = 0)) = 1
Rule match: no match
Found 1 transports to send alerts to.
Transport: mail
Debug :
:: Transport telegram => SQL[SELECT transport_config
FROM alert_transports
WHERE transport_id
=? [4] 0.78ms]
string(21) “API ‘’ returned Error”
string(8) “Params: "
string(154) “Return: {“ok”:false,“error_code”:400,“description”:“Bad Request: ca n’t parse entities: Unsupported start tag "[email protected]" at byte offse t 352”}”
ERROR: HTTP Status code 400
SQL[INSERT IGNORE INTO eventlog
(device_id
,reference
,type
,datetime
,se verity
,message
,username
) VALUES (:device_id,:reference,:type,:datetime,:se verity,:message,:username) {“device_id”:7,“reference”:null,“type”:“error”,“datet ime”:“2019-06-17 21:51:11”,“severity”:5,“message”:“Could not issue recovery for rule ‘Devices up/down’ to transport ‘telegram’ Error: HTTP Status code 400”,“us ername”:”"} 4.96ms]
Here i have a problem, syntax error?
[email protected]:/opt/librenms/scripts# ./test-template.php -t 0 -d -h 192.168.1.14 -r 4 -s 1
SQL[SELECT device_id
FROM devices
WHERE hostname
= ? [“192.168.1.14”] 0.8ms]
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘alerts.state=1’ at line 1 (SQL: SELECT alerts.id, alerts.device_id, alerts.rule_id, alerts.state, alerts.note, alerts.info FROM alerts WHERE alerts.device_id=7 && alerts.rule_id=4 alerts.state=1) (SQL: SELECT alerts.id, alerts.device_id, alerts.rule_id, alerts.state, alerts.note, alerts.info FROM alerts WHERE alerts.device_id=7 && alerts.rule_id=4 alerts.state=1)#0 /opt/librenms/includes/alerts.inc.php(675): dbFetchRows(‘SELECT alerts.i…’)
#1 /opt/librenms/scripts/test-template.php(24): loadAlerts(‘alerts.device_i…’)
#2 {main}
No alert found, make sure to select an active alert.