I’m migrating from the legacy alert transports/templates across to the new implementation and running into an odd problem with the new Alert Transport mappings in Alert Rules.
I have a number of Alert Transports set up (mail, pushover, slack etc), and a single alert Transport Group. I initially had all my alerts set up to use the Transport Group which seemed to work fine from a DB perspective, but when I then edit a single alert rule to change from using the Transport Group for alerts, to one of the specific Alert Transports, all the rows in the alert_transport_map table appear to be deleted and replaced with a single row for the rule I have just edited.
Anyone else run into this problem?
SQL output from the alert_transport_map table below, before and after the Alert Rule edit.
Before:
MariaDB [librenms]> select * from alert_transport_map order by rule_id;
+-----+---------+-----------------------+-------------+
| id | rule_id | transport_or_group_id | target_type |
+-----+---------+-----------------------+-------------+
| 117 | 1 | 1 | group |
| 118 | 2 | 1 | group |
| 119 | 4 | 1 | group |
| 120 | 5 | 1 | group |
| 121 | 6 | 1 | group |
| 122 | 7 | 1 | group |
| 123 | 8 | 1 | group |
| 124 | 9 | 1 | group |
| 125 | 12 | 1 | group |
| 126 | 13 | 1 | group |
| 127 | 14 | 1 | group |
| 128 | 15 | 1 | group |
| 129 | 16 | 1 | group |
| 130 | 17 | 1 | group |
| 131 | 18 | 1 | group |
| 132 | 19 | 1 | group |
| 133 | 20 | 1 | group |
| 134 | 21 | 1 | group |
| 135 | 22 | 1 | group |
| 136 | 23 | 1 | group |
| 137 | 24 | 1 | group |
| 138 | 25 | 1 | group |
| 139 | 26 | 1 | group |
| 140 | 27 | 1 | group |
| 141 | 28 | 1 | group |
| 142 | 29 | 1 | group |
| 143 | 31 | 1 | group |
| 144 | 32 | 1 | group |
| 145 | 33 | 1 | group |
| 146 | 34 | 1 | group |
| 147 | 35 | 1 | group |
| 148 | 36 | 1 | group |
| 149 | 37 | 1 | group |
| 150 | 38 | 1 | group |
| 151 | 39 | 1 | group |
+-----+---------+-----------------------+-------------+
35 rows in set (0.01 sec)
And after:
MariaDB [librenms]> select * from alert_transport_map order by rule_id;
+-----+---------+-----------------------+-------------+
| id | rule_id | transport_or_group_id | target_type |
+-----+---------+-----------------------+-------------+
| 152 | 34 | 1 | single |
+-----+---------+-----------------------+-------------+
1 row in set (0.00 sec)
Component | Version |
---|---|
LibreNMS | 1.45 |
DB Schema | 270 |
PHP | 7.0.32 |
MySQL | 5.5.60-MariaDB |
RRDTool | 1.4.8 |
SNMP | NET-SNMP 5.7.2 |