Alerts/history after deleting a device

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

Hello everyone,

I went through the docs however i can’t seem to find any reference about alerts and their history after devices have been deleted.

What I’ve noticed is that the alerts table still has entries after my devices have been removed:

MariaDB [librenms]> select * from devices;
Empty set (0.00 sec)

MariaDB [librenms]> select * from alerts;
+-----+-----------+---------+-------+---------+------+------+---------------------+------+
| id  | device_id | rule_id | state | alerted | open | note | timestamp           | info |
+-----+-----------+---------+-------+---------+------+------+---------------------+------+
| 103 |         4 |       1 |     0 |       0 |    0 | NULL | 2019-09-09 18:46:00 |      |
| 104 |         4 |       2 |     0 |       0 |    0 | NULL | 2019-09-09 18:46:00 |      |
| 105 |         4 |       4 |     0 |       0 |    0 | NULL | 2019-09-09 18:46:00 |      |
| 106 |         4 |       5 |     0 |       0 |    0 | NULL | 2019-09-09 18:46:00 |      |
| 107 |         4 |       6 |     0 |       0 |    0 | NULL | 2019-09-09 18:46:00 |      |
| 108 |         4 |       7 |     0 |       0 |    0 | NULL | 2019-09-09 18:46:00 |      |
| 109 |         4 |       8 |     0 |       0 |    0 | NULL | 2019-09-09 18:46:00 |      |
| 110 |         4 |      12 |     0 |       0 |    0 | NULL | 2019-09-09 18:46:00 |      |
+-----+-----------+---------+-------+---------+------+------+---------------------+------+
8 rows in set (0.00 sec)

MariaDB [librenms]>

MariaDB [librenms]> select * from alert_log;
+-----+---------+-----------+-------+---------------------------------+---------------------+
| id  | rule_id | device_id | state | details                         | time_logged         |
+-----+---------+-----------+-------+---------------------------------+---------------------+
| 305 |       1 |         4 |     0 | xګV��+I-*K�Q�245�005173� [�� | 2019-09-09 18:40:11 |
| 306 |       2 |         4 |     0 | xګV��+I-*K�Q�245�005173� [�� | 2019-09-09 18:40:11 |
| 307 |       4 |         4 |     0 | xګV��+I-*K�Q�245�005173� [�� | 2019-09-09 18:40:11 |
| 308 |       5 |         4 |     0 | xګV��+I-*K�Q�245�005173� [�� | 2019-09-09 18:40:11 |
| 309 |       6 |         4 |     0 | xګV��+I-*K�Q�245�005173� [�� | 2019-09-09 18:40:11 |
| 310 |       7 |         4 |     0 | xګV��+I-*K�Q�245�005173� [�� | 2019-09-09 18:40:11 |
| 311 |       8 |         4 |     0 | xګV��+I-*K�Q�245�005173� [�� | 2019-09-09 18:40:11 |
| 312 |      12 |         4 |     0 | xګV��+I-*K�Q�245�005173� [�� | 2019-09-09 18:40:11 |
+-----+---------+-----------+-------+---------------------------------+---------------------+
8 rows in set (0.00 sec)

MariaDB [librenms]>

Is this normal behaviour? Fortunately there won’t be any mistake on other devices being tagged under device_id 4 since that field is set to auto_increment in the devices table.

Thanks!

Here’s a screenshot to go with it.