Thanks @TheGreatDoc.
I’ve update all templates, but I still receive this error on event log.
Could not issue critical alert for rule ‘Devices up/down’ to transport ‘telegram’ Error: HTTP Status code 400
I made a debug with “test-alert.php”, and de result is:
SQL[SELECT device_id
FROM devices
WHERE hostname
= ? [“172.16.0.106”] 0.38ms]
SQL[SELECT alerts.id, alerts.device_id, alerts.rule_id, alerts.state, alerts.note, alerts.info FROM alerts WHERE alerts.device_id = 55 && alerts.rule_id = 4 [] 0.33ms]
SQL[SELECT alert_log.id,alert_log.rule_id,alert_log.device_id,alert_log.state,alert_log.details,alert_log.time_logged,alert_rules.rule,alert_rules.severity,alert_rules.extra,alert_rules.name,alert_rules.builder FROM alert_log,alert_rules WHERE alert_log.rule_id = alert_rules.id && alert_log.device_id = ? && alert_log.rule_id = ? && alert_rules.disabled = 0 ORDER BY alert_log.id DESC LIMIT 1 [55,4] 0.43ms]
SQL[SELECT DISTINCT a.* FROM alert_rules a
LEFT JOIN alert_device_map d ON a.id=d.rule_id
LEFT JOIN alert_group_map g ON a.id=g.rule_id
LEFT JOIN device_group_device dg ON g.group_id=dg.device_group_id
WHERE a.disabled = 0 AND ((d.device_id IS NULL AND g.group_id IS NULL) OR d.device_id=? OR dg.device_id=?) [55,55] 0.28ms]
SQL[SELECT attrib_value FROM devices_attribs WHERE attrib_type = “disable_notify” && device_id = ? [55] 0.25ms]
SQL[SELECT hostname, sysName, sysDescr, sysContact, os, type, ip, hardware, version, purpose, notes, uptime, status, status_reason, locations.location FROM devices LEFT JOIN locations ON locations.id = devices.location_id WHERE device_id = ? [55] 0.27ms]
SQL[SELECT * FROM devices_attribs WHERE device_id
= ? [55] 0.27ms]
SQL[select * from device_perf
where device_id
= ? order by timestamp
desc limit 1 [55] 0.18ms]
SQL[select * from alert_templates
where exists (select * from alert_template_map
where alert_templates
.id
= alert_template_map
.alert_templates_id
and alert_rule_id
= ?) limit 1 [4] 0.17ms]
SQL[select * from alert_templates
where name
= ? limit 1 [“Default Alert Template”] 0.18ms]
Issuing Alert-UID #169/1:
SQL[SELECT rule_id
FROM alerts
WHERE id
=? [94] 0.17ms]
SQL[SELECT b.transport_id, b.transport_type, b.transport_name FROM alert_transport_map AS a LEFT JOIN alert_transports AS b ON b.transport_id=a.transport_or_group_id WHERE a.target_type=‘single’ AND a.rule_id=? UNION DISTINCT SELECT d.transport_id, d.transport_type, d.transport_name FROM alert_transport_map AS a LEFT JOIN alert_transport_groups AS b ON a.transport_or_group_id=b.transport_group_id LEFT JOIN transport_group_transport AS c ON b.transport_group_id=c.transport_group_id LEFT JOIN alert_transports AS d ON c.transport_id=d.transport_id WHERE a.target_type=‘group’ AND a.rule_id=? [4,4] 0.22ms]
:: Transport telegram => SQL[SELECT transport_config
FROM alert_transports
WHERE transport_id
=? [2] 0.22ms]
string(21) “API ‘’ returned Error”
string(8) "Params: "
string(145) “Return: {“ok”:false,“error_code”:400,“description”:“Bad Request: can’t parse entities: Can’t find end of the entity starting at byte offset 233”}”
ERROR: HTTP Status code 400
SQL[SELECT devices
.*, location
, lat
, lng
FROM devices
LEFT JOIN locations ON devices
.location_id=locations
.id
WHERE device_id
= ? [55] 1.3ms]
SQL[SELECT * FROM devices_attribs WHERE device_id
= ? [55] 0.94ms]
SQL[SELECT * FROM vrf_lite_cisco
WHERE device_id
= ? [55] 0.33ms]
SQL[INSERT IGNORE INTO eventlog
(device_id
,reference
,type
,datetime
,severity
,message
,username
) VALUES (:device_id,:reference,:type,:datetime,:severity,:message,:username) {“device_id”:55,“reference”:null,“type”:“error”,“datetime”:“2019-02-24 21:06:21”,“severity”:5,“message”:“Could not issue critical alert for rule ‘Check Ping Status’ to transport ‘telegram’ Error: HTTP Status code 400”,“username”:""} 2.91ms]
If see, the probles is in telegram transport, when try to use de API.
The test button on Transport Alert secction, works fine, and I receive “This is a test alert” message, so I think de Transport configuration is well.
Thanks!