Hi,
Since yesterday my notifications with Telegram stopped working.
When I run a test-alert I get the following output:
/opt/librenms$ sudo -u librenms ./scripts/test-alert.php -r 35 -h 7 -d
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 = 35 [] 0.64ms]
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.query,alert_rules.builder,alert_rules.proc 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 [7,35] 0.35ms]
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=?) [7,7] 0.3ms]
SQL[SELECT attrib_value FROM devices_attribs WHERE attrib_type = “disable_notify” && device_id = ? [7] 0.46ms]
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 = ? [7] 0.41ms]
SQL[SELECT * FROM devices_attribs WHERE device_id
= ? [7] 0.33ms]
SQL[select * from device_perf
where device_id
= ? order by timestamp
desc limit 1 [7] 22.69ms]
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 [35] 0.97ms]
Issuing Alert-UID #14205/1:
SQL[SELECT rule_id
FROM alerts
WHERE id
=? [2477] 0.32ms]
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=? [35,35] 0.91ms]
:: Transport telegram => SQL[SELECT transport_config
FROM alert_transports
WHERE transport_id
=? [2] 0.28ms]
string(21) “API ‘’ returned Error”
string(8) “Params: "
string(8) “Return: "
ERROR: HTTP Status code 0
SQL[insert into eventlog
(device_id
, reference
, type
, datetime
, severity
, message
, username
) values (?, ?, ?, ?, ?, ?, ?) [7,null,“error”,“2019-11-14 14:31:49”,5,“Could not issue critical alert for rule ‘Device rebooted’ to transport ‘telegram’ Error: HTTP Status code 0”,””] 22.59ms]
During it times out after 5 minutes on “:: Transport telegram =>” and then finally returns the error “HTTP Status code 0”
What I tried so far is to reset permissions with:
chown -R librenms:librenms /opt/librenms/storage/
chmod -R g+w /opt/librenms/storage
I have updated LibreNMS to the latest version
And created a new Telegram transport.
When I hit the test transport button the (failure) notification also shows after a 5 minute time-out.